localrepo: rename crev in _filecommit() to cnode, since it's a node
authorMartin von Zweigbergk <martinvonz@google.com>
Mon, 25 Dec 2017 05:55:50 -0800
changeset 42062 8de1b5a009ee
parent 42061 f3365065ef1d
child 42063 912d82daeda3
localrepo: rename crev in _filecommit() to cnode, since it's a node I know we often use "rev" generically, but here's it always a node, so it helps to be specific. Differential Revision: https://phab.mercurial-scm.org/D6181
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Fri Apr 05 04:09:41 2019 +0530
+++ b/mercurial/localrepo.py	Mon Dec 25 05:55:50 2017 -0800
@@ -2342,13 +2342,13 @@
             #    \- 2 --- 4        as the merge base
             #
 
-            crev = manifest1.get(cfname)
+            cnode = manifest1.get(cfname)
             newfparent = fparent2
 
             if manifest2: # branch merge
-                if fparent2 == nullid or crev is None: # copied on remote side
+                if fparent2 == nullid or cnode is None: # copied on remote side
                     if cfname in manifest2:
-                        crev = manifest2[cfname]
+                        cnode = manifest2[cfname]
                         newfparent = fparent1
 
             # Here, we used to search backwards through history to try to find
@@ -2360,10 +2360,10 @@
             # expect this outcome it can be fixed, but this is the correct
             # behavior in this circumstance.
 
-            if crev:
-                self.ui.debug(" %s: copy %s:%s\n" % (fname, cfname, hex(crev)))
+            if cnode:
+                self.ui.debug(" %s: copy %s:%s\n" % (fname, cfname, hex(cnode)))
                 meta["copy"] = cfname
-                meta["copyrev"] = hex(crev)
+                meta["copyrev"] = hex(cnode)
                 fparent1, fparent2 = nullid, newfparent
             else:
                 self.ui.warn(_("warning: can't find ancestor for '%s' "