[PATCH 1 of 3] debugdirstate: simplify date handling after e7ed5d07cc4c used fixed format

Mads Kiilerich mads at kiilerich.com
Sat Jan 10 00:50:10 UTC 2015


# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1420825082 -3600
#      Fri Jan 09 18:38:02 2015 +0100
# Node ID 2fc589aaa62b1835993454c3eee223a8cd0da9d1
# Parent  678f53865c6860a950392691814766957ee89316
debugdirstate: simplify date handling after e7ed5d07cc4c used fixed format

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2895,12 +2895,7 @@ def debugstate(ui, repo, nodates=None, d
     for file_, ent in sorted(repo.dirstate._map.iteritems(), key=keyfunc):
         if showdate:
             if ent[3] == -1:
-                # Pad or slice to locale representation
-                locale_len = len(time.strftime("%Y-%m-%d %H:%M:%S ",
-                                               time.localtime(0)))
-                timestr = 'unset'
-                timestr = (timestr[:locale_len] +
-                           ' ' * (locale_len - len(timestr)))
+                timestr = 'unset               '
             else:
                 timestr = time.strftime("%Y-%m-%d %H:%M:%S ",
                                         time.localtime(ent[3]))


More information about the Mercurial-devel mailing list