diff hgext/largefiles/lfcommands.py @ 18144:e16982a74bf7

largefiles: introduce basic debugstate --large functionality Very useful for debugging largefiles "performance" issues. This is used for testing 03faf12fbee7.
author Mads Kiilerich <madski@unity3d.com>
date Fri, 28 Dec 2012 11:55:57 +0100
parents 0fc1ce271ee6
children 65cec7fa5472
line wrap: on
line diff
--- a/hgext/largefiles/lfcommands.py	Fri Dec 28 11:55:57 2012 +0100
+++ b/hgext/largefiles/lfcommands.py	Fri Dec 28 11:55:57 2012 +0100
@@ -383,6 +383,13 @@
     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.