diff tests/test-revset.t @ 20288:b61ad01c4e73

revset: use "canonpath()" for "filelog()" pattern without explicit kind Before this patch, revset predicate "filelog()" uses "match.files()" to get filename also for the pattern without explicit kind. But in such case, only canonicalization of relative path is required, and other initializations of "match" object including regexp compilation are meaningless. This patch uses "pathutil.canonpath()" directly for "filelog()" pattern without explicit kind like "glob:", for efficiency. This patch also does below as a part of introducing "canonpath()": - move location of "matchmod.match()" invocation, because "m" is no more used in "if not matchmod.patkind(pat)" code path - omit passing "default" argument to "matchmod.match()", because "pat" should have explicit kind of pattern in this code path
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Fri, 17 Jan 2014 23:55:03 +0900
parents 760151697a4f
children b0638b5b004d
line wrap: on
line diff
--- a/tests/test-revset.t	Fri Jan 17 23:42:12 2014 +0900
+++ b/tests/test-revset.t	Fri Jan 17 23:55:03 2014 +0900
@@ -292,6 +292,12 @@
   $ log 'file("b*")'
   1
   4
+  $ log 'filelog("b")'
+  1
+  4
+  $ log 'filelog("../repo/b")'
+  1
+  4
   $ log 'follow()'
   0
   1