594 if state not in "nrm": |
594 if state not in "nrm": |
595 ui.warn("%s in manifest1, but listed as state %s" % (f, state)) |
595 ui.warn("%s in manifest1, but listed as state %s" % (f, state)) |
596 errors += 1 |
596 errors += 1 |
597 if errors: |
597 if errors: |
598 raise util.Abort(".hg/dirstate inconsistent with current parent's manifest") |
598 raise util.Abort(".hg/dirstate inconsistent with current parent's manifest") |
|
599 |
|
600 def debugconfig(ui): |
|
601 try: |
|
602 repo = hg.repository(ui) |
|
603 except: pass |
|
604 for section, name, value in ui.walkconfig(): |
|
605 ui.write('%s.%s=%s\n' % (section, name, value)) |
599 |
606 |
600 def debugstate(ui, repo): |
607 def debugstate(ui, repo): |
601 """show the contents of the current dirstate""" |
608 """show the contents of the current dirstate""" |
602 repo.dirstate.read() |
609 repo.dirstate.read() |
603 dc = repo.dirstate.map |
610 dc = repo.dirstate.map |
1306 ('d', 'date', "", 'date code'), |
1313 ('d', 'date', "", 'date code'), |
1307 ('u', 'user', "", 'user')], |
1314 ('u', 'user', "", 'user')], |
1308 'hg commit [OPTION]... [FILE]...'), |
1315 'hg commit [OPTION]... [FILE]...'), |
1309 "copy": (copy, [], 'hg copy SOURCE DEST'), |
1316 "copy": (copy, [], 'hg copy SOURCE DEST'), |
1310 "debugcheckstate": (debugcheckstate, [], 'debugcheckstate'), |
1317 "debugcheckstate": (debugcheckstate, [], 'debugcheckstate'), |
|
1318 "debugconfig": (debugconfig, [], 'debugconfig'), |
1311 "debugstate": (debugstate, [], 'debugstate'), |
1319 "debugstate": (debugstate, [], 'debugstate'), |
1312 "debugindex": (debugindex, [], 'debugindex FILE'), |
1320 "debugindex": (debugindex, [], 'debugindex FILE'), |
1313 "debugindexdot": (debugindexdot, [], 'debugindexdot FILE'), |
1321 "debugindexdot": (debugindexdot, [], 'debugindexdot FILE'), |
1314 "debugwalk": |
1322 "debugwalk": |
1315 (debugwalk, |
1323 (debugwalk, |
1444 ('y', 'noninteractive', None, 'run non-interactively'), |
1452 ('y', 'noninteractive', None, 'run non-interactively'), |
1445 ('', 'version', None, 'output version information and exit'), |
1453 ('', 'version', None, 'output version information and exit'), |
1446 ('', 'time', None, 'time how long the command takes'), |
1454 ('', 'time', None, 'time how long the command takes'), |
1447 ] |
1455 ] |
1448 |
1456 |
1449 norepo = "clone init version help debugindex debugindexdot paths" |
1457 norepo = "clone init version help debugconfig debugindex debugindexdot paths" |
1450 |
1458 |
1451 def find(cmd): |
1459 def find(cmd): |
1452 for e in table.keys(): |
1460 for e in table.keys(): |
1453 if re.match("(%s)$" % e, cmd): |
1461 if re.match("(%s)$" % e, cmd): |
1454 return e, table[e] |
1462 return e, table[e] |