##// END OF EJS Templates
revset: use "canonpath()" for "filelog()" pattern without explicit kind...
FUJIWARA Katsunori -
r20288:b61ad01c default
parent child Browse files
Show More
@@ -717,16 +717,15 b' def filelog(repo, subset, x):'
717
717
718 # i18n: "filelog" is a keyword
718 # i18n: "filelog" is a keyword
719 pat = getstring(x, _("filelog requires a pattern"))
719 pat = getstring(x, _("filelog requires a pattern"))
720 m = matchmod.match(repo.root, repo.getcwd(), [pat], default='relpath',
721 ctx=repo[None])
722 s = set()
720 s = set()
723
721
724 if not matchmod.patkind(pat):
722 if not matchmod.patkind(pat):
725 f = m.files()[0]
723 f = pathutil.canonpath(repo.root, repo.getcwd(), pat)
726 fl = repo.file(f)
724 fl = repo.file(f)
727 for fr in fl:
725 for fr in fl:
728 s.add(fl.linkrev(fr))
726 s.add(fl.linkrev(fr))
729 else:
727 else:
728 m = matchmod.match(repo.root, repo.getcwd(), [pat], ctx=repo[None])
730 for f in repo[None]:
729 for f in repo[None]:
731 if m(f):
730 if m(f):
732 fl = repo.file(f)
731 fl = repo.file(f)
@@ -292,6 +292,12 b' ancestor can accept 0 or more arguments'
292 $ log 'file("b*")'
292 $ log 'file("b*")'
293 1
293 1
294 4
294 4
295 $ log 'filelog("b")'
296 1
297 4
298 $ log 'filelog("../repo/b")'
299 1
300 4
295 $ log 'follow()'
301 $ log 'follow()'
296 0
302 0
297 1
303 1
General Comments 0
You need to be logged in to leave comments. Login now