FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 17 Jan 2014 23:42:12 +0900] rev 20286
revset: make default kind of pattern for "contains()" rooted at cwd
Before this patch, default kind of pattern for revset predicate
"contains()" is treated as the exact file path rooted at the root of
the repository. This decreases usability, because:
- all other predicates taking pattern argument (also "filelog()")
treat such pattern as the path rooted at the current working
directory
- "contains()" doesn't describe this difference in its help
- this difference may confuse users
for example, this prevents revset aliases from sharing same
argument between "contains()" and other predicates
This patch makes default kind of pattern for revset predicate
"contains()" be rooted at the current working directory.
This patch uses "pathutil.canonpath()" instead of creating "match"
object for efficiency.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 17 Jan 2014 23:42:12 +0900] rev 20285
revset: narrow scope of the variable referred only in specific code path
This patch narrows scope of the variable "m" in the function for
revset predicate "contains()", because it is referred only in "else"
code path of "if not matchmod.patkind(pat)" examination.
Simon Heimberg <simohe@besonet.ch> [Fri, 17 Jan 2014 12:46:29 +0100] rev 20284
tests: fix test-run-tests.py on OS X
Do the same hack as in test-doctests.py to let the test pass on OS X.