##// END OF EJS Templates
graphlog: give meaningful error if more than one file is given
Klaus Koch -
r13631:29c800ee stable
parent child Browse files
Show More
@@ -319,7 +319,11 b' def _wrapcmd(ui, cmd, table, wrapfn):'
319 319 '''wrap the command'''
320 320 def graph(orig, *args, **kwargs):
321 321 if kwargs['graph']:
322 return wrapfn(*args, **kwargs)
322 try:
323 return wrapfn(*args, **kwargs)
324 except TypeError, e:
325 if len(args) > wrapfn.func_code.co_argcount:
326 raise util.Abort(_('--graph option allows at most one file'))
323 327 return orig(*args, **kwargs)
324 328 entry = extensions.wrapcommand(table, cmd, graph)
325 329 entry[1].append(('G', 'graph', None, _("show the revision DAG")))
@@ -686,6 +686,11 b' Unused arguments:'
686 686 show revision history alongside an ASCII revision graph
687 687 [255]
688 688
689 Only one file is allowed:
690 $ hg log -G foo bar
691 abort: --graph option allows at most one file
692 [255]
693
689 694 Empty revision range - display nothing:
690 695 $ hg glog -r 1..0
691 696
General Comments 0
You need to be logged in to leave comments. Login now