1 from __future__
import division
, absolute_import
, unicode_literals
6 from cola
.widgets
.dag
import git_dag
12 args
= parse_args(argv
=argv
)
13 return args
.func(args
)
17 """Windows git-dag entrypoint"""
18 return app
.winmain(main
)
21 def shortcut_launch():
22 """Run git-dag from a Windows shortcut"""
23 return app
.winmain(main
, ['--prompt'])
26 def parse_args(argv
=None):
27 """Parse command-line arguments"""
30 parser
= argparse
.ArgumentParser()
31 parser
.set_defaults(func
=cmd_dag
)
33 app
.add_common_arguments(parser
)
41 help='number of commits to display',
43 parser
.add_argument('args', nargs
='*', metavar
='<args>', help='git log arguments')
44 args
, rest
= parser
.parse_known_args(args
=argv
)
46 # splice unknown arguments to the beginning ~
47 # these are forwarded to git-log(1).
53 """Run git-dag via the `git cola dag` sub-command"""
54 context
= app
.application_init(args
)
55 view
= git_dag(context
, args
=args
, show
=False)
56 return app
.application_start(context
, view
)