Patchwork D6181: localrepo: rename crev in _filecommit() to cnode, since it's a node

login
register
mail settings
Submitter phabricator
Date April 4, 2019, 10:49 p.m.
Message ID <9d7431d74c4e1ba7e95c5dcd1ec34735@localhost.localdomain>
Download mbox | patch
Permalink /patch/39485/
State Not Applicable
Headers show

Comments

phabricator - April 4, 2019, 10:49 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG8de1b5a009ee: localrepo: rename crev in _filecommit() to cnode, since it&#039;s a node (authored by martinvonz, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D6181?vs=14619&id=14656#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6181?vs=14619&id=14656

REVISION DETAIL
  https://phab.mercurial-scm.org/D6181

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -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' "