Skip to content
Snippets Groups Projects
Commit ab618e52 authored by Martin von Zweigbergk's avatar Martin von Zweigbergk
Browse files

largefiles: avoid match.files() in conditions

See 9789b4a7c595 (match: introduce boolean prefix() method,
2014-10-28) for reasons to avoid match.files() in conditions.
parent 31d543cd
No related branches found
No related tags found
No related merge requests found
......@@ -241,5 +241,5 @@
def getstandinmatcher(repo, rmatcher=None):
'''Return a match object that applies rmatcher to the standin directory'''
standindir = repo.wjoin(shortname)
if rmatcher and rmatcher.files():
if rmatcher and not rmatcher.always():
pats = [os.path.join(standindir, pat) for pat in rmatcher.files()]
......@@ -245,3 +245,6 @@
pats = [os.path.join(standindir, pat) for pat in rmatcher.files()]
match = scmutil.match(repo[None], pats)
# if pats is empty, it would incorrectly always match, so clear _always
match._always = False
else:
# no patterns: relative to repo root
......@@ -246,4 +249,4 @@
else:
# no patterns: relative to repo root
pats = [standindir]
match = scmutil.match(repo[None], [standindir])
# no warnings about missing files or directories
......@@ -249,5 +252,4 @@
# no warnings about missing files or directories
match = scmutil.match(repo[None], pats)
match.bad = lambda f, msg: None
return match
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment