##// END OF EJS Templates
revset: fix adds/modifies/removes and patterns (issue3403)...
Patrick Mezard -
r16521:592701c8 stable
parent child Browse files
Show More
@@ -341,23 +341,26 b' def branch(repo, subset, x):'
341 341 def checkstatus(repo, subset, pat, field):
342 342 m = None
343 343 s = []
344 fast = not matchmod.patkind(pat)
344 hasset = matchmod.patkind(pat) == 'set'
345 fname = None
345 346 for r in subset:
346 347 c = repo[r]
347 if fast:
348 if pat not in c.files():
348 if not m or hasset:
349 m = matchmod.match(repo.root, repo.getcwd(), [pat], ctx=c)
350 if not m.anypats() and len(m.files()) == 1:
351 fname = m.files()[0]
352 if fname is not None:
353 if fname not in c.files():
349 354 continue
350 355 else:
351 if not m or matchmod.patkind(pat) == 'set':
352 m = matchmod.match(repo.root, repo.getcwd(), [pat], ctx=c)
353 356 for f in c.files():
354 357 if m(f):
355 358 break
356 359 else:
357 360 continue
358 361 files = repo.status(c.p1().node(), c.node())[field]
359 if fast:
360 if pat in files:
362 if fname is not None:
363 if fname in files:
361 364 s.append(r)
362 365 else:
363 366 for f in files:
@@ -305,6 +305,13 b' quoting needed'
305 305 6
306 306 $ log 'modifies(b)'
307 307 4
308 $ log 'modifies("path:b")'
309 4
310 $ log 'modifies("*")'
311 4
312 6
313 $ log 'modifies("set:modified()")'
314 4
308 315 $ log 'id(5)'
309 316 2
310 317 $ log 'outgoing()'
General Comments 0
You need to be logged in to leave comments. Login now