mercurial/changegroup.py
changeset 19325 ec896f9e8894
parent 19293 446ab88d3f1c
child 19334 95a49112e7ab
equal deleted inserted replaced
19324:ad0d8158cefd 19325:ec896f9e8894
   362             if not filerevlog:
   362             if not filerevlog:
   363                 raise util.Abort(_("empty or missing revlog for %s") % fname)
   363                 raise util.Abort(_("empty or missing revlog for %s") % fname)
   364 
   364 
   365             if fastpathlinkrev:
   365             if fastpathlinkrev:
   366                 ln, llr = filerevlog.node, filerevlog.linkrev
   366                 ln, llr = filerevlog.node, filerevlog.linkrev
       
   367                 needed = set(cl.rev(x) for x in clnodes)
   367                 def genfilenodes():
   368                 def genfilenodes():
   368                     for r in filerevlog:
   369                     for r in filerevlog:
   369                         linkrev = llr(r)
   370                         linkrev = llr(r)
   370                         if linkrev not in commonrevs:
   371                         if linkrev in needed:
   371                             yield filerevlog.node(r), cl.node(linkrev)
   372                             yield filerevlog.node(r), cl.node(linkrev)
   372                 fnodes[fname] = dict(genfilenodes())
   373                 fnodes[fname] = dict(genfilenodes())
   373 
   374 
   374             linkrevnodes = fnodes.pop(fname, {})
   375             linkrevnodes = fnodes.pop(fname, {})
   375             # Lookup for filenodes, we collected the linkrev nodes above in the
   376             # Lookup for filenodes, we collected the linkrev nodes above in the