equal
deleted
inserted
replaced
12 from mercurial import ( |
12 from mercurial import ( |
13 encoding, |
13 encoding, |
14 error, |
14 error, |
15 localrepo, |
15 localrepo, |
16 match, |
16 match, |
17 pycompat, |
|
18 scmutil, |
17 scmutil, |
19 sparse, |
18 sparse, |
20 util, |
19 util, |
21 ) |
20 ) |
22 from mercurial.utils import procutil |
21 from mercurial.utils import procutil |
266 |
265 |
267 mfl = repo.manifestlog |
266 mfl = repo.manifestlog |
268 mfrevlog = mfl.getstorage(b'') |
267 mfrevlog = mfl.getstorage(b'') |
269 if base is not None: |
268 if base is not None: |
270 mfdict = mfl[repo[base].manifestnode()].read() |
269 mfdict = mfl[repo[base].manifestnode()].read() |
271 skip = set(pycompat.iteritems(mfdict)) |
270 skip = set(mfdict.items()) |
272 else: |
271 else: |
273 skip = set() |
272 skip = set() |
274 |
273 |
275 # Copy the skip set to start large and avoid constant resizing, |
274 # Copy the skip set to start large and avoid constant resizing, |
276 # and since it's likely to be very similar to the prefetch set. |
275 # and since it's likely to be very similar to the prefetch set. |
296 if p1 in visited and p2 in visited: |
295 if p1 in visited and p2 in visited: |
297 mfdict = mfl[mfnode].readfast() |
296 mfdict = mfl[mfnode].readfast() |
298 else: |
297 else: |
299 mfdict = mfl[mfnode].read() |
298 mfdict = mfl[mfnode].read() |
300 |
299 |
301 diff = pycompat.iteritems(mfdict) |
300 diff = mfdict.items() |
302 if pats: |
301 if pats: |
303 diff = (pf for pf in diff if m(pf[0])) |
302 diff = (pf for pf in diff if m(pf[0])) |
304 if sparsematch: |
303 if sparsematch: |
305 diff = (pf for pf in diff if sparsematch(pf[0])) |
304 diff = (pf for pf in diff if sparsematch(pf[0])) |
306 if rev not in localrevs: |
305 if rev not in localrevs: |