From patchwork Thu Sep 11 00:26:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [01, of, 21, RFC] changegroup: inline builddeltaheader, public method only called once From: michaeljedgar@gmail.com X-Patchwork-Id: 5776 Message-Id: <44e926f8ae03bc1e0822.1410395162@adgar-macbookpro3.roam.corp.google.com> To: mercurial-devel@selenic.com Date: Wed, 10 Sep 2014 20:26:02 -0400 # HG changeset patch # User Mike Edgar # 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':