Adds the checkout parser to the given subparsers object.
(subparsers, repo)
| 13 | |
| 14 | |
| 15 | def parser(subparsers, repo): |
| 16 | """Adds the checkout parser to the given subparsers object.""" |
| 17 | desc = 'checkout committed versions of files' |
| 18 | checkout_parser = subparsers.add_parser( |
| 19 | 'checkout', help=desc, description=desc.capitalize()) |
| 20 | checkout_parser.add_argument( |
| 21 | '-cp', '--commit-point', help=( |
| 22 | 'the commit point to checkout the files at. Defaults to HEAD.'), |
| 23 | dest='cp', default='HEAD') |
| 24 | checkout_parser.add_argument( |
| 25 | 'files', nargs='+', help='the file(s) to checkout', |
| 26 | action=helpers.PathProcessor, repo=repo, recursive=False) |
| 27 | checkout_parser.set_defaults(func=main) |
| 28 | |
| 29 | |
| 30 | def main(args, repo): |
nothing calls this directly
no outgoing calls
no test coverage detected