Hi,
I'm trying to read up on release.py (planning to make one of the upcoming
releases - no promises I'll be done in time for 1.14.4 though).
There are quite a few cases where there is a dry_run parameter, for example
in run_command:
[[[
def run_command(cmd, verbose=True, hide_stderr=False, dry_run=False):
...
if not dry_run:
subprocess.check_call(cmd, stdout=stdout, stderr=stderr)
else:
print(' ## dry-run; not executed')
]]]
Following the breadcrumbs, this parameter seems to be set from the command
line arguments (for example in make_release_branch):
...dry_run=args.dry_run...
However I can't figure out how args.dry_run is set. I was looking in main,
where the parser is setup but no trace of dry_run. Is it missing an
add_argument or am I missing something?
[[[
Index: release.py
===================================================================
--- release.py (revision 1920893)
+++ release.py (working copy)
@@ -1719,6 +1719,9 @@
parser.add_argument('--username',
help='Username for committing to ' + svn_repos +
' or ' + dist_repos + '.')
+ parser.add_argument('--dry-run', action='store_true',
+ help='''Just show the commands to be executed, don't
+ actually commit anything.''')
subparsers = parser.add_subparsers(title='subcommands')
# Setup the parser for the build-env subcommand
]]]
Kind regards,
Daniel