Show More
@@ -427,9 +427,7 b' def dorecord(' | |||||
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 | |||
@@ -457,7 +455,7 b' def dorecord(' | |||||
457 | raise error.Abort(dirtyreason) |
|
455 | raise error.Abort(dirtyreason) | |
458 |
|
456 | |||
459 | if not force: |
|
457 | if not force: | |
460 |
repo.checkcommitpatterns(wctx |
|
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, |
@@ -1746,7 +1746,7 b' class ilocalrepositorymain(interfaceutil' | |||||
1746 | def currentwlock(): |
|
1746 | def currentwlock(): | |
1747 | """Return the wlock if it's held or None.""" |
|
1747 | """Return the wlock if it's held or None.""" | |
1748 |
|
1748 | |||
1749 |
def checkcommitpatterns(wctx |
|
1749 | def checkcommitpatterns(wctx, match, status, fail): | |
1750 | pass |
|
1750 | pass | |
1751 |
|
1751 | |||
1752 | def commit( |
|
1752 | def commit( |
@@ -2789,7 +2789,7 b' class localrepository(object):' | |||||
2789 |
|
2789 | |||
2790 | return fparent1 |
|
2790 | return fparent1 | |
2791 |
|
2791 | |||
2792 |
def checkcommitpatterns(self, wctx, |
|
2792 | def checkcommitpatterns(self, wctx, match, status, fail): | |
2793 | """check for commit arguments that aren't committable""" |
|
2793 | """check for commit arguments that aren't committable""" | |
2794 | if match.isexact() or match.prefix(): |
|
2794 | if match.isexact() or match.prefix(): | |
2795 | matched = set(status.modified + status.added + status.removed) |
|
2795 | matched = set(status.modified + status.added + status.removed) | |
@@ -2838,8 +2838,6 b' class localrepository(object):' | |||||
2838 | match = matchmod.always() |
|
2838 | match = matchmod.always() | |
2839 |
|
2839 | |||
2840 | if not force: |
|
2840 | if not force: | |
2841 | vdirs = [] |
|
|||
2842 | match.explicitdir = vdirs.append |
|
|||
2843 | match.bad = fail |
|
2841 | match.bad = fail | |
2844 |
|
2842 | |||
2845 | # lock() for recent changelog (see issue4368) |
|
2843 | # lock() for recent changelog (see issue4368) | |
@@ -2868,7 +2866,7 b' class localrepository(object):' | |||||
2868 |
|
2866 | |||
2869 | # make sure all explicit patterns are matched |
|
2867 | # make sure all explicit patterns are matched | |
2870 | if not force: |
|
2868 | if not force: | |
2871 |
self.checkcommitpatterns(wctx |
|
2869 | self.checkcommitpatterns(wctx, match, status, fail) | |
2872 |
|
2870 | |||
2873 | cctx = context.workingcommitctx( |
|
2871 | cctx = context.workingcommitctx( | |
2874 | self, status, text, user, date, extra |
|
2872 | self, status, text, user, date, extra |
General Comments 0
You need to be logged in to leave comments.
Login now