--- a/mercurial/commands.py Wed Dec 06 12:45:27 2006 -0600
+++ b/mercurial/commands.py Wed Dec 06 13:13:25 2006 -0600
@@ -788,6 +788,12 @@
except KeyError:
raise util.Abort(_('invalid revision identifier %s') % rev)
+def debugdate(ui, date):
+ """parse and display a date"""
+ d = util.parsedate(date)
+ ui.write("internal: %s %s\n" % d)
+ ui.write("standard: %s\n" % util.datestr(d))
+
def debugindex(ui, file_):
"""dump the contents of an index file"""
r = revlog.revlog(util.opener(os.getcwd(), audit=False), file_, "", 0)
@@ -2477,6 +2483,7 @@
"debugcheckstate": (debugcheckstate, [], _('debugcheckstate')),
"debugsetparents": (debugsetparents, [], _('debugsetparents REV1 [REV2]')),
"debugstate": (debugstate, [], _('debugstate')),
+ "debugdate": (debugdate, [], _('debugdata DATE')),
"debugdata": (debugdata, [], _('debugdata FILE REV')),
"debugindex": (debugindex, [], _('debugindex FILE')),
"debugindexdot": (debugindexdot, [], _('debugindexdot FILE')),
@@ -2727,7 +2734,7 @@
}
norepo = ("clone init version help debugancestor debugcomplete debugdata"
- " debugindex debugindexdot")
+ " debugindex debugindexdot debugdate")
optionalrepo = ("paths serve showconfig")
def findpossible(ui, cmd):