annotate: show full changeset hash when invoked with --debug and -c
authorIon Savin <comp_@gmx.net>
Fri, 09 Dec 2011 14:14:30 +0200
changeset 15631 e5fd140a4e69
parent 15630 e6868bd17f24
child 15643 4fbd0eeeb52c
annotate: show full changeset hash when invoked with --debug and -c
mercurial/commands.py
--- a/mercurial/commands.py	Fri Dec 09 17:58:12 2011 +0100
+++ 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])),