diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1280,7 +1280,8 @@ """ opts = pycompat.byteskwargs(opts) rev = opts.get('rev') - repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn') + if rev: + repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn') ctx = scmutil.revsingle(repo, rev) m = scmutil.match(ctx, (file1,) + pats, opts) fntemplate = opts.pop('output', '')