mercurial/commands.py
changeset 1053 1539ca091d86
parent 1052 d8279ca39dc7
child 1054 5139ee9bfc38
equal deleted inserted replaced
1052:d8279ca39dc7 1053:1539ca091d86
   593             errors += 1
   593             errors += 1
   594     if errors:
   594     if errors:
   595         raise util.Abort(".hg/dirstate inconsistent with current parent's manifest")
   595         raise util.Abort(".hg/dirstate inconsistent with current parent's manifest")
   596 
   596 
   597 def debugconfig(ui):
   597 def debugconfig(ui):
       
   598     """show combined config settings from all hgrc files"""
   598     try:
   599     try:
   599         repo = hg.repository(ui)
   600         repo = hg.repository(ui)
   600     except: pass
   601     except: pass
   601     for section, name, value in ui.walkconfig():
   602     for section, name, value in ui.walkconfig():
   602         ui.write('%s.%s=%s\n' % (section, name, value))
   603         ui.write('%s.%s=%s\n' % (section, name, value))
   639         if e[5] != hg.nullid:
   640         if e[5] != hg.nullid:
   640             ui.write("\t%d -> %d\n" % (r.rev(e[5]), i))
   641             ui.write("\t%d -> %d\n" % (r.rev(e[5]), i))
   641     ui.write("}\n")
   642     ui.write("}\n")
   642 
   643 
   643 def debugwalk(ui, repo, *pats, **opts):
   644 def debugwalk(ui, repo, *pats, **opts):
       
   645     """show how files match on given patterns"""
   644     items = list(walk(repo, pats, opts))
   646     items = list(walk(repo, pats, opts))
   645     if not items: return
   647     if not items: return
   646     fmt = '%%s  %%-%ds  %%-%ds  %%s' % (
   648     fmt = '%%s  %%-%ds  %%-%ds  %%s' % (
   647         max([len(abs) for (src, abs, rel, exact) in items]),
   649         max([len(abs) for (src, abs, rel, exact) in items]),
   648         max([len(rel) for (src, abs, rel, exact) in items]))
   650         max([len(rel) for (src, abs, rel, exact) in items]))