Login | Register
My pages Projects Community openCollabNet

Discussions > dev > FSVS and ignore patterns

fsvs
Discussion topic

Hide all messages in topic

All messages in topic

Re: FSVS and ignore patterns

Author Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de>
Full name Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de>
Date 2007-04-15 10:54:51 PDT
Message Am Dienstag, 3. April 2007 22:49 schrieb Gunter Ohrner:
> The patches are only lightly tested.

The functionality implemented by both patches has been tested heavily, of
course, and is used by me on a daily basis. What I wanted to say is, that
the adaption of these patches to the fsvs trunk sources was only ligthly
tested, as I'm still using a relatively old SVN snapshot.

Greetings,

  Gunter

--
*** Powered by AudioScrobbler --> http://www.last.fm/u​ser/Interneci/ ***
19:46 | Rebellion - Husbandry in Heaven
17:54 | Lunatica - Emocean Bonus
09:42 | Lunatica - The Power of Love
09:38 | Lunatica - Together
*** PGP-Verschlüsselung bei eMails erwünscht :-) *** PGP: 0x1128F25F ***
Attachments

Re: FSVS and ignore patterns

Author Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de>
Full name Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de>
Date 2007-04-03 13:53:24 PDT
Message Am Dienstag, 3. April 2007 21:09 schrieb Gunter Ohrner:
> I'll have a look. I didn't have time to track fsvs too closely the last
> time, currently I'm still at 1.0.16 which, hoever, works pretty good
> for me so far.

BTW, I didn't have the GDBM-headers installed, and the svn HEAD's
configure script didn't complain, only compilation broke.

Greetings,

  Gunter

--
+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+
I feel like a genocidal maniac when emacs asks me if I want to kill
10789 characters.
+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+
+ PGP-verschlüsselte Mails bevorzugt! +
+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+
Attachments

Re: FSVS and ignore patterns

Author Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de>
Full name Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de>
Date 2007-04-03 13:49:22 PDT
Message Am Dienstag, 3. April 2007 21:09 schrieb Gunter Ohrner:
> At the first glance most changes to ignore.c are documentation changes
> only, so the current patches should apply more or less as-is.

Both pattches did apply without any fuzz but large offsets.

I splittet one, found a bug in character class handling in the other,
updated the Doxygen comments where appropriate and re-diffed everything
against current svn HEAD.

The patches are only lightly tested.

Greetings,

  Gunter

--
+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+
"Wo ein Killer ist, ist auch einer weg"
        -- Autor unbekannt
+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+
+ PGP-verschlüsselte Mails bevorzugt! +
+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+
Attachments

[patch] Character Classes And Escape Characters In Globbing Patterns (was: FSVS and ignore patterns)

Author Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de>
Full name Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de>
Date 2007-04-03 13:46:56 PDT
Message Hi!

This patch teaches the "globbing pattern to PCRE translator" to grok
character classes and to accept the \-character to escape special
characters.

Documentation is included as doxygen comments.

Greetings,

  Gunter

--
+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+
Alle meine Hosen haben ca. 3 Löcher: 2 zum Füße-Rausstrecken und eins
zum Bauch-Rausstrecken - und manche haben noch ein Guckloch fürs Knie
:-) -- Matthias Dingeldein in
<news:40B314CD.A4​EF8A37 at eckert dot rwth-a​achen.de>
+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+
+ PGP-verschlüsselte Mails bevorzugt! +
+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+
Attachments

[patch] Globbing Pattern Anchoring Fix And Directory Match Extension (was: FSVS and ignore patterns)

Author Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de>
Full name Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de>
Date 2007-04-03 13:39:18 PDT
Message Hi!

Ok, I splittet the patch previously called dir_ignore into two tiny chunks
which represent the two different concepts merged within the old patch.

The first one fixes a plain misbehaviour of the globbing pattern and makes
the implementation's behaviour match its documentation. Without this
patch, the example pattern "./sys" from the docs would also match files
and directories called "./system", "./sysiphus", and so on.

The second chunk extends the directory matching behaviour such
that "./abc/**" is equivalent to "./abc/", ie it ignores the directories'
contents but not the directory itself. I'm not sure if this behaviour is
desirable, but I consider it to be convenient... ;)

Greetings,

  Gunter

--
+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+
Although the scythe isn't pre-eminent among the weapons of war, anyone
who has been on the wrong end of, say, a peasants' revolt will know that
in skilled hands it is fearsome. -- (Terry Pratchett, Mort)
+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+
+ PGP-verschlüsselte Mails bevorzugt! +
+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+
Attachments

Re: FSVS and ignore patterns

Author Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de>
Full name Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de>
Date 2007-04-03 12:09:06 PDT
Message Am Dienstag, 3. April 2007 10:18 schrieb Ph. Marek:
> I'd like to release a new version (preferably tomorrow) with the ignore
> pattern changes applied, and wanted to ask you for a current set of
> patches.

I'll have a look. I didn't have time to track fsvs too closely the last
time, currently I'm still at 1.0.16 which, hoever, works pretty good for
me so far.

At the first glance most changes to ignore.c are documentation changes
only, so the current patches should apply more or less as-is.

> Do you remember the last status of that thread?

Mh, I'm not sure if we reached a final conclusion that time...

My patches still "just" implement the original specification I posted.

I'll beef up the comments a bit, rediff them against HEAD and post them
here so you can decide whether to include them into you upcoming release
or to postpone them a bit.

There has not been any work towards your ignore changes suggested in
http://thread.gmane.​org/gmane.comp.sysut​ils.backup.fsvs.deve​l/175 so far,
has there?

Greetings,

  Gunter


Original docs / spec:

dir_ignore
**********
changes the matching behaviour of fsvs glob-like filename patterns. With
dir_ignore, a glob-like pattern matches the full directory-/filename
instead of just a prefix as it currently does.
An exception are patterns which end with a slash, which will match the
exact full directory-/filename without the slash as well as everything
the pattern is a prefix of. This is used to exclude directories and their
contents.

Examples:

./**/tmp
  will match all files in any subdirectory which are exactly called "tmp".
./**/tmp**
  mimics the above pattern's current semantics: match any file or
  directory whose name starts with "tmp".
./**/tmp/
  will match all files in all directories which are called "tmp" and the
  directory itself.
./**/tmp/**
  will match all files in all directories which are called "tmp" but NOT
  the directory itself, the empty directory "tmp" won't be ignored but
  will be included in the directory

This patch works by anchoring all globbing patterns at the end of the
line, except if they end with a slash. In this case, the PCRE is closed
with '($|/)' which causes an exact match of the directory name to be
ignored and everything below the directory as well.

My first try was to simply anchor all patterns except patterns ending
in '/', but that caused all directories I wanted to ignore to be
included. (However, without their contents.) It would have been neccessary
to explicitely exclude the directory as well, so I changed to behaviour
to the one explained above.

This feature has one drawback: ./**/tmp/ will also ignore all FILES which
are exactly called "tmp", not only the dirs. :-/ However, I consider the
overall matching behaviour with this patch to be a huge improvement over
the current situation.


escape_mode
***********
adds support for escaping characters with a backslash '\' and for bracket
expressions (character classes). This implementation requires the RE to
be interpreted as a PCRE, it's not correct if the resulting RE is
interpreted as a POSIX RE.

You can now write stuff like


  ./**/\[is[_.-]this[​_.-]an_intereres*tin​g\*filename\?[]!]?​

and it should work as expected. I implemented this as altough any pattern
can be directly written as an PCRE of course, a globbing pattern is
simpler to read if you eg. just want to use straight character classes.
Additionally, much more people know how to use globbing patterns than
PCREs. While the basics of PCREs are also simple and straight forward
most people do not seem to know that and appear to be frightened by them.


--
+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+
"Of course, just because we've heard a spine-chilling, blood-curdling
scream of the sort to make your very marrow freeze in your bones doesn't
automatically mean there's anything wrong." -- (Terry Pratchett,
Soul Music)
+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+
+ PGP-verschlüsselte Mails bevorzugt! +
+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+
Attachments

Re: FSVS and ignore patterns

Author pmarek
Full name P.Marek
Date 2007-04-03 01:24:55 PDT
Message > I'd like to release a new version (preferably tomorrow) with the ignore
> pattern changes applied, and wanted to ask you for a current set of
> patches.
If you still know what you do ;-), could you please just commit?
Preferably with the documentation updated a bit? Just do the comments in
the .c files, I'll regenerate and commit the doxygen documentation before
the release anyway.

Thank you!


Phil



--
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

FSVS and ignore patterns

Author pmarek
Full name P.Marek
Date 2007-04-03 01:18:51 PDT
Message Hello Gunter!


Maybe you still remember this:
http://thread.gmane.​org/gmane.comp.sysut​ils.backup.fsvs.deve​l/158/focus=162


I'd like to release a new version (preferably tomorrow) with the ignore
pattern changes applied, and wanted to ask you for a current set of
patches.

Do you remember the last status of that thread?


Thank you!

Phil


--
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!
Messages per page: