From 46b8998435acb5da0a693cd25521c746aefb0c1a Mon Sep 17 00:00:00 2001 From: Nadya Zabrodina Date: Tue, 27 Aug 2013 15:47:25 +0400 Subject: [PATCH] exception during annotate copied file fixed *file status should be "added" if file was "copied" , because we do not provide beforeRevision in this case (if file status is copied then HgUtil.getOriginalFileName assert statement become false, exception appeared ) --- .../src/org/zmlx/hg4idea/provider/HgChangeProvider.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgChangeProvider.java b/plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgChangeProvider.java index 371fc70979b5..9c686055db6b 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgChangeProvider.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgChangeProvider.java @@ -221,10 +221,11 @@ public class HgChangeProvider implements ChangeProvider { // The original file exists so this is a duplication of the file. // Don't create the before ContentRevision or IDEA will think // this was a rename. + //todo: fix this unexpected status behavior (sometimes added status instead of copied, and copied instead of renamed ) processChange( null, HgCurrentContentRevision.create(afterFile, currentNumber), - HgChangeProvider.COPIED, + FileStatus.ADDED, builder, vcsKey );