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.
--- 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):