Show More
@@ -319,7 +319,11 b' def _wrapcmd(ui, cmd, table, wrapfn):' | |||||
319 | '''wrap the command''' |
|
319 | '''wrap the command''' | |
320 | def graph(orig, *args, **kwargs): |
|
320 | def graph(orig, *args, **kwargs): | |
321 | if kwargs['graph']: |
|
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 | return orig(*args, **kwargs) |
|
327 | return orig(*args, **kwargs) | |
324 | entry = extensions.wrapcommand(table, cmd, graph) |
|
328 | entry = extensions.wrapcommand(table, cmd, graph) | |
325 | entry[1].append(('G', 'graph', None, _("show the revision DAG"))) |
|
329 | entry[1].append(('G', 'graph', None, _("show the revision DAG"))) |
@@ -686,6 +686,11 b' Unused arguments:' | |||||
686 | show revision history alongside an ASCII revision graph |
|
686 | show revision history alongside an ASCII revision graph | |
687 | [255] |
|
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 | Empty revision range - display nothing: |
|
694 | Empty revision range - display nothing: | |
690 | $ hg glog -r 1..0 |
|
695 | $ hg glog -r 1..0 | |
691 |
|
696 |
General Comments 0
You need to be logged in to leave comments.
Login now