##// END OF EJS Templates
commands: check for empty rev before passing to scmutil.unhidehashlikerevs...
Pulkit Goyal -
r35535:ba0fb0e3 default
parent child Browse files
Show More
@@ -1280,7 +1280,8 b' def cat(ui, repo, file1, *pats, **opts):'
1280 """
1280 """
1281 opts = pycompat.byteskwargs(opts)
1281 opts = pycompat.byteskwargs(opts)
1282 rev = opts.get('rev')
1282 rev = opts.get('rev')
1283 repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn')
1283 if rev:
1284 repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn')
1284 ctx = scmutil.revsingle(repo, rev)
1285 ctx = scmutil.revsingle(repo, rev)
1285 m = scmutil.match(ctx, (file1,) + pats, opts)
1286 m = scmutil.match(ctx, (file1,) + pats, opts)
1286 fntemplate = opts.pop('output', '')
1287 fntemplate = opts.pop('output', '')
@@ -1995,7 +1996,8 b' def files(ui, repo, *pats, **opts):'
1995
1996
1996 opts = pycompat.byteskwargs(opts)
1997 opts = pycompat.byteskwargs(opts)
1997 rev = opts.get('rev')
1998 rev = opts.get('rev')
1998 repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn')
1999 if rev:
2000 repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn')
1999 ctx = scmutil.revsingle(repo, rev, None)
2001 ctx = scmutil.revsingle(repo, rev, None)
2000
2002
2001 end = '\n'
2003 end = '\n'
@@ -2779,7 +2781,8 b' def identify(ui, repo, source=None, rev='
2779 fm.data(node=hex(remoterev))
2781 fm.data(node=hex(remoterev))
2780 fm.data(bookmarks=fm.formatlist(bms, name='bookmark'))
2782 fm.data(bookmarks=fm.formatlist(bms, name='bookmark'))
2781 else:
2783 else:
2782 repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn')
2784 if rev:
2785 repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn')
2783 ctx = scmutil.revsingle(repo, rev, None)
2786 ctx = scmutil.revsingle(repo, rev, None)
2784
2787
2785 if ctx.rev() is None:
2788 if ctx.rev() is None:
@@ -3513,7 +3516,8 b' def manifest(ui, repo, node=None, rev=No'
3513
3516
3514 char = {'l': '@', 'x': '*', '': ''}
3517 char = {'l': '@', 'x': '*', '': ''}
3515 mode = {'l': '644', 'x': '755', '': '644'}
3518 mode = {'l': '644', 'x': '755', '': '644'}
3516 repo = scmutil.unhidehashlikerevs(repo, [node], 'nowarn')
3519 if node:
3520 repo = scmutil.unhidehashlikerevs(repo, [node], 'nowarn')
3517 ctx = scmutil.revsingle(repo, node)
3521 ctx = scmutil.revsingle(repo, node)
3518 mf = ctx.manifest()
3522 mf = ctx.manifest()
3519 ui.pager('manifest')
3523 ui.pager('manifest')
@@ -3702,7 +3706,8 b' def parents(ui, repo, file_=None, **opts'
3702
3706
3703 opts = pycompat.byteskwargs(opts)
3707 opts = pycompat.byteskwargs(opts)
3704 rev = opts.get('rev')
3708 rev = opts.get('rev')
3705 repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn')
3709 if rev:
3710 repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn')
3706 ctx = scmutil.revsingle(repo, rev, None)
3711 ctx = scmutil.revsingle(repo, rev, None)
3707
3712
3708 if file_:
3713 if file_:
General Comments 0
You need to be logged in to leave comments. Login now