summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-01-27 16:14:11 -0800
committerRuss Cox <rsc@golang.org>2010-01-27 16:14:11 -0800
commitdee15b864b78c1e8548542d986c59cfac9b08886 (patch)
tree0a3831e62288056a32a57fc53392ed854cd735ff
parent4f8c796aa711c5a60206ffed333e2805e3d33ba1 (diff)
downloadgo-dee15b864b78c1e8548542d986c59cfac9b08886.tar.gz
codereview: correct handling of files created with hg cp
R=r CC=golang-dev http://codereview.appspot.com/194118
-rw-r--r--lib/codereview/codereview.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py
index c74ad9729..9f7470be5 100644
--- a/lib/codereview/codereview.py
+++ b/lib/codereview/codereview.py
@@ -2881,13 +2881,10 @@ class MercurialVCS(VersionControlSystem):
# the working copy
if out[0].startswith('%s: ' % relpath):
out = out[1:]
- if len(out) > 1:
- # Moved/copied => considered as modified, use old filename to
- # retrieve base contents
+ status, what = out[0].split(' ', 1)
+ if len(out) > 1 and status == "A" and what == relpath:
oldrelpath = out[1].strip()
status = "M"
- else:
- status, _ = out[0].split(' ', 1)
if ":" in self.base_rev:
base_rev = self.base_rev.split(":", 1)[0]
else: