Mercurial > hg
changeset 1990:4b0535c678d6
make it possible to escape characters in a glob expression
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Thu, 23 Mar 2006 23:39:53 +0100 |
parents | 719cf07b076d |
children | a8a618c57690 |
files | mercurial/util.py |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/util.py Wed Mar 22 05:30:47 2006 +0100 +++ b/mercurial/util.py Thu Mar 23 23:39:53 2006 +0100 @@ -155,6 +155,13 @@ group = False elif c == ',' and group: res += '|' + elif c == '\\': + p = peek() + if p: + i += 1 + res += re.escape(p) + else: + res += re.escape(c) else: res += re.escape(c) return head + res + tail