changegroup: fix fastpath during commit
authorMatt Mackall <mpm@selenic.com>
Wed, 19 Jun 2013 14:17:03 -0500
changeset 19325 ec896f9e8894
parent 19324 ad0d8158cefd
child 19326 7014526d67a8
changegroup: fix fastpath during commit Change 627cd7842e5d dropped the 'revset' variable which kept track of which changesets were being bundled. Instead, it used "not in commonset" to decide which changesets were outgoing.. which ran into trouble when a commit was in progress.
mercurial/changegroup.py
--- a/mercurial/changegroup.py	Wed Jun 05 22:41:53 2013 +0200
+++ b/mercurial/changegroup.py	Wed Jun 19 14:17:03 2013 -0500
@@ -364,10 +364,11 @@
 
             if fastpathlinkrev:
                 ln, llr = filerevlog.node, filerevlog.linkrev
+                needed = set(cl.rev(x) for x in clnodes)
                 def genfilenodes():
                     for r in filerevlog:
                         linkrev = llr(r)
-                        if linkrev not in commonrevs:
+                        if linkrev in needed:
                             yield filerevlog.node(r), cl.node(linkrev)
                 fnodes[fname] = dict(genfilenodes())