Show More
@@ -1340,11 +1340,15 b' def debugsetparents(ui, repo, rev1, rev2' | |||
|
1340 | 1340 | finally: |
|
1341 | 1341 | wlock.release() |
|
1342 | 1342 | |
|
1343 | def debugstate(ui, repo, nodates=None): | |
|
1343 | def debugstate(ui, repo, nodates=None, datesort=None): | |
|
1344 | 1344 | """show the contents of the current dirstate""" |
|
1345 | 1345 | timestr = "" |
|
1346 | 1346 | showdate = not nodates |
|
1347 | for file_, ent in sorted(repo.dirstate._map.iteritems()): | |
|
1347 | if datesort: | |
|
1348 | keyfunc = lambda x: (x[1][3], x[0]) # sort by mtime, then by filename | |
|
1349 | else: | |
|
1350 | keyfunc = None # sort by filename | |
|
1351 | for file_, ent in sorted(repo.dirstate._map.iteritems(), key=keyfunc): | |
|
1348 | 1352 | if showdate: |
|
1349 | 1353 | if ent[3] == -1: |
|
1350 | 1354 | # Pad or slice to locale representation |
@@ -4512,7 +4516,8 b' table = {' | |||
|
4512 | 4516 | (debugsetparents, [], _('REV1 [REV2]')), |
|
4513 | 4517 | "debugstate": |
|
4514 | 4518 | (debugstate, |
|
4515 |
[('', 'nodates', None, _('do not display the saved mtime')) |
|
|
4519 | [('', 'nodates', None, _('do not display the saved mtime')), | |
|
4520 | ('', 'datesort', None, _('sort by saved mtime'))], | |
|
4516 | 4521 | _('[OPTION]...')), |
|
4517 | 4522 | "debugsub": |
|
4518 | 4523 | (debugsub, |
General Comments 0
You need to be logged in to leave comments.
Login now