Skip to content

Commit

Permalink
Squashed 'manage_externals/' changes from 60fc03b..0427305
Browse files Browse the repository at this point in the history
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: 0427305
  • Loading branch information
billsacks committed May 8, 2018
1 parent ad97463 commit cc1faa2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
20 changes: 17 additions & 3 deletions manic/checkout.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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',
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion manic/repository_svn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit cc1faa2

Please sign in to comment.