diff --git a/hgext3rd/rage.py b/hgext3rd/rage.py --- a/hgext3rd/rage.py +++ b/hgext3rd/rage.py @@ -30,6 +30,11 @@ ) import os, socket, re, tempfile, time, traceback +from remotefilelog import ( + constants, + shallowutil +) + cmdtable = {} command = registrar.command(cmdtable) @@ -228,6 +233,24 @@ ('hg config (all)', _failsafe(lambda: hgcmd(commands.config))), ] + if util.safehasattr(repo, 'name'): + # Add the contents of both local and shared pack directories. + packlocs = { + 'local': lambda category: shallowutil.getlocalpackpath( + repo.svfs.vfs.base, category), + 'shared': lambda category: shallowutil.getcachepackpath(repo, + category), + } + + for loc, getpath in packlocs.iteritems(): + for category in constants.ALL_CATEGORIES: + path = getpath(category) + detailed.append(( + "%s packs (%s)" % (loc, constants.getunits(category)), + "%s:\n%s" % + (path, _failsafe(lambda: shcmd("ls -lh %s" % path))) + )) + # This is quite slow, so we don't want to do it by default if ui.configbool("rage", "fastmanifestcached", False): detailed.append( diff --git a/remotefilelog/constants.py b/remotefilelog/constants.py --- a/remotefilelog/constants.py +++ b/remotefilelog/constants.py @@ -19,6 +19,8 @@ FILEPACK_CATEGORY="" TREEPACK_CATEGORY="manifests" +ALL_CATEGORIES = [FILEPACK_CATEGORY, TREEPACK_CATEGORY] + # revision metadata keys. must be a single character. METAKEYFLAG = 'f' # revlog flag METAKEYSIZE = 's' # full rawtext size