D6181: localrepo: rename crev in _filecommit() to cnode, since it's a node
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Tue Apr 2 16:51:03 UTC 2019
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
I know we often use "rev" generically, but here's it always a node, so
it helps to be specific.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D6181
AFFECTED FILES
mercurial/localrepo.py
CHANGE DETAILS
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -2331,13 +2331,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
@@ -2349,10 +2349,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' "
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list