[darcs-users] 'replace' doesn't support the tilde?

David Roundy droundy at abridgegame.org
Tue Nov 16 12:20:27 UTC 2004


On Sun, Nov 14, 2004 at 12:59:47AM +0000, Mark Stosberg wrote:
> Am I do doing something wrong here, or does 'replace'
> not support the tilde character? That seems like an 
> odd limitation if so. 
> 
> darcs replace --token-chars='[MacOS\~X]' 'MacOS~X' 'Mac OS X' *.lhs *.tex
> Fail: '\~' not supported.

Actually, the tilde char is supported without the escaping.  It didn't
occur to me that tilde might be escaped.  The regexp parsing is done by
hand because darcs doesn't support arbitrary regexps (for invertibility
reasons).

It's easy enough to add support for this, and in fact I could add support
for more complicated things (like \d), but then we'd have to deal with the
possibility of creating a patch that couldn't be parsed by older versions
of darcs.  :( It's not *too* bad, since at least it wouldn't lead to
corruption, but it would still be annoying to get such a patch in your
repo.
-- 
David Roundy
http://www.darcs.net




More information about the darcs-users mailing list