[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: [TSVN] Autocompletion list in the commit dialog

From: Eric J. Smith <eric_at_ericjsmith.net>
Date: 2005-02-16 22:19:50 CET

> So how should we decide which one(s) to use then? I mean the group 0
> always returns the entire match, not the groups within (and that's
> sometimes what people want with the regex string). Is there any
> indication in the string itself what should be used?
>
> Maybe we should still add another option to the autolist.txt file. One
> that tells TSVN to use either the whole match or the individual groups.

I suppose you could add an option to tell it whether to use the full match
or the groups inside of the match for the auto-complete members, but you
could also just make them add parens around their entire regex and it should
work fine.

(\b\w+\b) (Should result in group 0 and group 1 being the exact same
thing.)

I personally can't think of any syntax where you aren't going to need to
check some sort of context around what you are trying to get added to the
auto-complete list, but I guess it's a possibility. I personally wouldn't
make it an option, but that is up to you.

Also, another thing to note here is that when using captured groups in your
regex, if you need to do a group (maybe for alternation or something) and
you don't want it to be captured, then you need to use "(?:". Here is an
example:

(?:public|private|internal)\s+(\w+)

This will not capture the first part (public|private|internal) of the regex
into a group.

Eric J. Smith

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Wed Feb 16 22:22:50 2005

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.