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

Re: sub-string filter hint text

From: Stefan Fuhrmann <stefanfuhrmann_at_alice-dsl.de>
Date: Mon, 5 Oct 2009 15:05:31 +0200

Lübbe Onken <luebbe.tortoisesvn_at_googlemail.com> wrote:

> Thanks for the explanation. This warrants an entire section in our docs
:)
>
> > You are right. I just couldn't come up with a
> > different useful example / examples to show
> > exclusion and / or searching for double quotes.
> >
> >> not a "good" example text, but maybe easier to understand:
> >>
> >> -\"no \"!\" on"\ : commits that don't contain the string 'no \"!\"
> > on\'\r\n
> >
> > '-"no "!" on"' looks for revisions not containing
> > '-"no "!"' but 'on"'.
>
> Ouch, I didn't grok the internal '"' properly. With your explanation
> above it becomes clearer.
>
> > There is no way to express
> > '" \" "' without using a proper regular expression.
>
> I used the '\"' because it is written like this in the hint text. Of
> course this has to be entered non regex escaped.
>
> Can I match a double quote inside a string that contains blanks?!?
>
> Like this: '-"no ""!"" on"' hopefully looks for revisions not containing
> 'no "!" on'?
> Or is this cut off at '"no ""!""' because the fifth '"' is followed by a
> blank?

After given it some thought, I made the parser a little
more 'standard' in r17331:

* " starts a sub-string that may contain arbitrary chars,
  including spaces etc.
* pairs of " will be treated as a single " in the search
  sub-string and will not terminate the sub-string parsing
* single (or odd-numbered) " will terminate the sub-string
  if they are followed by a space or the end of the filter
  string
* if no terminating " is found, the sub-string end automatically
  with the end of the filter string

Hopefully, that set of rules feels a bit more natural.

-- Stefan^2.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2403575

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-10-05 15:05:39 CEST

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.