# HG changeset patch # User Benoit Boissinot # Date 1170113179 -3600 # Node ID 994fec0ee900a8901ea50998da729ed847b533f0 # Parent a8a8ecf909db17bcbbbc4eb36c7e70f622b0d09a mtime can be -1 after a merge and cause tracebacks on win32. Output "unset" instead. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -775,10 +775,16 @@ def debugstate(ui, repo): keys = dc.keys() keys.sort() for file_ in keys: + if dc[file_][3] == -1: + # Pad or slice to locale representation + locale_len = len(time.strftime("%x %X", time.localtime(0))) + timestr = 'unset' + timestr = timestr[:locale_len] + ' '*(locale_len - len(timestr)) + else: + timestr = time.strftime("%x %X", time.localtime(dc[file_][3])) ui.write("%c %3o %10d %s %s\n" % (dc[file_][0], dc[file_][1] & 0777, dc[file_][2], - time.strftime("%x %X", - time.localtime(dc[file_][3])), file_)) + timestr, file_)) for f in repo.dirstate.copies(): ui.write(_("copy: %s -> %s\n") % (repo.dirstate.copied(f), f))