3 from bup import options
4 from bup.helpers import *
7 bup version [--date|--commit|--tag]
9 date display the date this version of bup was created
10 commit display the git commit id of this version of bup
11 tag display the tag name of this version. If no tag is available, display the commit id
13 o = options.Options(optspec)
14 (opt, flags, extra) = o.parse(sys.argv[1:])
17 total = (opt.date or 0) + (opt.commit or 0) + (opt.tag or 0)
19 o.fatal('at most one option expected')
24 print version_commit()