comparison mercurial/commands.py @ 8812:859f841937d0

subrepo: introduce basic state parsing
author Matt Mackall <mpm@selenic.com>
date Mon, 15 Jun 2009 02:45:38 -0500
parents ac92775b3b80
children e87b0fc4750b
comparison
equal deleted inserted replaced
8811:8b35b08724eb 8812:859f841937d0
854 else: 854 else:
855 mode = '%3o' % (ent[1] & 0777) 855 mode = '%3o' % (ent[1] & 0777)
856 ui.write("%c %s %10d %s%s\n" % (ent[0], mode, ent[2], timestr, file_)) 856 ui.write("%c %s %10d %s%s\n" % (ent[0], mode, ent[2], timestr, file_))
857 for f in repo.dirstate.copies(): 857 for f in repo.dirstate.copies():
858 ui.write(_("copy: %s -> %s\n") % (repo.dirstate.copied(f), f)) 858 ui.write(_("copy: %s -> %s\n") % (repo.dirstate.copied(f), f))
859
860 def debugsub(ui, repo, rev=None):
861 if rev == '':
862 rev = None
863 for k,v in sorted(repo[rev].substate.items()):
864 ui.write('path %s\n' % k)
865 ui.write(' source %s\n' % v[0])
866 ui.write(' revision %s\n' % v[1])
859 867
860 def debugdata(ui, file_, rev): 868 def debugdata(ui, file_, rev):
861 """dump the contents of a data file revision""" 869 """dump the contents of a data file revision"""
862 r = revlog.revlog(util.opener(os.getcwd(), audit=False), file_[:-2] + ".i") 870 r = revlog.revlog(util.opener(os.getcwd(), audit=False), file_[:-2] + ".i")
863 try: 871 try:
3226 (debugsetparents, [], _('REV1 [REV2]')), 3234 (debugsetparents, [], _('REV1 [REV2]')),
3227 "debugstate": 3235 "debugstate":
3228 (debugstate, 3236 (debugstate,
3229 [('', 'nodates', None, _('do not display the saved mtime'))], 3237 [('', 'nodates', None, _('do not display the saved mtime'))],
3230 _('[OPTION]...')), 3238 _('[OPTION]...')),
3239 "debugsub":
3240 (debugsub,
3241 [('r', 'rev', '', _('revision to check'))],
3242 _('[-r REV] [REV]')),
3231 "debugwalk": (debugwalk, walkopts, _('[OPTION]... [FILE]...')), 3243 "debugwalk": (debugwalk, walkopts, _('[OPTION]... [FILE]...')),
3232 "^diff": 3244 "^diff":
3233 (diff, 3245 (diff,
3234 [('r', 'rev', [], _('revision')), 3246 [('r', 'rev', [], _('revision')),
3235 ('c', 'change', '', _('change made by revision')) 3247 ('c', 'change', '', _('change made by revision'))