diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2774,8 +2774,7 @@ def identify(ui, repo, source=None, rev= ('+'.join([hexfunc(p.node()) for p in parents]), changed)] if num: output.append("%s%s" % - ('+'.join([pycompat.bytestr(p.rev()) for p in parents]), - changed)) + ('+'.join(["%d" % p.rev() for p in parents]), changed)) else: if default or id: output = [hexfunc(ctx.node())] diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py --- a/mercurial/templatekw.py +++ b/mercurial/templatekw.py @@ -623,7 +623,7 @@ def showparents(**args): ctx = args['ctx'] pctxs = scmutil.meaningfulparents(repo, ctx) # ifcontains() needs a list of str - prevs = [pycompat.bytestr(p.rev()) for p in pctxs] + prevs = ["%d" % p.rev() for p in pctxs] parents = [[('rev', p.rev()), ('node', p.hex()), ('phase', p.phasestr())] @@ -653,7 +653,7 @@ def showrevslist(name, revs, **args): args = pycompat.byteskwargs(args) repo = args['ctx'].repo() # ifcontains() needs a list of str - revs = [pycompat.bytestr(r) for r in revs] + revs = ["%d" % r for r in revs] f = _showlist(name, revs, args) return _hybrid(f, revs, lambda x: {name: x, 'ctx': repo[int(x)], 'revcache': {}},