darcs

Issue 449 documentation doesn't specify what kind of regex

Title documentation doesn't specify what kind of regex
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, thorkilnaur, tommy, zooko
Assigned To
Topics ProbablyEasy

Created on 2007-05-04.02:24:34 by zooko, last changed 2009-08-27.13:51:34 by admin.

Messages
msg1672 (view) Author: zooko Date: 2007-05-04.02:24:26
Someone has reported to me a couple of examples which appear to be bugs in using
--from-tag=REGEXP, but since the manual doesn't explain what kind of regexps
darcs uses, I don't know if it is a bug or a misunderstanding of the regex syntax.
msg1673 (view) Author: droundy Date: 2007-05-04.16:33:02
On Fri, May 04, 2007 at 02:24:35AM +0000, Zooko wrote:
> Someone has reported to me a couple of examples which appear to be bugs in using
> --from-tag=REGEXP, but since the manual doesn't explain what kind of regexps
> darcs uses, I don't know if it is a bug or a misunderstanding of the regex syntax.

I'm not sure what kind of regexp.  We use the haskell standard library
Text.Regex, I believe, so if it's documented there, then that's what we're
using.

A good way to test regexp behavior would be to use darcs changes --tags,
which allow you to see all the tags that match the regexp.  It's possible
that more than one tag is matching and that's causing confusion.
-- 
David Roundy
Department of Physics
Oregon State University
msg1710 (view) Author: zooko Date: 2007-05-30.17:59:17
Here's a comment from a programmer:

"(the original goal was to use release tags that lacked the 'allmydata-tahoe-'
prefix, but it turns out to be more efficient to keep it in, because I can't get
'darcs changes --from-tag=' to accept real regexps)"

http://allmydata.org/trac/tahoe/browser/misc/make-version.py
msg1711 (view) Author: zooko Date: 2007-05-30.18:03:39
http://www.haskell.org/ghc/docs/latest/html/libraries/regex-compat/Text-Regex.html

"Makes a regular expression with the default options (multi-line,
case-sensitive). The syntax of regular expressions is otherwise that of egrep
(i.e. POSIX "extended" regular expressions)."

Brian: are those not "real" regular expressions?  Or does darcs --changes not
actually match egrep?

See also several alternate (?) regex libraries for Haskell:

http://hackage.haskell.org/packages/archive/pkg-list.html
msg1843 (view) Author: kowey Date: 2007-07-16.21:17:24
Are you sure it's not one of these confusing situations where you have to escape
the backslashes so that darcs really does see them as backslashes and not
something else?
msg2060 (view) Author: kowey Date: 2007-08-13.18:22:00
The darcs manual states:

"The --patch and --tag forms simply take (POSIX extended, aka egrep) regular
expressions and match them against tag and patch names"

Please let us know if there is anything we can do to improve this.  Otherwise,
resolving.  Thanks!
History
Date User Action Args
2007-05-04 02:24:34zookocreate
2007-05-04 16:33:10droundysetstatus: unread -> unknown
nosy: droundy, tommy, beschmi, kowey, zooko
messages: + msg1673
2007-05-30 17:59:26zookosetnosy: droundy, tommy, beschmi, kowey, zooko
messages: + msg1710
2007-05-30 18:03:50zookosetnosy: droundy, tommy, beschmi, kowey, zooko
messages: + msg1711
2007-07-16 01:08:45koweysettopic: + ProbablyEasy
nosy: droundy, tommy, beschmi, kowey, zooko
2007-07-16 21:17:25koweysetmessages: + msg1843
2007-08-13 18:22:03koweysetstatus: unknown -> resolved
messages: + msg2060
2009-08-06 17:32:16adminsetnosy: + markstos, jast, Serware, dmitry.kurochkin, darcs-devel, dagit, mornfall, simon, thorkilnaur, - droundy
2009-08-06 20:29:40adminsetnosy: - beschmi
2009-08-10 22:03:44adminsetnosy: - markstos, darcs-devel, jast, dagit, Serware, mornfall
2009-08-25 17:47:02adminsetnosy: + darcs-devel, - simon
2009-08-27 13:51:34adminsetnosy: tommy, kowey, darcs-devel, zooko, thorkilnaur, dmitry.kurochkin