Login | Register
My pages Projects Community openCollabNet

Discussions > users > Re: Questions about ignoring files

fsvs
Discussion topic

Hide all messages in topic

All messages in topic

Re: Questions about ignoring files [PATCH]

Author pmarek
Full name P.Marek
Date 2008-07-18 11:58:38 PDT
Message On Friday 18 July 2008 Maurice van der Pot wrote:
> On Thu, Jul 17, 2008 at 01:13:38PM +0200, Philipp Marek wrote:
> > Does it hurt that much to allow property changes on the directory to be
> > committed? It takes only a few bytes in the repository (AFAIK).
> > Why do you want to avoid that?
>
> It's not so much the committing that I want to avoid as it is the
> showing up in the output of fsvs status. It would be perfect if the need
> to commit was directly linked to whether or not fsvs status generated
> any output.
There's the option "empty_commit" - that can avoid completely no-op commits.
And if you additionally use "-ftext" on commit you shouldn't get meta-only
changes - but that means that changed rights per se won't be committed, too.

You could try
    fsvs ci -o empty_commit=no -C -f text,owner,group,mode
That should commit exactly what you want - all changes except mtime-only,
and won't create empty commits.

But please note: the "mode" specification is r1820, only a few minutes
old - and untested.
(You might want to do a backport of this change, to use a released
version, and not the current trunk - which is a bit in flux. See the
end of the mail.)

> It's like compiler warnings: I like to get rid of any messages even if
> they're not really important to make sure that I will not overlook the
> important ones later.
Right.

> > Otherwise you'd need a way to selectively ignore changes on entries ...
> > Hmmm.
>
> Something to look forward to? =)
Does the above suffice? Or do you have the distinct requirement to ignore
mtime changes on specific entries only?


Regards,

Phil


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



Index: src/fsvs.c
====================​====================​====================​=======
--- src/fsvs.c (Revision 1819)
+++ src/fsvs.c (Revision 1820)
@@ -207,8 +207,8 @@
  * operations, modification of the work done on given entries.
  *
  * It requires a specification at the end, which can be any combination of
- * \c any, \c text, \c new, \c deleted, \c meta, \c mtime, \c group or \c
- * owner.
+ * \c any, \c text, \c new, \c deleted, \c meta, \c mtime, \c group, \c mode
+ * or \c owner.
  *
  * By giving eg. the value \c text, with a \ref status action only entries
  * that are new or changed are shown; with \c mtime,group only entries
Index: src/options.c
====================​====================​====================​=======
--- src/options.c (Revision 1819)
+++ src/options.c (Revision 1820)
@@ -73,6 +73,7 @@ const struct opt___val_str_t opt___filte
        { .val=FS_META_CHANGED, .string="meta" },
        { .val=FS_META_MTIME, .string="mtime" },
        { .val=FS_META_OWNER, .string="owner" },
+ { .val=FS_META_UMODE, .string="mode" },
        { .val=FS_META_GROUP, .string="group" },
        { .val=FS_NEW, .string="new" },
        { .val=FS_REMOVED, .string="deleted" },
Index: CHANGES
====================​====================​====================​=======
--- CHANGES (Revision 1819)
+++ CHANGES (Revision 1820)
@@ -17,6 +17,7 @@ Changes since 1.1.16
 - New command "rel-ignore" for converting input to relative ignore
        patterns.
 - Try to get the directory mtimes correct again.
+- The filter option now allows "mode", too.

 Changes since 1.1.15
 - FSVS_WARNINGS removed. Use FSVS_WARNING.

Re: Questions about ignoring files

Author griffon26
Full name Maurice van der Pot
Date 2008-07-18 10:54:56 PDT
Message On Thu, Jul 17, 2008 at 01:13:38PM +0200, Philipp Marek wrote:
> Does it hurt that much to allow property changes on the directory to be committed? It
> takes only a few bytes in the repository (AFAIK).
> Why do you want to avoid that?

It's not so much the committing that I want to avoid as it is the
showing up in the output of fsvs status. It would be perfect if the need
to commit was directly linked to whether or not fsvs status generated
any output.

It's like compiler warnings: I like to get rid of any messages even if
they're not really important to make sure that I will not overlook the
important ones later.

> Otherwise you'd need a way to selectively ignore changes on entries ... Hmmm.

Something to look forward to? =)

Thanks,
Maurice.

--
Maurice van der Pot

Gentoo Linux Developer griffon26 at gentoo dot org http://www.gentoo.org
Gnome Planner Developer griffon26 at kfk4ever dot com http://live.gnome.org/Planner
Attachments

Re: Questions about ignoring files

Author pmarek
Full name P.Marek
Date 2008-07-17 10:22:56 PDT
Message On Tuesday 15 July 2008 Maurice van der Pot wrote:
> On Tue, Jul 15, 2008 at 08:16:40PM +0200, Philipp Marek wrote:
> > And now I may have another way for your setup - use the softroot option.
> >
> > Ie. set FSVS_SOFTROOT=$HOME FSVS_CONF=/.fsvs FSVS_WAA=$FSVS_CONF/waa, and
> > tell FSVS to keep $HOME versioned - that will have the same hash
> > everywhere (6666cd76f96956469e7​be39d750cc7d9), and the machine-dependent
> > $HOME is done via the softroot.
>
> Yes, this would be great, except that right now it fails in waa_init
> with:
>
> An error occurred: No such file or directory (2) in waa__init: stat()
> of waa-path '/.fsvs/waa' failed. Does your local storage area exist?
>
> because it uses the CONF and WAA directories before it prefixes them
> with the SOFTROOT.
>
> line 204:
> STOPIF( hlp__lstat(opt__get_​string(OPT__WAA_PATH​), &waa_stat),
> "!stat() of waa-path \"%s\" failed. "
> "Does your local WAA storage area exist? ",
> opt__get_string(OPT_​_WAA_PATH));
>
> line 240:
> waa___init_path(OPT__WAA_PATH, waa_tmp_path, &waa_tmp_fn);
I just fixed that - the validation of the waa and conf path was too early,
before taking the softroot into consideration.

Now it should work with the shorter definition, too - without having the
softroot in front.


> I tried to think of a way to modify the tests to show the problem, but
> the "cd /" in 051_softroot scared me away ;-)
Well, don't worry - I test FSVS several times an hour, and often enough even
as root user - so you see I'm confident that no major data loss should happen
because of FSVS :-)


Regards,

Phil

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

Re: Questions about ignoring files

Author pmarek
Full name P.Marek
Date 2008-07-17 04:13:38 PDT
Message Hello Maurice!

> On Wed, Jul 16, 2008 at 07:17:07AM +0200, Philipp Marek wrote:
>> > An error occurred: No such file or directory (2) in waa__init: stat()
>> > of waa-path '/.fsvs/waa' failed. Does your local storage area exist?
>> >
>> > because it uses the CONF and WAA directories before it prefixes them
>> > with the SOFTROOT.
>> And if you set FSVS_CONF=$FSVS_SOFTROOT/.fsvs FSVS_WAA=$FSVS_CONF/waa,
>> how about that?
>
> Yes, that works.
Fine.


> Another related question: is it possible to selectively ignore mtime
> changes for instance? I know I can get fsvs status to do this
> indiscriminately, but I am looking for a way to tell fsvs to ignore
> mtime changes on specific directories.
>
> The reason I'd like this is that I have a directory in which a few files
> are ignored and others have been checked in.
>
> If the mtime of the directory changes as the result of changes to the
> ignored files, then I'd like fsvs to ignore these changes altogether.
When files in a directory are changed, the directory doesn't change - only if files are
created or removed.
It may be that your editor uses temporary files in this directory and causes the mtime
to change - maybe you can set that path to some other, fixed location like /tmp.

> On the other hand if files not matching the ignore pattern are added to
> that directory, I want them to show up in fsvs status, so it's not an
> option to just ignore the entire directory.
>
> If this is not currently available, I'd settle for a way to always
> ignore mtimes, because I don't use them anyway.
There's no easy way to do that *yet*.

Does it hurt that much to allow property changes on the directory to be committed? It
takes only a few bytes in the repository (AFAIK).
Why do you want to avoid that?

You could try using "fsvs ci -ftext" or "fsvs ci -fnew,deleted" - although you should be
warned: there be dragons here (still).


Otherwise you'd need a way to selectively ignore changes on entries ... Hmmm.


Regards,

Phil


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

Re: Questions about ignoring files

Author griffon26
Full name Maurice van der Pot
Date 2008-07-17 03:58:04 PDT
Message On Wed, Jul 16, 2008 at 07:17:07AM +0200, Philipp Marek wrote:
> > An error occurred: No such file or directory (2) in waa__init: stat()
> > of waa-path '/.fsvs/waa' failed. Does your local storage area exist?
> >
> > because it uses the CONF and WAA directories before it prefixes them
> > with the SOFTROOT.
> And if you set FSVS_CONF=$FSVS_SOFTROOT/.fsvs FSVS_WAA=$FSVS_CONF/waa,
> how about that?

Yes, that works.


Another related question: is it possible to selectively ignore mtime
changes for instance? I know I can get fsvs status to do this
indiscriminately, but I am looking for a way to tell fsvs to ignore
mtime changes on specific directories.

The reason I'd like this is that I have a directory in which a few files
are ignored and others have been checked in.

If the mtime of the directory changes as the result of changes to the
ignored files, then I'd like fsvs to ignore these changes altogether.

On the other hand if files not matching the ignore pattern are added to
that directory, I want them to show up in fsvs status, so it's not an
option to just ignore the entire directory.


If this is not currently available, I'd settle for a way to always
ignore mtimes, because I don't use them anyway.

Regards,
Maurice.

--
Maurice van der Pot

Gentoo Linux Developer griffon26 at gentoo dot org http://www.gentoo.org
Gnome Planner Developer griffon26 at kfk4ever dot com http://live.gnome.org/Planner
Attachments

Re: Questions about ignoring files

Author pmarek
Full name P.Marek
Date 2008-07-16 20:37:21 PDT
Message Just BTW, because I took a look:

On Tuesday 15 July 2008 Maurice van der Pot wrote:
> On Tue, Jul 15, 2008 at 08:16:40PM +0200, Philipp Marek wrote:
> > The hash is simply MD5(wcroot) - so /etc will be
> > 182f153bd94803955c20​43e6f2581d5d on *every* machine.
>
> That's good to know. Is this in the docs somewhere? Might be useful to
> add if it isn't.
http://fsvs.tigris.o​rg/source/browse/*ch​eckout*/fsvs/trunk/w​ww/doxygen/html/grou​p__waa__files.html

    Files used by fsvs

    ...
    So wherever pathnames or similar things are stored (eg. patterns), they are
    NUL -terminated; for addressing specific files the MD5 hash over the filename
    is used.

But the text shown there could be better.


Regards,

Phil

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

Re: Questions about ignoring files

Author pmarek
Full name P.Marek
Date 2008-07-15 22:17:07 PDT
Message >> And now I may have another way for your setup - use the softroot option.
>>
>> Ie. set FSVS_SOFTROOT=$HOME FSVS_CONF=/.fsvs FSVS_WAA=$FSVS_CONF/waa, and tell
>> FSVS to keep $HOME versioned - that will have the same hash everywhere
>> (6666cd76f96956469e7​be39d750cc7d9), and the machine-dependent $HOME is done
>> via the softroot.
>
> Yes, this would be great, except that right now it fails in waa_init
> with:
>
> An error occurred: No such file or directory (2) in waa__init: stat()
> of waa-path '/.fsvs/waa' failed. Does your local storage area exist?
>
> because it uses the CONF and WAA directories before it prefixes them
> with the SOFTROOT.
And if you set FSVS_CONF=$FSVS_SOFTROOT/.fsvs FSVS_WAA=$FSVS_CONF/waa,
how about that?


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

Re: Questions about ignoring files

Author griffon26
Full name Maurice van der Pot
Date 2008-07-15 14:07:06 PDT
Message On Tue, Jul 15, 2008 at 08:16:40PM +0200, Philipp Marek wrote:
> The hash is simply MD5(wcroot) - so /etc will be
> 182f153bd94803955c20​43e6f2581d5d on *every* machine.

That's good to know. Is this in the docs somewhere? Might be useful to
add if it isn't.

> But FSVS_CONF will be different in your example - because $HOME differs, or am
> I wrong here?

Yes, I have some accounts with different usernames. I was just looking
ahead though.. at the moment I'm still evaluating fsvs on machines where
I have the same username.

> > I'm using fsvs as a normal user with FSVS_CONF=${HOME}/.fsvs and
> > FSVS_WAA=${FSVS_CONF}/waa. I'm using this with just this one account.
> IIUYC, you have just one account *per machine*, right?

Correct.

> And now I may have another way for your setup - use the softroot option.
>
> Ie. set FSVS_SOFTROOT=$HOME FSVS_CONF=/.fsvs FSVS_WAA=$FSVS_CONF/waa, and tell
> FSVS to keep $HOME versioned - that will have the same hash everywhere
> (6666cd76f96956469e7​be39d750cc7d9), and the machine-dependent $HOME is done
> via the softroot.

Yes, this would be great, except that right now it fails in waa_init
with:

  An error occurred: No such file or directory (2) in waa__init: stat()
  of waa-path '/.fsvs/waa' failed. Does your local storage area exist?

because it uses the CONF and WAA directories before it prefixes them
with the SOFTROOT.

line 204:
    STOPIF( hlp__lstat(opt__get_​string(OPT__WAA_PATH​), &waa_stat),
            "!stat() of waa-path \"%s\" failed. "
            "Does your local WAA storage area exist? ",
            opt__get_string(OPT_​_WAA_PATH));

line 240:
    waa___init_path(OPT__WAA_PATH, waa_tmp_path, &waa_tmp_fn);

I tried to think of a way to modify the tests to show the problem, but
the "cd /" in 051_softroot scared me away ;-)

Regards,
Maurice.

--
Maurice van der Pot

Gentoo Linux Developer griffon26 at gentoo dot org http://www.gentoo.org
Gnome Planner Developer griffon26 at kfk4ever dot com http://live.gnome.org/Planner
Attachments

Re: Questions about ignoring files

Author pmarek
Full name P.Marek
Date 2008-07-15 11:16:40 PDT
Message On Tuesday 15 July 2008 Maurice van der Pot wrote:
> On Tue, Jul 15, 2008 at 03:51:10PM +0200, Philipp Marek wrote:
> > Hello Maurice,
> >
> > > On Sat, Jul 12, 2008 at 02:35:32PM +0200, Philipp Marek wrote:
> > >> And the ignore patterns are versioned - as soon as your
> > >> $FSVS_CONF/$WC_DIR/Ign file is versioned, too (for /etc as WC and
> > >> default-config you'll get that automatically - eg.
> > >> "/etc/fsvs/182f153bd​94803955c2043e6f2581​d5d/Ign")
> > >
> > > Won't I have a problem if I check out someplace else?
> > > If I add $FSVS_CONF/$WC_DIR/Ign on host A and check out on host B,
> > > won't the Ign file be under the wrong $WC_DIR?
> >
> > Yes, if $FSVS_CONF is different it won't match.
>
> I plan to use the same value for FSVS_CONF everywhere (${HOME}/.fsvs),
> but I mean that the WC_DIR (182f153bd94803955c2​043e6f2581d5d in your
> example) changes. It looks like a hash and although I don't know what is
> used to create it,
The hash is simply MD5(wcroot) - so /etc will be
182f153bd94803955c20​43e6f2581d5d on *every* machine.

But FSVS_CONF will be different in your example - because $HOME differs, or am
I wrong here?

> it obviously will have to be different for a second
> checkout on the same machine with the same value for FSVS_CONF (not that
> that is a use-case for me).
Of course - different WC-roots get different hashes.

> > But do you use anything else than /etc/fsvs? Oh yes, you said you're
> > versioning your /home. Do you commit as user, or are these backups
> > started per cron as root? You could try to do "chown <user>
> > /etc/fsvs/<wc-dir>", and use a per-user WAA.
>
> I'm using fsvs as a normal user with FSVS_CONF=${HOME}/.fsvs and
> FSVS_WAA=${FSVS_CONF}/waa. I'm using this with just this one account.
IIUYC, you have just one account *per machine*, right?

> I only add 'important' configuration files to version management and
> commit whenever I have changed one of them. I add pretty much everything
> else in my homedir to the ignore list.
>
> I want to use this to easily check out the set of configuration files to
> my homedir on other machines.
And on these other machines you have a different $HOME?

> > > How can I version the ignore list in such a way that when I check out
> > > on a different machine the ignore list still works?
> > >
> > > The best way I can come up with now is to hard-link it to a location
> > > under the repository root and add that file to version control,
> > > although that will be a manual action that has to be repeated for each
> > > check-out.
> >
> > I'd try to use a symlink rather than a hardlink.
>
> A symlink in ${FSVS_CONF}/${WC_DIR}.. I'll see if that works.

> > I can't quite follow your setup or requirements - but might it be an idea
> > to use a dummy "ignore" file that has an update- and commit-pipe set, eg.
> > to "cat $FSVS_CONF/xx/Ign"?
>
> That's also an option. Will keep that one in mind.
>
> In either case, setting this up will still depend on the actual WC_DIR.
> I'm still hoping the hash only depends on the directory where the
> checkout is done.
Yes, it does.

And now I may have another way for your setup - use the softroot option.

Ie. set FSVS_SOFTROOT=$HOME FSVS_CONF=/.fsvs FSVS_WAA=$FSVS_CONF/waa, and tell
FSVS to keep $HOME versioned - that will have the same hash everywhere
(6666cd76f96956469e7​be39d750cc7d9), and the machine-dependent $HOME is done
via the softroot.


Score +1 for the flexibility of FSVS ;-)


Regards,

Phil


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

Re: Questions about ignoring files

Author griffon26
Full name Maurice van der Pot
Date 2008-07-15 09:23:47 PDT
Message On Tue, Jul 15, 2008 at 03:51:10PM +0200, Philipp Marek wrote:
> Hello Maurice,
>
> > On Sat, Jul 12, 2008 at 02:35:32PM +0200, Philipp Marek wrote:
> >> And the ignore patterns are versioned - as soon as your $FSVS_CONF/$WC_DIR/Ign
> >> file is versioned, too (for /etc as WC and default-config you'll get that
> >> automatically - eg. "/etc/fsvs/182f153bd​94803955c2043e6f2581​d5d/Ign")
> >
> > Won't I have a problem if I check out someplace else?
> > If I add $FSVS_CONF/$WC_DIR/Ign on host A and check out on host B, won't
> > the Ign file be under the wrong $WC_DIR?
> Yes, if $FSVS_CONF is different it won't match.

I plan to use the same value for FSVS_CONF everywhere (${HOME}/.fsvs),
but I mean that the WC_DIR (182f153bd94803955c2​043e6f2581d5d in your
example) changes. It looks like a hash and although I don't know what is
used to create it, it obviously will have to be different for a second
checkout on the same machine with the same value for FSVS_CONF (not that
that is a use-case for me).

> But do you use anything else than /etc/fsvs? Oh yes, you said you're versioning your
> /home. Do you commit as user, or are these backups started per cron as root?
> You could try to do "chown <user> /etc/fsvs/<wc-dir>", and use a per-user WAA.

I'm using fsvs as a normal user with FSVS_CONF=${HOME}/.fsvs and
FSVS_WAA=${FSVS_CONF}/waa. I'm using this with just this one account.

I only add 'important' configuration files to version management and
commit whenever I have changed one of them. I add pretty much everything
else in my homedir to the ignore list.

I want to use this to easily check out the set of configuration files to
my homedir on other machines.

> > How can I version the ignore list in such a way that when I check out on
> > a different machine the ignore list still works?
> >
> > The best way I can come up with now is to hard-link it to a location
> > under the repository root and add that file to version control, although
> > that will be a manual action that has to be repeated for each check-out.
> I'd try to use a symlink rather than a hardlink.

A symlink in ${FSVS_CONF}/${WC_DIR}.. I'll see if that works.

> I can't quite follow your setup or requirements - but might it be an idea to use a dummy
> "ignore" file that has an update- and commit-pipe set, eg. to "cat $FSVS_CONF/xx/Ign"?

That's also an option. Will keep that one in mind.

In either case, setting this up will still depend on the actual WC_DIR.
I'm still hoping the hash only depends on the directory where the
checkout is done.

Regards,
Maurice.

--
Maurice van der Pot

Gentoo Linux Developer griffon26 at gentoo dot org http://www.gentoo.org
Gnome Planner Developer griffon26 at kfk4ever dot com http://live.gnome.org/Planner
Attachments

Re: Questions about ignoring files

Author pmarek
Full name P.Marek
Date 2008-07-15 06:51:10 PDT
Message Hello Maurice,

> On Sat, Jul 12, 2008 at 02:35:32PM +0200, Philipp Marek wrote:
>> And the ignore patterns are versioned - as soon as your $FSVS_CONF/$WC_DIR/Ign
>> file is versioned, too (for /etc as WC and default-config you'll get that
>> automatically - eg. "/etc/fsvs/182f153bd​94803955c2043e6f2581​d5d/Ign")
>
> Won't I have a problem if I check out someplace else?
> If I add $FSVS_CONF/$WC_DIR/Ign on host A and check out on host B, won't
> the Ign file be under the wrong $WC_DIR?
Yes, if $FSVS_CONF is different it won't match.

But do you use anything else than /etc/fsvs? Oh yes, you said you're versioning your
/home. Do you commit as user, or are these backups started per cron as root?
You could try to do "chown <user> /etc/fsvs/<wc-dir>", and use a per-user WAA.


> How can I version the ignore list in such a way that when I check out on
> a different machine the ignore list still works?
>
> The best way I can come up with now is to hard-link it to a location
> under the repository root and add that file to version control, although
> that will be a manual action that has to be repeated for each check-out.
I'd try to use a symlink rather than a hardlink.

I can't quite follow your setup or requirements - but might it be an idea to use a dummy
"ignore" file that has an update- and commit-pipe set, eg. to "cat $FSVS_CONF/xx/Ign"?


Regards,

Phil


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

Re: Questions about ignoring files

Author griffon26
Full name Maurice van der Pot
Date 2008-07-15 05:20:28 PDT
Message On Sat, Jul 12, 2008 at 02:35:32PM +0200, Philipp Marek wrote:
> And the ignore patterns are versioned - as soon as your $FSVS_CONF/$WC_DIR/Ign
> file is versioned, too (for /etc as WC and default-config you'll get that
> automatically - eg. "/etc/fsvs/182f153bd​94803955c2043e6f2581​d5d/Ign")

Won't I have a problem if I check out someplace else?
If I add $FSVS_CONF/$WC_DIR/Ign on host A and check out on host B, won't
the Ign file be under the wrong $WC_DIR?

How can I version the ignore list in such a way that when I check out on
a different machine the ignore list still works?

The best way I can come up with now is to hard-link it to a location
under the repository root and add that file to version control, although
that will be a manual action that has to be repeated for each check-out.

Thanks for your help,
Maurice.

--
Maurice van der Pot

Gentoo Linux Developer griffon26 at gentoo dot org http://www.gentoo.org
Gnome Planner Developer griffon26 at kfk4ever dot com http://live.gnome.org/Planner
Attachments

Re: Questions about ignoring files

Author pmarek
Full name P.Marek
Date 2008-07-14 08:40:14 PDT
Message On Sunday 13 July 2008 Maurice van der Pot wrote:
> If I'm not mistaken there are only two types of ignore patterns:
> relative ones (to the repository root) and absolute ones.
>
> My guess is that the relative ones are used more often than the absolute
> ones.
I think so, too.

> I think it would be very useful to be able to use all normal features in
> specifying paths (variables such as ${HOME}, wildcards expanded by the
> shell, the tab-key to complete a partial path, etc).
>
> This can be achieved by just prefixing absolute paths with a special
> character such as : or =, so tab completion and the like will still work.
I'll think about that; maybe I'll have an idea.

> I must admit I have not considered how this would interact with regular
> expressions though.
Well, how about "fsvs rel-ignore" (with an abbreviation "ri") that parses all
paths to be WC-relative?

Completely compatible, and should be easily done.


How about that?


Regards,

Phil

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

Re: Questions about ignoring files

Author griffon26
Full name Maurice van der Pot
Date 2008-07-13 11:21:28 PDT
Message On Sat, Jul 12, 2008 at 03:59:03PM +0200, Philipp Marek wrote:
> > > fsvs ignore $PWD/somefile
> >
> > I've put my homedir under version control as a normal user. I'm guessing
> > this will not only issue a warning, but will also not work if I check
> > out to a different base directory (for instance if my username is
> > different on another host).
> Yes, that's right.
> I'll have to think about some way to distinguish a general "based on WC-root"
> pattern from "starts here" - possibly by looking whether that path exists
> *only* in the CWD but not in the WC, and *doesn't* start with "./" - else it
> wouldn't be clear what the user wants.
> "./" is defined to be used from the WC root - which, looking back, might be a
> bit unfortunate. Maybe I'll have to change that.

If I'm not mistaken there are only two types of ignore patterns:
relative ones (to the repository root) and absolute ones.

My guess is that the relative ones are used more often than the absolute
ones.

I think it would be very useful to be able to use all normal features in
specifying paths (variables such as ${HOME}, wildcards expanded by the
shell, the tab-key to complete a partial path, etc).

This can be achieved by just prefixing absolute paths with a special
character such as : or =, so tab completion and the like will still work.

I must admit I have not considered how this would interact with regular
expressions though.

My $0.02
 
Regards,
Maurice.

--
Maurice van der Pot

Gentoo Linux Developer griffon26 at gentoo dot org http://www.gentoo.org
Gnome Planner Developer griffon26 at kfk4ever dot com http://live.gnome.org/Planner
Attachments

Re: Questions about ignoring files

Author Sheldon Hearn <sheldonh at starjuice dot net>
Full name Sheldon Hearn <sheldonh at starjuice dot net>
Date 2008-07-12 07:16:43 PDT
Message -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday 12 July 2008 14:55:44 Maurice van der Pot wrote:
> Ok, I will do that.  I was hesitant to add fsvs' directory to version
> control. It kinda felt like doing svn add .svn ;-)

I had that anxiety when I started too. It may be worth covering this in
some of the new user documentation.

Ciao,
Sheldon.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFIeLzLpGJX8XSg​as0RAkITAKCUaANfuCTA​BWl8UL527H8SbSLPJQCg​rgSI
uZrEgPDxjJkqLj9c/AvhsIo=
=FSkq
-----END PGP SIGNATURE-----

Re: Questions about ignoring files

Author pmarek
Full name P.Marek
Date 2008-07-12 07:02:53 PDT
Message On Saturday 12 July 2008 Philipp Marek wrote:
> I'll take a look what's useful. Thank you!
r1797. Thank you.


Regards,

Phil



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

Re: Questions about ignoring files

Author pmarek
Full name P.Marek
Date 2008-07-12 06:59:03 PDT
Message On Saturday 12 July 2008 Maurice van der Pot wrote:
> On Sat, Jul 12, 2008 at 02:35:32PM +0200, Philipp Marek wrote:
> > Well, "svn:ignore" is defined to be per-directory - which is very
> > impractical if you're versioning several hundred thousand items spread
> > over big hierarchies, and you want to ignore "*.bak" everywhere.
> >
> > That's why FSVS doesn't use this property.
> Ok, I originally just assumed you would have used svn properties
> (svn:fsvs-ignore or whatever) for all metadata.
Only where it works.

As the ignore list can easily be several KB I didn't want to put it in a
property - they should be kept small.

> > And the ignore patterns are versioned - as soon as your
> > $FSVS_CONF/$WC_DIR/Ign file is versioned, too (for /etc as WC and
> > default-config you'll get that automatically - eg.
> > "/etc/fsvs/182f153bd​94803955c2043e6f2581​d5d/Ign")
>
> Ok, I will do that. I was hesitant to add fsvs' directory to version
> control. It kinda felt like doing svn add .svn ;-)
Well - the things that shouldn't be versioned are in $FSVS_WAA
(/var/spool/fsvs), and are automatically ignored.

So it's more like versioning ~/.subversion :-)


> > > Imho it would be useful to perform ignores relative to
> > > the current directory, would it not?
> >
> > Yes, you're right.
> > Did you try this:
> > fsvs ignore $PWD/somefile
>
> I've put my homedir under version control as a normal user. I'm guessing
> this will not only issue a warning, but will also not work if I check
> out to a different base directory (for instance if my username is
> different on another host).
Yes, that's right.
I'll have to think about some way to distinguish a general "based on WC-root"
pattern from "starts here" - possibly by looking whether that path exists
*only* in the CWD but not in the WC, and *doesn't* start with "./" - else it
wouldn't be clear what the user wants.
"./" is defined to be used from the WC root - which, looking back, might be a
bit unfortunate. Maybe I'll have to change that.

> > > P.S.: I had to make two changes before I was able to build fsvs on my
> > > system. I attached a patch containing them.
> >
> > Thank you, I'll take a look.
> > Is that for Gentoo? I'd thought that FSVS was already available as a
> > package there, isn't it?
>
> Not unless they got creative and changed the name.
> I only just noticed an ebuild has been submitted to bugzilla
> (http://bugs.gentoo.o​rg/show_bug.cgi?id=1​93989), but it's not part of
> portage yet.
I'll take a look what's useful. Thank you!


Regards,

Phil


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

Re: Questions about ignoring files

Author griffon26
Full name Maurice van der Pot
Date 2008-07-12 05:55:44 PDT
Message On Sat, Jul 12, 2008 at 02:35:32PM +0200, Philipp Marek wrote:
> Well, "svn:ignore" is defined to be per-directory - which is very impractical
> if you're versioning several hundred thousand items spread over big
> hierarchies, and you want to ignore "*.bak" everywhere.
>
> That's why FSVS doesn't use this property.

Ok, I originally just assumed you would have used svn properties
(svn:fsvs-ignore or whatever) for all metadata.

> And the ignore patterns are versioned - as soon as your $FSVS_CONF/$WC_DIR/Ign
> file is versioned, too (for /etc as WC and default-config you'll get that
> automatically - eg. "/etc/fsvs/182f153bd​94803955c2043e6f2581​d5d/Ign")

Ok, I will do that. I was hesitant to add fsvs' directory to version
control. It kinda felt like doing svn add .svn ;-)

> > Imho it would be useful to perform ignores relative to
> > the current directory, would it not?
> Yes, you're right.
> Did you try this:
> fsvs ignore $PWD/somefile

I've put my homedir under version control as a normal user. I'm guessing
this will not only issue a warning, but will also not work if I check
out to a different base directory (for instance if my username is
different on another host).

> > P.S.: I had to make two changes before I was able to build fsvs on my
> > system. I attached a patch containing them.
> Thank you, I'll take a look.
> Is that for Gentoo? I'd thought that FSVS was already available as a package
> there, isn't it?

Not unless they got creative and changed the name.
I only just noticed an ebuild has been submitted to bugzilla
(http://bugs.gentoo.o​rg/show_bug.cgi?id=1​93989), but it's not part of
portage yet.

Regards,
Maurice.

--
Maurice van der Pot

Gentoo Linux Developer griffon26 at gentoo dot org http://www.gentoo.org
Gnome Planner Developer griffon26 at kfk4ever dot com http://live.gnome.org/Planner
Attachments

Re: Questions about ignoring files

Author pmarek
Full name P.Marek
Date 2008-07-12 05:35:32 PDT
Message Hello Maurice,

please forgive the long delay - I've been on vacation.

On Monday 07 July 2008 Maurice van der Pot wrote:
> I just started using fsvs and I have a few questions about ignoring
> files.
>
> If I'm not mistaken the ignore list is something specific to a working
> copy; it is not versioned itself. I was wondering why this is, because
> it seems useful to me to have the ignore list under version control
> (like svn:ignore).
Well, "svn:ignore" is defined to be per-directory - which is very impractical
if you're versioning several hundred thousand items spread over big
hierarchies, and you want to ignore "*.bak" everywhere.

That's why FSVS doesn't use this property.


And the ignore patterns are versioned - as soon as your $FSVS_CONF/$WC_DIR/Ign
file is versioned, too (for /etc as WC and default-config you'll get that
automatically - eg. "/etc/fsvs/182f153bd​94803955c2043e6f2581​d5d/Ign")


> Furthermore I noticed that ignore patterns are always added literally,
> regardless of where you add them. So if I am in a deep subdirectory
> somewhere, I cannot just type "fsvs ignore ./somefile" to ignore a file
> in that directory; I will have to type the entire path from the root of
> my working copy. Imho it would be useful to perform ignores relative to
> the current directory, would it not?
Yes, you're right.
Did you try this:
    fsvs ignore $PWD/somefile

I guess I'll have to document that - it's not mentioned anywhere yet.


> P.S.: I had to make two changes before I was able to build fsvs on my
> system. I attached a patch containing them.
Thank you, I'll take a look.
Is that for Gentoo? I'd thought that FSVS was already available as a package
there, isn't it?


Regards,

Phil


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

Questions about ignoring files

Author griffon26
Full name Maurice van der Pot
Date 2008-07-06 15:27:51 PDT
Message Hi,

I just started using fsvs and I have a few questions about ignoring
files.

If I'm not mistaken the ignore list is something specific to a working
copy; it is not versioned itself. I was wondering why this is, because
it seems useful to me to have the ignore list under version control
(like svn:ignore).

Furthermore I noticed that ignore patterns are always added literally,
regardless of where you add them. So if I am in a deep subdirectory
somewhere, I cannot just type "fsvs ignore ./somefile" to ignore a file
in that directory; I will have to type the entire path from the root of
my working copy. Imho it would be useful to perform ignores relative to
the current directory, would it not?

Regards,
Maurice.

P.S.: I had to make two changes before I was able to build fsvs on my
system. I attached a patch containing them.

--
Maurice van der Pot

Gentoo Linux Developer griffon26 at gentoo dot org http://www.gentoo.org
Gnome Planner Developer griffon26 at kfk4ever dot com http://live.gnome.org/Planner
Attachments
Messages per page: