[PATCH] annotate - show full changeset hash when invoked with --debug (and -c)

Ion Savin comp_ at gmx.net
Fri Dec 9 06:43:37 CST 2011


# HG changeset patch
# User Ion Savin <comp_ at gmx.net>
# Date 1323432870 -7200
# Node ID 0e08c2f44cc70249bbe88a32dc4f76c5d0b50a86
# Parent  fc8c7a5ccc4a928e7559013ecdf50462c271418c
annotate - show full changeset hash when invoked with --debug (and -c)

diff -r fc8c7a5ccc4a -r 0e08c2f44cc7 mercurial/commands.py
--- a/mercurial/commands.py     Thu Dec 08 16:01:44 2011 -0600
+++ b/mercurial/commands.py     Fri Dec 09 14:14:30 2011 +0200
@@ -248,9 +248,11 @@
     if not pats:
         raise util.Abort(_('at least one filename or pattern is required'))
 
+    hexfn = ui.debugflag and hex or short
+
     opmap = [('user', ' ', lambda x: ui.shortuser(x[0].user())),
              ('number', ' ', lambda x: str(x[0].rev())),
-             ('changeset', ' ', lambda x: short(x[0].node())),
+             ('changeset', ' ', lambda x: hexfn(x[0].node())),
              ('date', ' ', getdate),
              ('file', ' ', lambda x: x[0].path()),
              ('line_number', ':', lambda x: str(x[1])),
-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!		
Jetzt informieren: http://www.gmx.net/de/go/freephone


More information about the Mercurial-devel mailing list