Show More
@@ -526,14 +526,15 b' def bundle(repo, subset, x):' | |||||
526 | def checkstatus(repo, subset, pat, field): |
|
526 | def checkstatus(repo, subset, pat, field): | |
527 | hasset = matchmod.patkind(pat) == 'set' |
|
527 | hasset = matchmod.patkind(pat) == 'set' | |
528 |
|
528 | |||
|
529 | mcache = [None] | |||
529 | def matches(x): |
|
530 | def matches(x): | |
530 | m = None |
|
|||
531 | fname = None |
|
|||
532 | c = repo[x] |
|
531 | c = repo[x] | |
533 | if not m or hasset: |
|
532 | if not mcache[0] or hasset: | |
534 | m = matchmod.match(repo.root, repo.getcwd(), [pat], ctx=c) |
|
533 | mcache[0] = matchmod.match(repo.root, repo.getcwd(), [pat], ctx=c) | |
535 | if not m.anypats() and len(m.files()) == 1: |
|
534 | m = mcache[0] | |
536 |
|
|
535 | fname = None | |
|
536 | if not m.anypats() and len(m.files()) == 1: | |||
|
537 | fname = m.files()[0] | |||
537 | if fname is not None: |
|
538 | if fname is not None: | |
538 | if fname not in c.files(): |
|
539 | if fname not in c.files(): | |
539 | return False |
|
540 | return False |
General Comments 0
You need to be logged in to leave comments.
Login now