Login | Register
My pages Projects Community openCollabNet

Discussions > users > Re: Quick ignore / take question

fsvs
Discussion topic

Hide all messages in topic

All messages in topic

Re: Quick ignore / take question

Author Thomas Harold <tgh at tgharold dot com>
Full name Thomas Harold <tgh at tgharold dot com>
Date 2008-08-07 05:54:58 PDT
Message Philipp Marek wrote:
> Hello Thomas!
>
> On Thursday 07 August 2008 Thomas Harold wrote:
>> Thank you. Mmm... I now have the ordering of:
>>
>> t./var/vmail/**/.dovecot.sieve
>> t./var/vmail/sievescripts
>> ./var/vmail/
> OK so far.
>
>> Which seems like FSVS should ignore everything under /var/vmail/ except
>> for the sievescripts directory and any files below that point that are
>> named ".dovecot.sieve".
> Yes - and it can only ignore or take files *that it sees*. See below.
>
>> But fsvs status doesn't show updates when I sit in the root folder (root
>> of my working copy, where I always do my commands from):
>>
>> # fsvs status /
>> n... dir .
>> # fsvs status /var/
>> # fsvs status /var/vmail/
>> N... dir ./var/vmail/sievescripts
>> n... dir ./var/vmail
>> #
> I expect you have some more ignore entries than the few you cited above.
>

I do, and the full list looks like:

t./var/vmail/**/.dovecot.sieve
t./var/vmail/sievescripts
./var/vmail/
./backup/
./backuproot/
./bin/
./dev/
./etc/fsvs/
./etc/gconf/
./etc/gdm/
./home/
./lib/
./lib64/
./lost+found
./media/
./mnt/
./proc/
./root/
./sbin/
./selinux/
./srv/
./sys/
./tmp/
./usr/bin/
./usr/include/
./usr/kerberos/
./usr/lib/
./usr/lib64
./usr/libexec/
./usr/sbin/
./usr/share/
./usr/src/
./usr/tmp/
./usr/X11R6/
./var/cache/
./var/gdm/
./var/lib/
./var/lock/
./var/log/
./var/mailspool/
./var/mailspools/
./var/named/chroot/dev/
./var/named/chroot/proc/
./var/named/chroot/var/run/
./var/ntop/
./var/pgsql/data/base
./var/pgsql/data/global
./var/pgsql/data/pg_clog
./var/pgsql/data/pg_log
./var/pgsql/data/pg_multixact
./var/pgsql/data/pg_subtrans
./var/pgsql/data/pg_tblspec
./var/pgsql/data/pg_twophase
./var/pgsql/data/pg_xlog
./var/pgsql/lost+found/
./var/run/
./var/spool/
./var/svn/
./var/svn-bkp/
./var/tmp/

I haven't tried the other things you gave me yet.

Re: Quick ignore / take question

Author pmarek
Full name P.Marek
Date 2008-08-07 01:31:04 PDT
Message On Thursday 07 August 2008 Philipp Marek wrote:
...
> I'll try
> to get type-specific ignore patterns (or something similar) added for the
> next release.
You can also try the attached patch :-)


Regards,

Phil


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

Re: Quick ignore / take question

Author pmarek
Full name P.Marek
Date 2008-08-07 00:50:02 PDT
Message Hello Thomas!

On Thursday 07 August 2008 Thomas Harold wrote:
> Thank you. Mmm... I now have the ordering of:
>
> t./var/vmail/**/.dovecot.sieve
> t./var/vmail/sievescripts
> ./var/vmail/
OK so far.

> Which seems like FSVS should ignore everything under /var/vmail/ except
> for the sievescripts directory and any files below that point that are
> named ".dovecot.sieve".
Yes - and it can only ignore or take files *that it sees*. See below.

> But fsvs status doesn't show updates when I sit in the root folder (root
> of my working copy, where I always do my commands from):
>
> # fsvs status /
> n... dir .
> # fsvs status /var/
> # fsvs status /var/vmail/
> N... dir ./var/vmail/sievescripts
> n... dir ./var/vmail
> #
I expect you have some more ignore entries than the few you cited above.

> So a fsvs ci -m "comment" from the root won't do anything unless I:
>
> # fsvs ci -m "snapshot" /var/vmail/
> Committing to file:///var/svn/sys-fw1-pri-cfg
> n... dir ./var/vmail
> N... dir ./var/vmail/sievescripts
> committed revision 367 on 2008-08-06T23:48:53.176164Z as root
> #
>
> But it's still not grabbing the files inside of the sievescripts folder.
> Or looking for .dovecot.sieve files under the /var/vmail tree. The
> ".dovecot.sieve" folders are located two levels below /var/vmail:
>
> /var/vmail/domain/us​ername/.dovecot.siev​e
The logic in FSVS is:
- Read the directories
- Verify the ignore patterns for the entries
- For the remaining entries, go down recursively.

The problem is:
If you ignore /var/vmail/, FSVS doesn't look in subdirectories for possibly
matching entries.

In other words: If you want /var/vmail/domain/us​ername/.dovecot.siev​e
versioned, you'll need to have /var/vmail/domain/
and /var/vmail/domain/username taken as well - where should FSVS find or
store the entries if they weren't?

> Maybe I'm not understanding the USAGE file where you have patterns with
> spaces in them like: './ ** / *.bak'.
That must be an old version - the newer are fixed.
That was a relict because "/*" and "*/" are C comment strings, and so cannot
easily be put in the comments ;-(

> Also tried:
>
> t./var/vmail/*/*/.dovecot.sieve
> t./var/vmail/sievescripts
> ./var/vmail/
That's the same, for this usecase.

> If I create a test file in /var/, it immediately picks it up:
...
> Creating a test file in /var/vmail/ results in:
...
> Which is as expected. Moving the test file under
> /var/vmail/sievescripts then causes fsvs to see that there are actually
> things under /var/vmail/sievescripts that need to be versioned and
> results in a lot of new "N..." lines. It's like fsvs got itself
> "unstuck" and suddenly found the files as I changed things in
> /var/vmail/ itself.
Then there are (possibly two) problems:
* you already had /var/vmail/sievescripts committed (empty); FSVS sees that
  the mtime hasn't changed, and so doesn't try to read it again.
  You can try using -C to verify that.
* "t./var/vmail/sievescripts" means "take this entry", whereas
  "t./var/vmail/sievescripts/" means "take this entries children".

So you'll have to change the ignore pattern.


> Still can't get it to look in folders below /var/vmail/ or find those
> .dovecot.sieve files:
>
> t./var/vmail/**/.dovecot.sieve
> t./var/vmail/sievescripts
> ./var/vmail/
>
> And a "find /var/vmail -name .dovecot.sieve" pulls up 8 files under
> /var/vmail.
>
> I've also tried: "fsvs status -C -C" which took a while to run, but
> still didn't pickup on the ".dovecot.sieve" files in the individual mail
> folders. And running it solely on the /var/vmail/ tree results in:
>
> # fsvs status -C -C -v /var/vmail/
> ..... dir ./var/vmail
> ..... 5276 ./var/vmail/sievescr​ipts/survey-sortingr​ulesc
> ..... 48 ./var/vmail/sievescr​ipts/survey-BASEc
> ..... 58 ./var/vmail/sievescr​ipts/survey-BASE
> ..... 179 ./var/vmail/sievescr​ipts/Makefile
> ..... 3501 ./var/vmail/sievescr​ipts/survey-sortingr​ules.old
> ..... dir ./var/vmail/sievescripts
> ..... 4842 ./var/vmail/sievescr​ipts/survey-sortingr​ules
> #
The second "-C" causes FSVS to do MD5 calculation on all known files - that's
slow, right.
And the other listed entries are already versioned.

> Hmm, I just looked at the version - it's only 1.1.6 (been misreading
> that as 1.1.16).
>
> No luck, even with fsvs-1.1.16:1690, it's still not seeing the dovecot
> sieve files inside of individual user folders.
Yes, because FSVS doesn't look in arbitrary depths - it just checks level by
level for allowed entries.

I now tried to use ignore patterns like this:
    t./tree/*/
    t./tree/*/*/
    t./tree/*/*/.dot-files
    ./tree/**

I wanted to get FSVS to take the ".dot-files" 2 levels below the "tree", and
nothing else.
But that doesn't work as expected - any file on the first and second level are
taken, too.

I see two options:
* I'll have to implement type-specific ignore patterns, that eg. match only
  directories.
* The other way is to manually add the directories to FSVS' entry list; then
  the ".dovecot.sieve" files below should be found and taken automatically.


Please, try the "fsvs add" if that does what you need (for now); I'll try to
get type-specific ignore patterns (or something similar) added for the next
release.


Regards,

Phil


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

Re: Quick ignore / take question

Author Thomas Harold <tgh at tgharold dot com>
Full name Thomas Harold <tgh at tgharold dot com>
Date 2008-08-06 17:16:50 PDT
Message Philipp Marek wrote:
> Hello Thomas!
>
> On Tuesday 05 August 2008 Thomas Harold wrote:
>> Originally, we ignored /var/vmail (the entirety).
>>
>> ./var/vmail/
>>
>> Then I added (to the end):
> And that's the problem - the ignore patterns are used *in order*, and the
> first match terminates the search.
> So you'll have to move them to the front:
> fsvs ignore dump > file
> vi file
> fsvs ignore load < file

Thank you. Mmm... I now have the ordering of:

t./var/vmail/**/.dovecot.sieve
t./var/vmail/sievescripts
./var/vmail/

Which seems like FSVS should ignore everything under /var/vmail/ except
for the sievescripts directory and any files below that point that are
named ".dovecot.sieve".

But fsvs status doesn't show updates when I sit in the root folder (root
of my working copy, where I always do my commands from):

# fsvs status /
n... dir .
# fsvs status /var/
# fsvs status /var/vmail/
N... dir ./var/vmail/sievescripts
n... dir ./var/vmail
#

So a fsvs ci -m "comment" from the root won't do anything unless I:

# fsvs ci -m "snapshot" /var/vmail/
Committing to file:///var/svn/sys-fw1-pri-cfg
n... dir ./var/vmail
N... dir ./var/vmail/sievescripts
committed revision 367 on 2008-08-06T23:48:53.176164Z as root
#

But it's still not grabbing the files inside of the sievescripts folder.
  Or looking for .dovecot.sieve files under the /var/vmail tree. The
".dovecot.sieve" folders are located two levels below /var/vmail:

/var/vmail/domain/us​ername/.dovecot.siev​e

Maybe I'm not understanding the USAGE file where you have patterns with
spaces in them like: './ ** / *.bak'.

Also tried:

t./var/vmail/*/*/.dovecot.sieve
t./var/vmail/sievescripts
./var/vmail/

If I create a test file in /var/, it immediately picks it up:

  fsvs status
n... dir .
N... 5 ./var/test
.mC. dir ./var
#

Creating a test file in /var/vmail/ results in:

# fsvs status
n... dir .
.m.. dir ./var/vmail
.m.. dir ./var
#

Which is as expected. Moving the test file under
/var/vmail/sievescripts then causes fsvs to see that there are actually
things under /var/vmail/sievescripts that need to be versioned and
results in a lot of new "N..." lines. It's like fsvs got itself
"unstuck" and suddenly found the files as I changed things in
/var/vmail/ itself.

Still can't get it to look in folders below /var/vmail/ or find those
.dovecot.sieve files:

t./var/vmail/**/.dovecot.sieve
t./var/vmail/sievescripts
./var/vmail/

And a "find /var/vmail -name .dovecot.sieve" pulls up 8 files under
/var/vmail.

I've also tried: "fsvs status -C -C" which took a while to run, but
still didn't pickup on the ".dovecot.sieve" files in the individual mail
folders. And running it solely on the /var/vmail/ tree results in:

# fsvs status -C -C -v /var/vmail/
..... dir ./var/vmail
..... 5276 ./var/vmail/sievescr​ipts/survey-sortingr​ulesc
..... 48 ./var/vmail/sievescr​ipts/survey-BASEc
..... 58 ./var/vmail/sievescr​ipts/survey-BASE
..... 179 ./var/vmail/sievescr​ipts/Makefile
..... 3501 ./var/vmail/sievescr​ipts/survey-sortingr​ules.old
..... dir ./var/vmail/sievescripts
..... 4842 ./var/vmail/sievescr​ipts/survey-sortingr​ules
#

Hmm, I just looked at the version - it's only 1.1.6 (been misreading
that as 1.1.16).

No luck, even with fsvs-1.1.16:1690, it's still not seeing the dovecot
sieve files inside of individual user folders.

Re: Quick ignore / take question (fsvs-1.1.6:900)

Author pmarek
Full name P.Marek
Date 2008-08-06 06:46:27 PDT
Message > And that's the problem - the ignore patterns are used *in order*, and the
> first match terminates the search.
> So you'll have to move them to the front:
> fsvs ignore dump > file
> vi file
> fsvs ignore load < file
BTW, you could also just prepend (or insert) the new patterns at the front -
but then they'd have to be checked twice, which is not optimal.


Regards,

Phil


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

Re: Quick ignore / take question (fsvs-1.1.6:900)

Author pmarek
Full name P.Marek
Date 2008-08-06 00:44:01 PDT
Message Hello Thomas!

On Tuesday 05 August 2008 Thomas Harold wrote:
> Originally, we ignored /var/vmail (the entirety).
>
> ./var/vmail/
>
> Then I added (to the end):
And that's the problem - the ignore patterns are used *in order*, and the
first match terminates the search.
So you'll have to move them to the front:
    fsvs ignore dump > file
    vi file
    fsvs ignore load < file


Regards,

Phil


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

Quick ignore / take question (fsvs-1.1.6:900)

Author Thomas Harold <tgh at tgharold dot com>
Full name Thomas Harold <tgh at tgharold dot com>
Date 2008-08-05 09:01:03 PDT
Message Originally, we ignored /var/vmail (the entirety).

./var/vmail/

Then I added (to the end):

t./var/vmail/sievescripts
t./var/vmail/**/.dovecot.sieve

So now I want to put the /var/vmail/sievescripts folder under version
control, as well as any ".dovecot.sieve" files below that point. But
not anything else.

But an "fsvs status" from the root folder doesn't show those "taken"
patterns, nor does a "fsvs ci -m 'message'" grab those files.

Not sure what else I needed to do.
Messages per page: