diff -r 0d37b9b21467 -r f4412380d357 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Wed Jul 08 16:19:09 2015 -0700 +++ b/mercurial/cmdutil.py Sat Jul 04 17:19:49 2015 +0900 @@ -5,7 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -from node import hex, nullid, nullrev, short +from node import hex, bin, nullid, nullrev, short from i18n import _ import os, sys, errno, re, tempfile, cStringIO, shutil import util, scmutil, templater, patch, error, templatekw, revlog, copies @@ -1152,11 +1152,9 @@ hexfunc = hex else: hexfunc = short - if rev is None: - pctx = ctx.p1() - revnode = (pctx.rev(), hexfunc(pctx.node()) + '+') - else: - revnode = (rev, hexfunc(changenode)) + # as of now, wctx.node() and wctx.rev() return None, but we want to + # show the same values as {node} and {rev} templatekw + revnode = (scmutil.intrev(rev), hexfunc(bin(ctx.hex()))) if self.ui.quiet: self.ui.write("%d:%s\n" % revnode, label='log.node')