Show More
@@ -383,6 +383,13 b' def verifylfiles(ui, repo, all=False, co' | |||||
383 | store = basestore._openstore(repo) |
|
383 | store = basestore._openstore(repo) | |
384 | return store.verify(revs, contents=contents) |
|
384 | return store.verify(revs, contents=contents) | |
385 |
|
385 | |||
|
386 | def debugdirstate(ui, repo): | |||
|
387 | '''Show basic information for the largefiles dirstate''' | |||
|
388 | lfdirstate = lfutil.openlfdirstate(ui, repo) | |||
|
389 | for file_, ent in sorted(lfdirstate._map.iteritems()): | |||
|
390 | mode = '%3o' % (ent[1] & 0777 & ~util.umask) | |||
|
391 | ui.write("%c %s %10d %s\n" % (ent[0], mode, ent[2], file_)) | |||
|
392 | ||||
386 | def cachelfiles(ui, repo, node, filelist=None): |
|
393 | def cachelfiles(ui, repo, node, filelist=None): | |
387 | '''cachelfiles ensures that all largefiles needed by the specified revision |
|
394 | '''cachelfiles ensures that all largefiles needed by the specified revision | |
388 | are present in the repository's largefile cache. |
|
395 | are present in the repository's largefile cache. |
@@ -256,6 +256,13 b' def overrideverify(orig, ui, repo, *pats' | |||||
256 | result = result or lfcommands.verifylfiles(ui, repo, all, contents) |
|
256 | result = result or lfcommands.verifylfiles(ui, repo, all, contents) | |
257 | return result |
|
257 | return result | |
258 |
|
258 | |||
|
259 | def overridedebugstate(orig, ui, repo, *pats, **opts): | |||
|
260 | large = opts.pop('large', False) | |||
|
261 | if large: | |||
|
262 | lfcommands.debugdirstate(ui, repo) | |||
|
263 | else: | |||
|
264 | orig(ui, repo, *pats, **opts) | |||
|
265 | ||||
259 | # Override needs to refresh standins so that update's normal merge |
|
266 | # Override needs to refresh standins so that update's normal merge | |
260 | # will go through properly. Then the other update hook (overriding repo.update) |
|
267 | # will go through properly. Then the other update hook (overriding repo.update) | |
261 | # will get the new files. Filemerge is also overridden so that the merge |
|
268 | # will get the new files. Filemerge is also overridden so that the merge |
@@ -59,6 +59,11 b' def uisetup(ui):' | |||||
59 | _('verify largefile contents not just existence'))] |
|
59 | _('verify largefile contents not just existence'))] | |
60 | entry[1].extend(verifyopt) |
|
60 | entry[1].extend(verifyopt) | |
61 |
|
61 | |||
|
62 | entry = extensions.wrapcommand(commands.table, 'debugstate', | |||
|
63 | overrides.overridedebugstate) | |||
|
64 | debugstateopt = [('', 'large', None, _('display largefiles dirstate'))] | |||
|
65 | entry[1].extend(debugstateopt) | |||
|
66 | ||||
62 | entry = extensions.wrapcommand(commands.table, 'outgoing', |
|
67 | entry = extensions.wrapcommand(commands.table, 'outgoing', | |
63 | overrides.overrideoutgoing) |
|
68 | overrides.overrideoutgoing) | |
64 | outgoingopt = [('', 'large', None, _('display outgoing largefiles'))] |
|
69 | outgoingopt = [('', 'large', None, _('display outgoing largefiles'))] |
@@ -17,8 +17,8 b'' | |||||
17 | > EOF |
|
17 | > EOF | |
18 |
|
18 | |||
19 | Create the repo with a couple of revisions of both large and normal |
|
19 | Create the repo with a couple of revisions of both large and normal | |
20 | files, testing that status correctly shows largefiles and that summary output |
|
20 | files. | |
21 | is correct. |
|
21 | Test status and dirstate of largefiles and that summary output is correct. | |
22 |
|
22 | |||
23 | $ hg init a |
|
23 | $ hg init a | |
24 | $ cd a |
|
24 | $ cd a | |
@@ -35,6 +35,17 b' is correct.' | |||||
35 | A normal1 |
|
35 | A normal1 | |
36 | A sub/large2 |
|
36 | A sub/large2 | |
37 | A sub/normal2 |
|
37 | A sub/normal2 | |
|
38 | $ touch large1 sub/large2 | |||
|
39 | $ sleep 1 | |||
|
40 | $ hg st | |||
|
41 | $ hg debugstate --nodates | |||
|
42 | n 644 41 .hglf/large1 | |||
|
43 | n 644 41 .hglf/sub/large2 | |||
|
44 | n 644 8 normal1 | |||
|
45 | n 644 8 sub/normal2 | |||
|
46 | $ hg debugstate --large | |||
|
47 | n 644 7 large1 | |||
|
48 | n 644 7 sub/large2 | |||
38 | $ echo normal11 > normal1 |
|
49 | $ echo normal11 > normal1 | |
39 | $ echo normal22 > sub/normal2 |
|
50 | $ echo normal22 > sub/normal2 | |
40 | $ echo large11 > large1 |
|
51 | $ echo large11 > large1 |
General Comments 0
You need to be logged in to leave comments.
Login now