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

login
register
mail settings
Submitter Mads Kiilerich
Date Jan. 10, 2015, 12:50 a.m.
Message ID <2fc589aaa62b18359934.1420851010@ssl.google-analytics.com>
Download mbox | patch
Permalink /patch/7408/
State Accepted
Headers show

Comments

Mads Kiilerich - Jan. 10, 2015, 12:50 a.m.
# HG changeset patch
# User Mads Kiilerich <madski@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

Patch

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]))