comparison mercurial/localrepo.py @ 12622:01b6f058021b

changegroupsubset: use readdelta() fast path when delta is against a parent
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Fri, 08 Oct 2010 18:00:15 -0500
parents 6a6149487817
children 34d8247a4595
comparison
equal deleted inserted replaced
12621:9a2de8dae27b 12622:01b6f058021b
1406 # It also remembers which changenode each filenode belongs to. It 1406 # It also remembers which changenode each filenode belongs to. It
1407 # does this by assuming the a filenode belongs to the changenode 1407 # does this by assuming the a filenode belongs to the changenode
1408 # the first manifest that references it belongs to. 1408 # the first manifest that references it belongs to.
1409 def collect_msng_filenodes(mnfstnode): 1409 def collect_msng_filenodes(mnfstnode):
1410 r = mnfst.rev(mnfstnode) 1410 r = mnfst.rev(mnfstnode)
1411 if r - 1 in mnfst.parentrevs(r): 1411 if mnfst.deltaparent(r) in mnfst.parentrevs(r):
1412 # If the previous rev is one of the parents, 1412 # If the previous rev is one of the parents,
1413 # we only need to see a diff. 1413 # we only need to see a diff.
1414 deltamf = mnfst.readdelta(mnfstnode) 1414 deltamf = mnfst.readdelta(mnfstnode)
1415 # For each line in the delta 1415 # For each line in the delta
1416 for f, fnode in deltamf.iteritems(): 1416 for f, fnode in deltamf.iteritems():