##// END OF EJS Templates
revset: speed up '_matchfiles'...
Pierre-Yves David -
r27028:f92053df default
parent child Browse files
Show More
@@ -1164,8 +1164,16 b' def _matchfiles(repo, subset, x):'
1164 m = matchmod.match(repo.root, repo.getcwd(), pats, include=inc,
1164 m = matchmod.match(repo.root, repo.getcwd(), pats, include=inc,
1165 exclude=exc, ctx=repo[rev], default=default)
1165 exclude=exc, ctx=repo[rev], default=default)
1166
1166
1167 # This directly read the changelog data as creating changectx for all
1168 # revisions is quite expensive.
1169 getchangeset = repo.changelog.read
1170 wdirrev = node.wdirrev
1167 def matches(x):
1171 def matches(x):
1168 for f in repo[x].files():
1172 if x == wdirrev:
1173 files = repo[x].files()
1174 else:
1175 files = getchangeset(x)[3]
1176 for f in files:
1169 if m(f):
1177 if m(f):
1170 return True
1178 return True
1171 return False
1179 return False
General Comments 0
You need to be logged in to leave comments. Login now