##// END OF EJS Templates
revset: make default kind of pattern for "contains()" rooted at cwd...
FUJIWARA Katsunori -
r20286:76015169 default
parent child Browse files
Show More
@@ -12,6 +12,7 b' import match as matchmod'
12 from i18n import _
12 from i18n import _
13 import encoding
13 import encoding
14 import obsolete as obsmod
14 import obsolete as obsmod
15 import pathutil
15 import repoview
16 import repoview
16
17
17 def _revancestors(repo, revs, followfirst):
18 def _revancestors(repo, revs, followfirst):
@@ -530,6 +531,7 b' def contains(repo, subset, x):'
530 pat = getstring(x, _("contains requires a pattern"))
531 pat = getstring(x, _("contains requires a pattern"))
531 s = []
532 s = []
532 if not matchmod.patkind(pat):
533 if not matchmod.patkind(pat):
534 pat = pathutil.canonpath(repo.root, repo.getcwd(), pat)
533 for r in subset:
535 for r in subset:
534 if pat in repo[r]:
536 if pat in repo[r]:
535 s.append(r)
537 s.append(r)
@@ -273,6 +273,11 b' ancestor can accept 0 or more arguments'
273 1
273 1
274 3
274 3
275 5
275 5
276 $ log 'contains("../repo/a")'
277 0
278 1
279 3
280 5
276 $ log 'desc(B)'
281 $ log 'desc(B)'
277 5
282 5
278 $ log 'descendants(2 or 3)'
283 $ log 'descendants(2 or 3)'
General Comments 0
You need to be logged in to leave comments. Login now