[PATCH 3 of 8] localrepo: call changegroupsubset() directly
Gregory Szorc
gregory.szorc at gmail.com
Fri Aug 5 03:16:59 UTC 2016
# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1470366183 25200
# Thu Aug 04 20:03:03 2016 -0700
# Node ID 3113726903b529dfb7defa3c0daddd7dd57484ee
# Parent 19d16c9bce2fdf86d8c84915a45815bb7d4fd932
localrepo: call changegroupsubset() directly
changegroup.changegroup() is a one-line function that simply calls
changegroup.changegroupsubset() with repo.heads() as an additional
argument. The function adds little value. So we prepare for removing
it by converting a caller to use changegroupsubset() directly.
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -221,17 +221,18 @@ class locallegacypeer(localpeer):
def branches(self, nodes):
return self._repo.branches(nodes)
def between(self, pairs):
return self._repo.between(pairs)
def changegroup(self, basenodes, source):
- return changegroup.changegroup(self._repo, basenodes, source)
+ return changegroup.changegroupsubset(self._repo, basenodes,
+ self._repo.heads(), source)
def changegroupsubset(self, bases, heads, source):
return changegroup.changegroupsubset(self._repo, bases, heads, source)
class localrepository(object):
supportedformats = set(('revlogv1', 'generaldelta', 'treemanifest',
'manifestv2'))
More information about the Mercurial-devel
mailing list