# HG changeset patch # User Gregory Szorc # Date 1415336232 28800 # Node ID f4ab47ccefde24b740c4655ebe16be0d1681d715 # Parent a4af6fd99fb0c9c2b7bf9bc2b5a88343a0c52dc9 changegroup: don't define lookupmf() until it is needed lookupmf() is currently defined earlier than when it is needed. Future patches further refactoring this code will be easier to read when lookupmf() is in its new home. diff -r a4af6fd99fb0 -r f4ab47ccefde mercurial/changegroup.py --- a/mercurial/changegroup.py Wed Nov 05 18:31:39 2014 +0000 +++ b/mercurial/changegroup.py Thu Nov 06 20:57:12 2014 -0800 @@ -330,6 +330,14 @@ mfs.setdefault(c[0], x) return x + for chunk in self.group(clnodes, cl, lookupcl, units=_('changesets'), + reorder=reorder): + yield chunk + progress(msgbundling, None) + + for f in changedfiles: + fnodes[f] = {} + # Callback for the manifest, used to collect linkrevs for filelog # revisions. # Returns the linkrev node (collected in lookupcl). @@ -344,13 +352,6 @@ fnodes[f].setdefault(n, clnode) return clnode - for chunk in self.group(clnodes, cl, lookupcl, units=_('changesets'), - reorder=reorder): - yield chunk - progress(msgbundling, None) - - for f in changedfiles: - fnodes[f] = {} mfnodes = self.prune(mf, mfs, commonrevs, source) for chunk in self.group(mfnodes, mf, lookupmf, units=_('manifests'), reorder=reorder):