Adds the commit parser to the given subparsers object.
(subparsers, repo)
| 23 | |
| 24 | |
| 25 | def parser(subparsers, repo): |
| 26 | """Adds the commit parser to the given subparsers object.""" |
| 27 | desc = 'save changes to the local repository' |
| 28 | commit_parser = subparsers.add_parser( |
| 29 | 'commit', help=desc, description=( |
| 30 | desc.capitalize() + '. ' + |
| 31 | 'By default all tracked modified files are committed. To customize the' |
| 32 | ' set of files to be committed use the only, exclude, and include ' |
| 33 | 'flags')) |
| 34 | commit_parser.add_argument( |
| 35 | '-m', '--message', help='Commit message', dest='m') |
| 36 | commit_parser.add_argument( |
| 37 | '-p', '--partial', |
| 38 | help='Interactively select segments of files to commit', dest='p', |
| 39 | action='store_true') |
| 40 | helpers.oei_flags(commit_parser, repo) |
| 41 | commit_parser.set_defaults(func=main) |
| 42 | |
| 43 | |
| 44 | def main(args, repo): |
nothing calls this directly
no outgoing calls
no test coverage detected