IDEA-93193 Mercurial: Repository View: Moved file is shown as deleted, added and moved

This commit is contained in:
Nadya.Zabrodina
2012-10-23 11:20:11 +04:00
parent ef5d0b5530
commit 90c7ae3446
2 changed files with 7 additions and 3 deletions
@@ -162,7 +162,11 @@ abstract class HgRevisionsCommand {
Iterator<String> keys = copies.keySet().iterator();
while (keys.hasNext()) {
String s = keys.next();
if (!filesDeleted.contains(s)) {
if (filesAdded.contains(copies.get(s)) && filesDeleted.contains(s)) {
filesAdded.remove(copies.get(s));
filesDeleted.remove(s);
}
else if (!filesDeleted.contains(s)) {
keys.remove();
}
}
@@ -190,7 +190,7 @@ public class HgCachingCommitedChangesProvider implements CachingCommittedChanges
HgLogCommand hgLogCommand = new HgLogCommand(project);
hgLogCommand.setLogFile(false);
List<HgFileRevision> localRevisions =
hgLogCommand.execute(hgFile, maxCount == 0 ? -1 : maxCount, true, Collections.singletonList("--debug")); //can be empty
hgLogCommand.execute(hgFile, maxCount == 0 ? -1 : maxCount, true); //can be empty
Collections.reverse(localRevisions);
@@ -285,7 +285,7 @@ public class HgCachingCommitedChangesProvider implements CachingCommittedChanges
HgLogCommand hgLogCommand = new HgLogCommand(project);
hgLogCommand.setLogFile(false);
List<String> args = new ArrayList<String>();
args.add("--debug");
args.add("--follow");
args.add("--rev");
args.add(revision);
HgFileRevision localRevision = hgLogCommand.execute(hgFile, 1, true, args).get(0);