5 from cola
.widgets
.dag
import git_dag
11 args
= parse_args(argv
=argv
)
12 return args
.func(args
)
15 def shortcut_launch():
16 """Run git-dag from a Windows shortcut"""
17 return main(argv
=['--prompt'])
20 def parse_args(argv
=None):
21 """Parse command-line arguments"""
24 parser
= argparse
.ArgumentParser()
25 parser
.set_defaults(func
=cmd_dag
)
27 app
.add_common_arguments(parser
)
35 help='number of commits to display',
38 'args', nargs
=argparse
.REMAINDER
, metavar
='<args>', help='git log arguments'
40 args
, rest
= parser
.parse_known_args(args
=argv
)
42 # splice unknown arguments to the beginning ~
43 # these are forwarded to git-log(1).
49 """Run git-dag via the `git cola dag` sub-command"""
50 context
= app
.application_init(args
)
51 view
= git_dag(context
, args
=args
, show
=False)
52 return app
.application_start(context
, view
)