Comments
Patch
@@ -205,6 +205,8 @@
help='set the given config opt in the test hgrc')
parser.add_option('--random', action="store_true",
help='run tests in random order')
+ parser.add_option('--winpathwarn', action='store_true',
+ help='warn only when local paths do not exactly match (windows)')
for option, (envvar, default) in defaults.items():
defaults[option] = type(default)(os.environ.get(envvar, default))
@@ -794,11 +796,19 @@
if r:
postout.append(" " + el)
if r == 'slash':
- log('\nInfo, missing glob in test %s (after line %d): %s'
- % (test, pos, el))
+ if options.winpathwarn:
+ log('\nInfo, missing glob in test %s (after line %d): %s'
+ % (test, pos, el))
+ else:
+ # append missing glob
+ postout[-1] += ' (glob)'
elif r == 'glob':
- log('\ninfo, unnecessary glob in test %s (after line %d):'
- ' %s (glob)\n' % (test, pos, el[-1]))
+ if options.winpathwarn:
+ log('\ninfo, unnecessary glob in test %s (after line'
+ ' %d): %s (glob)\n' % (test, pos, el[-1]))
+ else:
+ # drop extra glob
+ postout[-1] = postout[-1].rsplit(' (', 1)[0]
else:
if needescape(lout):
lout = stringescape(lout.rstrip('\n')) + " (esc)\n"