##// END OF EJS Templates
match: let 'path:.' and 'path:' match everything (issue4687)...
Matt Harbison -
r25636:bfe9ed85 stable
parent child Browse files
Show More
@@ -407,6 +407,8 b' def _regex(kind, pat, globsuffix):'
407 if kind == 're':
407 if kind == 're':
408 return pat
408 return pat
409 if kind == 'path':
409 if kind == 'path':
410 if pat == '.':
411 return ''
410 return '^' + util.re.escape(pat) + '(?:/|$)'
412 return '^' + util.re.escape(pat) + '(?:/|$)'
411 if kind == 'relglob':
413 if kind == 'relglob':
412 return '(?:|.*/)' + _globre(pat) + globsuffix
414 return '(?:|.*/)' + _globre(pat) + globsuffix
@@ -106,6 +106,19 b' Issue294: hg remove --after dir fails wh'
106 $ mkdir otherdir
106 $ mkdir otherdir
107 $ cd otherdir
107 $ cd otherdir
108
108
109 $ hg files path:
110 ../b (glob)
111 ../dir.h/foo (glob)
112 ../t.h (glob)
113 ../t/e.h (glob)
114 ../t/x (glob)
115 $ hg files path:.
116 ../b (glob)
117 ../dir.h/foo (glob)
118 ../t.h (glob)
119 ../t/e.h (glob)
120 ../t/x (glob)
121
109 $ hg locate b
122 $ hg locate b
110 ../b (glob)
123 ../b (glob)
111 ../t/b (glob)
124 ../t/b (glob)
General Comments 0
You need to be logged in to leave comments. Login now