diff options
Diffstat (limited to 'src/pyfedpkg/initial_merge.py')
-rwxr-xr-x | src/pyfedpkg/initial_merge.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pyfedpkg/initial_merge.py b/src/pyfedpkg/initial_merge.py index 28e922e..759518a 100755 --- a/src/pyfedpkg/initial_merge.py +++ b/src/pyfedpkg/initial_merge.py @@ -187,6 +187,9 @@ class Action(argparse.Action): def fedpkg_command(args): + global_dry_run = args.dry_run + if global_dry_run: + print "NOTE: Running in dry-run mode, i.e. we will not actually perform any merges." for repo in args.repos: handle_path(repo) @@ -196,6 +199,12 @@ def get_parser(subparsers): sp = subparsers.add_parser('initial-merge', help = 'git merge to join branches with identical trees', epilog = _module_doc) + sp.add_argument('-n', '--dry-run', + dest='dry_run', + action='store_const', const=True, + default=False, + help = ('Whether to actually perform the merges. '+ + 'Local tracking branches wil be created anyway.')) sp.add_argument('repos', metavar='repo-path', nargs='*', default=['.'], action=Action, |