mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[shelf]: change FilePathForNonLocal to ordinary
This commit is contained in:
+2
-4
@@ -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;
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user