D4087: changegroup: move changelogdone into cgpacker
This revision was automatically updated to reflect the committed changes. Closed by commit rHG379d90327861: changegroup: move changelogdone into cgpacker (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4087?vs=9849=9963 REVISION DETAIL https://phab.mercurial-scm.org/D4087 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 @@ -579,13 +579,17 @@ else: self._verbosenote = lambda s: None +# TODO the functionality keyed off of this should probably be +# controlled via arguments to group() that influence behavior. +self._changelogdone = False + def _close(self): # Ellipses serving mode. getattr(self, '_clrev_to_localrev', {}).clear() if getattr(self, '_next_clrev_to_localrev', {}): self._clrev_to_localrev = self._next_clrev_to_localrev del self._next_clrev_to_localrev -self._changelog_done = True +self._changelogdone = True return closechunk() @@ -1058,7 +1062,7 @@ def _revisiondeltanarrow(self, store, rev, prev, linknode): # build up some mapping information that's useful later. See # the local() nested function below. -if not self._changelog_done: +if not self._changelogdone: self._clnode_to_rev[linknode] = rev linkrev = rev self._clrev_to_localrev[linkrev] = rev @@ -1090,7 +1094,7 @@ if clrev == nullrev: return nullrev -if not self._changelog_done: +if not self._changelogdone: # If we're doing the changelog, it's possible that we # have a parent that is already on the client, and we # need to store some extra mapping information so that @@ -1403,6 +1407,5 @@ # Maps changelog nodes to changelog revs. Filled in once # during changelog stage and then left unmodified. packer._clnode_to_rev = {} -packer._changelog_done = False return packer.generate(common, visitnodes, False, source) To: indygreg, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D4087: changegroup: move changelogdone into cgpacker
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Looking at what it is used for, it feels like there is a better way to implement all this. So recording a TODO to track that. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4087 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 @@ -582,13 +582,17 @@ else: self._verbosenote = lambda s: None +# TODO the functionality keyed off of this should probably be +# controlled via arguments to group() that influence behavior. +self._changelogdone = False + def _close(self): # Ellipses serving mode. getattr(self, '_clrev_to_localrev', {}).clear() if getattr(self, '_next_clrev_to_localrev', {}): self._clrev_to_localrev = self._next_clrev_to_localrev del self._next_clrev_to_localrev -self._changelog_done = True +self._changelogdone = True return closechunk() @@ -1061,7 +1065,7 @@ def _revisiondeltanarrow(self, store, rev, prev, linknode): # build up some mapping information that's useful later. See # the local() nested function below. -if not self._changelog_done: +if not self._changelogdone: self._clnode_to_rev[linknode] = rev linkrev = rev self._clrev_to_localrev[linkrev] = rev @@ -1093,7 +1097,7 @@ if clrev == nullrev: return nullrev -if not self._changelog_done: +if not self._changelogdone: # If we're doing the changelog, it's possible that we # have a parent that is already on the client, and we # need to store some extra mapping information so that @@ -1406,6 +1410,5 @@ # Maps changelog nodes to changelog revs. Filled in once # during changelog stage and then left unmodified. packer._clnode_to_rev = {} -packer._changelog_done = False return packer.generate(common, visitnodes, False, source) To: indygreg, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel