Show More
@@ -308,11 +308,14 b' def parseargs(args, parser):' | |||||
308 | sys.stderr.write('warning: --with-hg should specify an hg script\n') |
|
308 | sys.stderr.write('warning: --with-hg should specify an hg script\n') | |
309 | if options.local: |
|
309 | if options.local: | |
310 | testdir = os.path.dirname(_bytespath(canonpath(sys.argv[0]))) |
|
310 | testdir = os.path.dirname(_bytespath(canonpath(sys.argv[0]))) | |
311 |
|
|
311 | reporootdir = os.path.dirname(testdir) | |
312 | if os.name != 'nt' and not os.access(hgbin, os.X_OK): |
|
312 | pathandattrs = [(b'hg', 'with_hg')] | |
313 | parser.error('--local specified, but %r not found or not executable' |
|
313 | for relpath, attr in pathandattrs: | |
314 | % hgbin) |
|
314 | binpath = os.path.join(reporootdir, relpath) | |
315 | options.with_hg = hgbin |
|
315 | if os.name != 'nt' and not os.access(binpath, os.X_OK): | |
|
316 | parser.error('--local specified, but %r not found or ' | |||
|
317 | 'not executable' % binpath) | |||
|
318 | setattr(options, attr, binpath) | |||
316 |
|
319 | |||
317 | if (options.chg or options.with_chg) and os.name == 'nt': |
|
320 | if (options.chg or options.with_chg) and os.name == 'nt': | |
318 | parser.error('chg does not work on %s' % os.name) |
|
321 | parser.error('chg does not work on %s' % os.name) |
General Comments 0
You need to be logged in to leave comments.
Login now