mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
e0e01cbc81
Summary: This broke a bunch of tests. Revert it and re-enable all the tests. Reviewed By: DurhamG Differential Revision: D19665042 fbshipit-source-id: c3c17e3ac7e2ea028be5b5836bc8349cdf56184e
55 lines
2.0 KiB
Perl
55 lines
2.0 KiB
Perl
#require no-windows
|
|
|
|
Explore the semi-mysterious matchmod.match API
|
|
|
|
$ newrepo
|
|
$ mkdir 'a*1' 'a*2'
|
|
$ touch 'a*1/a' 'a*2/b'
|
|
$ hg ci -m 1 -A 'a*1/a' 'a*2/b' -q 2>&1 | sort
|
|
warning: filename contains '*', which is reserved on Windows: 'a*1/a'
|
|
warning: filename contains '*', which is reserved on Windows: 'a*2/b'
|
|
|
|
"patterns="
|
|
|
|
$ hg dbsh -c 'ui.write("%s\n" % str(list(repo["."].walk(m.match.match(repo.root, "", patterns=["a*"])))))'
|
|
[]
|
|
|
|
$ hg dbsh -c 'ui.write("%s\n" % str(list(repo["."].walk(m.match.match(repo.root, "", patterns=["a*1"])))))'
|
|
[]
|
|
|
|
$ hg dbsh -c 'ui.write("%s\n" % str(list(repo["."].walk(m.match.match(repo.root, "", patterns=["a*/*"])))))'
|
|
['a*1/a', 'a*2/b']
|
|
|
|
"include="
|
|
|
|
$ hg dbsh -c 'ui.write("%s\n" % str(list(repo["."].walk(m.match.match(repo.root, "", include=["a*"])))))'
|
|
['a*1/a', 'a*2/b']
|
|
|
|
$ hg dbsh -c 'ui.write("%s\n" % str(list(repo["."].walk(m.match.match(repo.root, "", include=["a*1"])))))'
|
|
['a*1/a']
|
|
|
|
$ hg dbsh -c 'ui.write("%s\n" % str(list(repo["."].walk(m.match.match(repo.root, "", include=["a*/*"])))))'
|
|
['a*1/a', 'a*2/b']
|
|
|
|
"patterns=" with "default='path'"
|
|
|
|
$ hg dbsh -c 'ui.write("%s\n" % str(list(repo["."].walk(m.match.match(repo.root, "", patterns=["a*"], default="path")))))'
|
|
[]
|
|
|
|
$ hg dbsh -c 'ui.write("%s\n" % str(list(repo["."].walk(m.match.match(repo.root, "", patterns=["a*1"], default="path")))))'
|
|
['a*1/a']
|
|
|
|
$ hg dbsh -c 'ui.write("%s\n" % str(list(repo["."].walk(m.match.match(repo.root, "", patterns=["a*/*"], default="path")))))'
|
|
[]
|
|
|
|
"include=" with "default='path'" (ex. "default=" has no effect on "include=")
|
|
|
|
$ hg dbsh -c 'ui.write("%s\n" % str(list(repo["."].walk(m.match.match(repo.root, "", include=["a*"], default="path")))))'
|
|
['a*1/a', 'a*2/b']
|
|
|
|
$ hg dbsh -c 'ui.write("%s\n" % str(list(repo["."].walk(m.match.match(repo.root, "", include=["a*1"], default="path")))))'
|
|
['a*1/a']
|
|
|
|
$ hg dbsh -c 'ui.write("%s\n" % str(list(repo["."].walk(m.match.match(repo.root, "", include=["a*/*"], default="path")))))'
|
|
['a*1/a', 'a*2/b']
|