3160 |
3160 |
3161 @command('debugdirstate|debugstate', |
3161 @command('debugdirstate|debugstate', |
3162 [('', 'nodates', None, _('do not display the saved mtime')), |
3162 [('', 'nodates', None, _('do not display the saved mtime')), |
3163 ('', 'datesort', None, _('sort by saved mtime'))], |
3163 ('', 'datesort', None, _('sort by saved mtime'))], |
3164 _('[OPTION]...')) |
3164 _('[OPTION]...')) |
3165 def debugstate(ui, repo, nodates=None, datesort=None): |
3165 def debugstate(ui, repo, **opts): |
3166 """show the contents of the current dirstate""" |
3166 """show the contents of the current dirstate""" |
|
3167 |
|
3168 nodates = opts.get('nodates') |
|
3169 datesort = opts.get('datesort') |
|
3170 |
3167 timestr = "" |
3171 timestr = "" |
3168 if datesort: |
3172 if datesort: |
3169 keyfunc = lambda x: (x[1][3], x[0]) # sort by mtime, then by filename |
3173 keyfunc = lambda x: (x[1][3], x[0]) # sort by mtime, then by filename |
3170 else: |
3174 else: |
3171 keyfunc = None # sort by filename |
3175 keyfunc = None # sort by filename |