[PATCH 1 of 2] log: remove temporary variable 'date' used only once

Yuya Nishihara yuya at tcha.org
Sat Dec 2 08:38:30 UTC 2017


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1512198504 -32400
#      Sat Dec 02 16:08:24 2017 +0900
# Node ID 4993ee3a629b9b5699b9cf15626827be07b00c90
# Parent  bfd072c52e03cc14bd2b36bd982c15b5029e6fa8
log: remove temporary variable 'date' used only once

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -1610,8 +1610,6 @@ class changeset_printer(object):
                           label='log.node')
             return
 
-        date = util.datestr(ctx.date())
-
         # i18n: column positioning for "hg log"
         self.ui.write(_("changeset:   %s\n") % scmutil.formatchangeid(ctx),
                       label=_changesetlabels(ctx))
@@ -1656,7 +1654,7 @@ class changeset_printer(object):
         self.ui.write(_("user:        %s\n") % ctx.user(),
                       label='log.user')
         # i18n: column positioning for "hg log"
-        self.ui.write(_("date:        %s\n") % date,
+        self.ui.write(_("date:        %s\n") % util.datestr(ctx.date()),
                       label='log.date')
 
         if ctx.isunstable():


More information about the Mercurial-devel mailing list