[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: Thu, 1 Oct 2009 14:43:01 +0200

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

> are you sure about the double double quotes around the first "show all"
> and the different quotes around the second??? Did you want to give an
> example about finding quoted strings?

Exactly. As always, I'm not very good at finding
formulations / examples / user doc that work from
the beginning ;)

The actual interpretation of the filter string is
as follows:

(1) A ! at the beginning will invert the whole
    filter condition. Exclamation marks at any
    other position will be treated as ordinary
    text.

    '!' will match nothing, ' !' will find all
    revisions with an exclamation mark in it.

(2) Different sub-strings are separated by spaces.
    Sequences of multiple spaces are treated as
    a single one. See (4) for an exception. For
    a revision to match, all sub-strings must be
    found in that revision.

    'a bcd e' is equivalent to ' e bcd a'.

(3) A - at the beginning of a sub-string will
    require that sub-string to be NOT present in
    the respective revision. Again, a - on any
    other position in the sub-string is considered
    simple text.

    '--' finds all revisions not containing a '-'.
    BTW, using DeMorgan's laws, 'a' OR 'b' can be
    expressed as '!-a -b'.

(4) Double quotes start a sub-string and suspend
    rule (2) until the end of the sub-string
    has been found. It will end at the first
    double quote after the initial one that is
    followed by either a space or the end of the
    filter string. If no such termination exists,
    the sub-string terminates automatically at
    the end of the filter string.

    '" ', '" "' and '" " ' are equivalent.
    '""a""' and '""a"' are NOT equivalent.
    '""a""' searches for '"a"' because " number
    two and three are followed by non-spaces and
    only number 4 is, therefore, the terminating one.
    Similarly, '""a"' searches for '"a'.

    r17323 makes the termination detection more
    consistent, i.e. the way described above.

    Exclusion (-) must be placed before the quotes.
    Starting double quotes must not be preceded
    by simple text. Only ! and - may directly lead
    the quotes and must follow (1) and (3).

    'ab" cd"' will look for 'ab"' AND 'cd"'.
    '-"a b"' and '"-a b"' are not equivalent.

The docs should also mention that case-insensitive
regular expressions are expensive.

> TBH I find this a bit confusing,
> because the quotes around the string are hard to see.
>
> -\"\"show all\"\" : commits that don't contain the string '\"show

> all\"'\r\n

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"'. There is no way to express
'" \" "' without using a proper regular expression.

Suggestion:

-""funny" : commits that don't contain the string '"funny'

-- Stefan^2.

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

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-10-01 14:43:06 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.