7 |
7 |
8 from node import * |
8 from node import * |
9 from i18n import _ |
9 from i18n import _ |
10 import repo, changegroup |
10 import repo, changegroup |
11 import changelog, dirstate, filelog, manifest, context, weakref |
11 import changelog, dirstate, filelog, manifest, context, weakref |
12 import re, lock, transaction, tempfile, stat, mdiff, errno, ui |
12 import re, lock, transaction, tempfile, stat, errno, ui |
13 import os, revlog, time, util, extensions, hook |
13 import os, revlog, time, util, extensions, hook |
14 |
14 |
15 class localrepository(repo.repository): |
15 class localrepository(repo.repository): |
16 capabilities = ('lookup', 'changegroupsubset') |
16 capabilities = ('lookup', 'changegroupsubset') |
17 supported = ('revlogv1', 'store') |
17 supported = ('revlogv1', 'store') |
1613 def collect_msng_filenodes(mnfstnode): |
1613 def collect_msng_filenodes(mnfstnode): |
1614 r = mnfst.rev(mnfstnode) |
1614 r = mnfst.rev(mnfstnode) |
1615 if r == next_rev[0]: |
1615 if r == next_rev[0]: |
1616 # If the last rev we looked at was the one just previous, |
1616 # If the last rev we looked at was the one just previous, |
1617 # we only need to see a diff. |
1617 # we only need to see a diff. |
1618 delta = mdiff.patchtext(mnfst.delta(mnfstnode)) |
1618 deltamf = mnfst.readdelta(mnfstnode) |
1619 # For each line in the delta |
1619 # For each line in the delta |
1620 for dline in delta.splitlines(): |
1620 for f, fnode in deltamf.items(): |
1621 # get the filename and filenode for that line |
|
1622 f, fnode = dline.split('\0') |
|
1623 fnode = bin(fnode[:40]) |
|
1624 f = changedfiles.get(f, None) |
1621 f = changedfiles.get(f, None) |
1625 # And if the file is in the list of files we care |
1622 # And if the file is in the list of files we care |
1626 # about. |
1623 # about. |
1627 if f is not None: |
1624 if f is not None: |
1628 # Get the changenode this manifest belongs to |
1625 # Get the changenode this manifest belongs to |