From cc1faa2a409fb55e8b62682336bd35e955a31f9f Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Mon, 7 May 2018 19:51:07 -0600 Subject: [PATCH] Squashed 'manage_externals/' changes from 60fc03b..0427305 0427305 Merge pull request #103 from billsacks/no_logging 9bb46aa Make no-logging be the default 9af6b02 Merge pull request #102 from billsacks/explain_qmark 7f973ae Run through make style d077a57 Add message describing meaning of '?' git-subtree-dir: manage_externals git-subtree-split: 04273058c297127927f0fc85eed1cdc33e1a3af3 --- manic/checkout.py | 20 +++++++++++++++++--- manic/repository_svn.py | 3 ++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/manic/checkout.py b/manic/checkout.py index d4d9e2455d..9ddb62fb77 100755 --- a/manic/checkout.py +++ b/manic/checkout.py @@ -279,8 +279,15 @@ def commandline_arguments(args=None): help='DEVELOPER: output additional debugging ' 'information to the screen and log file.') - parser.add_argument('--no-logging', action='store_true', - help='DEVELOPER: disable logging.') + logging_group = parser.add_mutually_exclusive_group() + + logging_group.add_argument('--logging', dest='do_logging', + action='store_true', + help='DEVELOPER: enable logging.') + logging_group.add_argument('--no-logging', dest='do_logging', + action='store_false', default=False, + help='DEVELOPER: disable logging ' + '(this is the default)') if args: options = parser.parse_args(args) @@ -305,7 +312,7 @@ def main(args): *before* executing the checkout command - i.e., the status that it used to determine if it's safe to proceed with the checkout. """ - if not args.no_logging: + if args.do_logging: logging.basicConfig(filename=LOG_FILE_NAME, format='%(levelname)s : %(asctime)s : %(message)s', datefmt='%Y-%m-%d %H:%M:%S', @@ -359,6 +366,13 @@ def main(args): (2) Alternatively, you do not have to rely on {program_name}. Instead, you can manually update out-of-sync externals (labeled with 's' above) as described in the configuration file {config_file}. + + +The external repositories labeled with '?' above are not under version +control using the expected protocol. If you are sure you want to switch +protocols, and you don't have any work you need to save from this +directory, then run "rm -rf [directory]" before re-running the +checkout_externals tool. """.format(program_name=program_name, config_file=args.externals) printlog('-' * 70) diff --git a/manic/repository_svn.py b/manic/repository_svn.py index 908b1388fb..bef6f81414 100644 --- a/manic/repository_svn.py +++ b/manic/repository_svn.py @@ -208,7 +208,8 @@ def xml_status_is_dirty(svn_output): try: xml_status = ET.fromstring(svn_output) except BaseException: - fatal_error("SVN returned invalid XML message {}".format(svn_output)) + fatal_error( + "SVN returned invalid XML message {}".format(svn_output)) xml_target = xml_status.find('./target') entries = xml_target.findall('./entry') for entry in entries: