Mercurial > hg
changeset 5952:2e8eeb5bf29b
Merge with crew
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Fri, 25 Jan 2008 16:24:00 -0800 |
parents | 92eb0a019bf2 (current diff) 4b8d568c65dd (diff) |
children | e7f1be4bf40a |
files | |
diffstat | 3 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/util.py Fri Jan 25 16:18:00 2008 -0800 +++ b/mercurial/util.py Fri Jan 25 16:24:00 2008 -0800 @@ -262,7 +262,7 @@ "convert a glob pattern into a regexp" i, n = 0, len(pat) res = '' - group = False + group = 0 def peek(): return i < n and pat[i] while i < n: c = pat[i] @@ -292,11 +292,11 @@ stuff = '\\' + stuff res = '%s[%s]' % (res, stuff) elif c == '{': - group = True + group += 1 res += '(?:' elif c == '}' and group: res += ')' - group = False + group -= 1 elif c == ',' and group: res += '|' elif c == '\\':
--- a/tests/test-walk Fri Jan 25 16:18:00 2008 -0800 +++ b/tests/test-walk Fri Jan 25 16:24:00 2008 -0800 @@ -58,6 +58,7 @@ debugwalk ../.hg chdir .. debugwalk -Ibeans +debugwalk -I '{*,{b,m}*/*}k' debugwalk 'glob:mammals/../beans/b*' debugwalk '-X*/Procyonidae' mammals debugwalk path:mammals
--- a/tests/test-walk.out Fri Jan 25 16:18:00 2008 -0800 +++ b/tests/test-walk.out Fri Jan 25 16:24:00 2008 -0800 @@ -174,6 +174,11 @@ f beans/pinto beans/pinto f beans/turtle beans/turtle +hg debugwalk -I {*,{b,m}*/*}k +f beans/black beans/black +f fenugreek fenugreek +f mammals/skunk mammals/skunk + hg debugwalk glob:mammals/../beans/b* f beans/black beans/black f beans/borlotti beans/borlotti