Comments
Patch
@@ -268,13 +268,16 @@ def annotate(ui, repo, *pats, **opts):
# to mimic the behavior of Mercurial before version 1.5
opts['file'] = True
+ if ui.debugflag:
+ getchangeset = lambda x: x[0].hex()
+ else:
+ getchangeset = lambda x: str(x[0].changectx())
datefunc = ui.quiet and util.shortdate or util.datestr
getdate = util.cachefunc(lambda x: datefunc(x[0].date()))
- 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: hexfn(x[0].node())),
+ ('changeset', ' ', getchangeset),
('date', ' ', getdate),
('file', ' ', lambda x: x[0].path()),
('line_number', ':', lambda x: str(x[1])),
@@ -16,6 +16,9 @@ annotate -c
$ hg annotate -c a
8435f90966e4: a
+ $ hg annotate --debug -c a
+ 8435f90966e442695d2ded29fdade2bac5ad8065: a
+
annotate -cl
$ hg annotate -cl a