# HG changeset patch # User Mads Kiilerich # Date 1367097592 -7200 # Node ID e095626e8676580b705161dc2c5394b867f3add7 # Parent 3fb2affb023f4872ad424a688c524df4af79e946 largefiles: full debugdirstate functionality for largefiles - just reusing the original command with a mockup repo. This makes it possible to see dates in the lfdirstate and gives less code duplication. diff -r 3fb2affb023f -r e095626e8676 hgext/largefiles/lfcommands.py --- a/hgext/largefiles/lfcommands.py Sat Apr 27 23:19:52 2013 +0200 +++ b/hgext/largefiles/lfcommands.py Sat Apr 27 23:19:52 2013 +0200 @@ -375,13 +375,6 @@ store = basestore._openstore(repo) return store.verify(revs, contents=contents) -def debugdirstate(ui, repo): - '''Show basic information for the largefiles dirstate''' - lfdirstate = lfutil.openlfdirstate(ui, repo) - for file_, ent in sorted(lfdirstate._map.iteritems()): - mode = '%3o' % (ent[1] & 0777 & ~util.umask) - ui.write("%c %s %10d %s\n" % (ent[0], mode, ent[2], file_)) - def cachelfiles(ui, repo, node, filelist=None): '''cachelfiles ensures that all largefiles needed by the specified revision are present in the repository's largefile cache. diff -r 3fb2affb023f -r e095626e8676 hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py Sat Apr 27 23:19:52 2013 +0200 +++ b/hgext/largefiles/overrides.py Sat Apr 27 23:19:52 2013 +0200 @@ -286,7 +286,9 @@ def overridedebugstate(orig, ui, repo, *pats, **opts): large = opts.pop('large', False) if large: - lfcommands.debugdirstate(ui, repo) + class fakerepo(object): + dirstate = lfutil.openlfdirstate(ui, repo) + orig(ui, fakerepo, *pats, **opts) else: orig(ui, repo, *pats, **opts) diff -r 3fb2affb023f -r e095626e8676 tests/test-largefiles.t --- a/tests/test-largefiles.t Sat Apr 27 23:19:52 2013 +0200 +++ b/tests/test-largefiles.t Sat Apr 27 23:19:52 2013 +0200 @@ -43,7 +43,7 @@ n 644 41 .hglf/sub/large2 n 644 8 normal1 n 644 8 sub/normal2 - $ hg debugstate --large + $ hg debugstate --large --nodates n 644 7 large1 n 644 7 sub/large2 $ echo normal11 > normal1