(subparsers, repo)
| 13 | |
| 14 | |
| 15 | def parser(subparsers, repo): |
| 16 | desc = 'fuse the divergent changes of a branch onto the current branch' |
| 17 | fuse_parser = subparsers.add_parser( |
| 18 | 'fuse', help=desc, description=( |
| 19 | desc.capitalize() + '. ' + |
| 20 | 'By default all divergent changes from the given source branch are ' |
| 21 | 'fused. To customize the set of commits to fuse use the only and ' |
| 22 | 'exclude flags')) |
| 23 | fuse_parser.add_argument( |
| 24 | 'src', nargs='?', |
| 25 | help=( |
| 26 | 'the source branch to read changes from. If none is given the upstream ' |
| 27 | 'branch of the current branch is used as the source')) |
| 28 | fuse_parser.add_argument( |
| 29 | '-o', '--only', nargs='+', |
| 30 | help=( |
| 31 | 'fuse only the commits given (commits must belong to the set of ' |
| 32 | 'divergent commits from the given src branch)'), |
| 33 | metavar='commit_id', action=helpers.CommitIdProcessor, repo=repo) |
| 34 | fuse_parser.add_argument( |
| 35 | '-e', '--exclude', nargs='+', |
| 36 | help=( |
| 37 | 'exclude from the fuse the commits given (commits must belong to the ' |
| 38 | 'set of divergent commits from the given src branch)'), |
| 39 | metavar='commit_id', action=helpers.CommitIdProcessor, repo=repo) |
| 40 | fuse_parser.add_argument( |
| 41 | '-ip', '--insertion-point', nargs='?', |
| 42 | help=( |
| 43 | 'the divergent changes will be inserted after the commit given, dp for ' |
| 44 | 'divergent point is the default'), metavar='commit_id') |
| 45 | fuse_parser.add_argument( |
| 46 | '-a', '--abort', help='abort the fuse in progress', action='store_true') |
| 47 | fuse_parser.set_defaults(func=main) |
| 48 | |
| 49 | |
| 50 | def main(args, repo): |
nothing calls this directly
no outgoing calls
no test coverage detected