[shelf]: change FilePathForNonLocal to ordinary

This commit is contained in:
Nadya Zabrodina
2015-08-24 20:14:02 +03:00
parent ff006a9d33
commit bf250029e1
4 changed files with 5 additions and 14 deletions
@@ -52,10 +52,8 @@ public class BinaryFilePatchInProgress extends AbstractFilePatchInProgress<Shelv
if (myNewContentRevision != null) return myNewContentRevision;
if (myPatch.getAfterFileName() != null) {
final FilePath newFilePath = FilePatchStatus.ADDED.equals(myStatus)
? VcsUtil.getFilePathOnNonLocal(myIoCurrentBase.getAbsolutePath(),
false)
: detectNewFilePathForMovedOrModified();
final FilePath newFilePath = FilePatchStatus.ADDED.equals(myStatus) ? VcsUtil.getFilePath(myIoCurrentBase, false)
: detectNewFilePathForMovedOrModified();
myNewContentRevision = new ShelvedBinaryContentRevision(newFilePath, myPatch.getShelvedBinaryFile().SHELVED_PATH);
}
return myNewContentRevision;
@@ -53,7 +53,7 @@ public class TextFilePatchInProgress extends AbstractFilePatchInProgress<TextFil
if (myNewContentRevision == null) {
myConflicts = null;
if (FilePatchStatus.ADDED.equals(myStatus)) {
final FilePath newFilePath = VcsUtil.getFilePathOnNonLocal(myIoCurrentBase.getAbsolutePath(), false);
final FilePath newFilePath = VcsUtil.getFilePath(myIoCurrentBase, false);
final String content = myPatch.getNewFileText();
myNewContentRevision = new SimpleContentRevision(content, newFilePath, myPatch.getAfterVersionId());
}
@@ -93,10 +93,7 @@ public class ShelvedBinaryFile implements JDOMExternalizable {
};
}
if (AFTER_PATH != null) {
File fileAfter = new File(baseDir, AFTER_PATH);
final FilePath file =
getFileStatus().equals(FileStatus.ADDED) ? VcsUtil.getFilePathOnNonLocal(fileAfter.getAbsolutePath(), false) : VcsUtil.getFilePath(
fileAfter, false);
final FilePath file = VcsUtil.getFilePath(new File(baseDir, AFTER_PATH), false);
after = new ShelvedBinaryContentRevision(file, SHELVED_PATH);
}
return new Change(before, after);
@@ -148,11 +148,7 @@ public class ShelvedChange {
}
ContentRevision afterRevision = null;
if (myFileStatus != FileStatus.DELETED) {
File afterFile = getAbsolutePath(baseDir, myAfterPath);
FilePath afterPath = getFileStatus().equals(FileStatus.ADDED)
? VcsUtil.getFilePathOnNonLocal(afterFile.getAbsolutePath(), false)
: VcsUtil.getFilePath(
afterFile, false);
FilePath afterPath = VcsUtil.getFilePath(getAbsolutePath(baseDir, myAfterPath), false);
afterRevision = new PatchedContentRevision(project, beforePath, afterPath);
}
myChange = new Change(beforeRevision, afterRevision, myFileStatus);