equal
deleted
inserted
replaced
425 def fail(f, msg): |
425 def fail(f, msg): |
426 raise error.Abort(b'%s: %s' % (f, msg)) |
426 raise error.Abort(b'%s: %s' % (f, msg)) |
427 |
427 |
428 force = opts.get(b'force') |
428 force = opts.get(b'force') |
429 if not force: |
429 if not force: |
430 vdirs = [] |
|
431 match = matchmod.badmatch(match, fail) |
430 match = matchmod.badmatch(match, fail) |
432 match.explicitdir = vdirs.append |
|
433 |
431 |
434 status = repo.status(match=match) |
432 status = repo.status(match=match) |
435 |
433 |
436 overrides = {(b'ui', b'commitsubrepos'): True} |
434 overrides = {(b'ui', b'commitsubrepos'): True} |
437 |
435 |
455 if s in commitsubs: |
453 if s in commitsubs: |
456 dirtyreason = wctx.sub(s).dirtyreason(True) |
454 dirtyreason = wctx.sub(s).dirtyreason(True) |
457 raise error.Abort(dirtyreason) |
455 raise error.Abort(dirtyreason) |
458 |
456 |
459 if not force: |
457 if not force: |
460 repo.checkcommitpatterns(wctx, vdirs, match, status, fail) |
458 repo.checkcommitpatterns(wctx, match, status, fail) |
461 diffopts = patch.difffeatureopts( |
459 diffopts = patch.difffeatureopts( |
462 ui, |
460 ui, |
463 opts=opts, |
461 opts=opts, |
464 whitespace=True, |
462 whitespace=True, |
465 section=b'commands', |
463 section=b'commands', |