]> Cypherpunks repositories - gostls13.git/commitdiff
codereview: correct handling of files created with hg cp
authorRuss Cox <rsc@golang.org>
Thu, 28 Jan 2010 00:14:11 +0000 (16:14 -0800)
committerRuss Cox <rsc@golang.org>
Thu, 28 Jan 2010 00:14:11 +0000 (16:14 -0800)
R=r
CC=golang-dev
https://golang.org/cl/194118

lib/codereview/codereview.py

index c74ad97296a75da02015d2d0e53c67742d6b4553..9f7470be527be33ea248e5816d016c905d8f2b5e 100644 (file)
@@ -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: