[PATCH 01 of 21 RFC] changegroup: inline builddeltaheader, public method only called once
michaeljedgar at gmail.com
michaeljedgar at gmail.com
Wed Sep 10 19:26:02 CDT 2014
# HG changeset patch
# User Mike Edgar <adgar at google.com>
# Date 1409521580 -7200
# Sun Aug 31 23:46:20 2014 +0200
# Node ID 44e926f8ae03bc1e0822c282a77538a875353ecf
# Parent f08b657130b9ac7cd2ad27afea6895dfde7d7722
changegroup: inline builddeltaheader, public method only called once
This helper also had an unused argument, possibly left over from an API
migration. This change should be a no-op; I've left in the calculation of the
unused base node as it could raise an exception if the base isn't present.
diff -r f08b657130b9 -r 44e926f8ae03 mercurial/changegroup.py
--- a/mercurial/changegroup.py Fri Sep 05 11:37:44 2014 -0700
+++ b/mercurial/changegroup.py Sun Aug 31 23:46:20 2014 +0200
@@ -423,15 +423,12 @@
delta = revlog.revdiff(base, rev)
p1n, p2n = revlog.parents(node)
basenode = revlog.node(base)
- meta = self.builddeltaheader(node, p1n, p2n, basenode, linknode)
+ meta = struct.pack(self.deltaheader, node, p1n, p2n, linknode)
meta += prefix
l = len(meta) + len(delta)
yield chunkheader(l)
yield meta
yield delta
- def builddeltaheader(self, node, p1n, p2n, basenode, linknode):
- # do nothing with basenode, it is implicitly the previous one in HG10
- return struct.pack(self.deltaheader, node, p1n, p2n, linknode)
def _changegroupinfo(repo, nodes, source):
if repo.ui.verbose or source == 'bundle':
More information about the Mercurial-devel
mailing list