D4186: changegroup: populate _clnodetorev as part of changelog linknode lookup

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Thu Aug 9 16:26:59 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG6076053589b9: changegroup: populate _clnodetorev as part of changelog linknode lookup (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4186?vs=10153&id=10175

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

AFFECTED FILES
  mercurial/changegroup.py

CHANGE DETAILS

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -852,6 +852,8 @@
             clrevorder[x] = len(clrevorder)
 
             if self._ellipses:
+                self._clnodetorev[x] = cl.rev(x)
+
                 # Only update mfs if x is going to be sent. Otherwise we
                 # end up with bogus linkrevs specified for manifests and
                 # we skip some manifest nodes that we should otherwise
@@ -1045,15 +1047,8 @@
         progress.complete()
 
     def _revisiondeltanarrow(self, store, ischangelog, rev, prev, linknode):
-        # build up some mapping information that's useful later. See
-        # the local() nested function below.
-        if ischangelog:
-            self._clnodetorev[linknode] = rev
-            linkrev = rev
-            self._clrevtolocalrev[linkrev] = rev
-        else:
-            linkrev = self._clnodetorev[linknode]
-            self._clrevtolocalrev[linkrev] = rev
+        linkrev = self._clnodetorev[linknode]
+        self._clrevtolocalrev[linkrev] = rev
 
         # This is a node to send in full, because the changeset it
         # corresponds to was a full changeset.



To: indygreg, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list