##// END OF EJS Templates
Leave normalization of patterns to util._matcher...
Alexis S. L. Carvalho -
r4186:08d31e43 default
parent child Browse files
Show More
@@ -129,13 +129,7 b' def make_file(repo, pat, node=None,'
129
129
130 def matchpats(repo, pats=[], opts={}, head='', globbed=False):
130 def matchpats(repo, pats=[], opts={}, head='', globbed=False):
131 cwd = repo.getcwd()
131 cwd = repo.getcwd()
132 if not pats and cwd:
132 return util.cmdmatcher(repo.root, cwd, pats or [], opts.get('include'),
133 opts['include'] = [os.path.join(cwd, i)
134 for i in opts.get('include', [])]
135 opts['exclude'] = [os.path.join(cwd, x)
136 for x in opts.get('exclude', [])]
137 cwd = ''
138 return util.cmdmatcher(repo.root, cwd, pats or ['.'], opts.get('include'),
139 opts.get('exclude'), head, globbed=globbed)
133 opts.get('exclude'), head, globbed=globbed)
140
134
141 def walk(repo, pats=[], opts={}, node=None, head='', badmatch=None,
135 def walk(repo, pats=[], opts={}, node=None, head='', badmatch=None,
@@ -6,16 +6,17 b' cd foo'
6
6
7 A=`echo -e -n 'he\rllo'`
7 A=`echo -e -n 'he\rllo'`
8
8
9 echo foo > "hell
10 o"
11 echo foo > "$A"
9 echo foo > "$A"
12 hg add
10 hg add
13 hg ci -A -m m
11 hg ci -A -m m
14 rm "$A"
12 rm "$A"
15 ls
13
14 echo foo > "hell
15 o"
16 hg add
16 hg add
17 # BUG ? we don't walk on filenames with '\n' (regexp related) ?
18 hg debugwalk
19 hg ci -A -m m
17 hg ci -A -m m
20
18
19 echo foo > "$A"
20 hg debugwalk
21
21 exit 0
22 exit 0
@@ -2,6 +2,13 b' adding he\rllo'
2 abort: '\n' and '\r' disallowed in filenames
2 abort: '\n' and '\r' disallowed in filenames
3 adding he llo
3 adding he llo
4 abort: '\n' and '\r' disallowed in filenames
4 abort: '\n' and '\r' disallowed in filenames
5 hell
5 adding hell
6 o
7 abort: '\n' and '\r' disallowed in filenames
8 adding hell
6 o
9 o
7 nothing changed
10 abort: '\n' and '\r' disallowed in filenames
11 f he llo he llo
12 f hell
13 o hell
14 o
General Comments 0
You need to be logged in to leave comments. Login now