Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: svn commit: r2431 - branches/fsvs-1.2.x/fsvs/src/status.c

fsvs
Discussion topic

2020-03-13: This site is going to be decommissioned and shut down very soon. Please copy and archive any data you wish to keep ASAP

Hide all messages in topic

All messages in topic

svn commit: r2432

Author tekknokra
Full name Gunnar Thielebein
Date 2010-02-16 02:25:57 PST
Message Hi Phil,

i put in a further condition for child objects in the helper function of
dir_exclude_mtime. With this I get always sure that the mtime of folders with
changed children will still be recognised (and committed) . This looks more
consistent regarding the behaviour without this option.

Cheers,
Gunnar

Re: svn commit: r2431 - branches/fsvs-1.2.x/fsvs/src/status.c

Author pmarek
Full name P.Marek
Date 2010-02-15 09:32:37 PST
Message On Monday 15 February 2010 Gunnar Thielebein wrote:
> Would you point me how to use tests in fsvs?
> I can't get them running.

  make run-tests

for the quick test, and the extensive version is

  make ext-tests PARALLEL=5

(but that needs "sudo" without password and "ssh localhost" for both user and
root, as it tests a lot of combinations of user/root,file://,svn+ssh://, and
some more variations.

> When I ./run-tests <test> this does not return anything.
> For writing a test for the dir_exclude_mtime option. Should I use the
> 034_status 036_status_non-recursive (?). What should the test include?
Just copy a file and use it as a template.
The test should verify that the option works when off and when on; so you'll
need a few subdirectory levels (because of the CHILD_CHANGED flag).

I'd recommend to use the normal
    $PREPARE_DEFAULT > /dev/null
line, then you'll get everything set up automatically, and a bit of directory
structure as well - then you can just use one of the files and on of the
directories below tree/ for the verification.

  touch tree/a/1
(if I'm correct here and verify that
  fsvs st -o no-dir-mtime=XXX
(or whatever the name now is) gives/doesn't give the directory (depending on
child changes, too).


Regards,

Phil

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

Re: svn commit: r2431 - branches/fsvs-1.2.x/fsvs/src/status.c

Author tekknokra
Full name Gunnar Thielebein
Date 2010-02-15 07:38:53 PST
Message Hi Phil,

Would you point me how to use tests in fsvs?
I can't get them running.
When I ./run-tests <test> this does not return anything.
For writing a test for the dir_exclude_mtime option. Should I use the 034_status
   036_status_non-recursive (?). What should the test include?

Best,
Gunnar

Ph. Marek wrote:
> On Saturday 13 February 2010 Gunnar Thielebein wrote:
>> Author: tekknokrat
>> Date: 2010-02-13 09:56:59-0800
>> New Revision: 2431
>>
>> Modified:
>> branches/fsvs-1.2.x/​fsvs/src/status.c
>>
>> Log:
>> - change behavior in stop_change, don't stop on parent nodes containing
>> changed entries
>>
>> Modified: branches/fsvs-1.2.x/​fsvs/src/status.c
>> Url:
>> http://fsvs.tigris.o​rg/source/browse/fsv​s/branches/fsvs-1.2.​x/fsvs/src/sta
>> tus.c?view=diff&​pathrev=2431&r1=​2430&r2=2431
>> ====================​====================​====================​==============
>> ==== --- branches/fsvs-1.2.x/​fsvs/src/status.c (original)
>> +++ branches/fsvs-1.2.x/​fsvs/src/status.c 2010-02-13 09:56:59-0800
>> @@ -351,11 +351,8 @@
>> if (hlp__only_dir_mtime​_changed(sts))
>> return status;
>>
>> - /*
>> - * @todo: this still exit(1) for excluded dir, why?
>> - */
>> - if (opt__get_int(OPT__S​TOP_ON_CHANGE) &&
>> - sts->entry_status)
>> + if (opt__get_int(OPT__S​TOP_ON_CHANGE) &&
>> + sts->entry_status && (!(sts->entry_status & FS_CHILD_CHANGED)))
>> /* Status is a read-only operation, so that works. */
>> exit(1);
>>
> I'm not fully sure that this is correct.
>
> What about directories with new/deleted entries in them, when the filter
> doesn't include "new,deleted"?
>
> Hmmm ... if the filter says "new not wanted", should we stop if there's a
> changed directory? Perhaps no, because that would defeat the filter
> definition.
> So your change might be correct.
>
> Did you verify the test status?
>
>
> Regards,
>
> Phil
>
>

Re: svn commit: r2431 - branches/fsvs-1.2.x/fsvs/src/status.c

Author tekknokra
Full name Gunnar Thielebein
Date 2010-02-13 11:49:59 PST
Message P.Marek wrote:
> On Saturday 13 February 2010 Gunnar Thielebein wrote:
>> Author: tekknokrat
>> Date: 2010-02-13 09:56:59-0800
>> New Revision: 2431
>>
>> Modified:
>> branches/fsvs-1.2.x/​fsvs/src/status.c
>>
>> Log:
>> - change behavior in stop_change, don't stop on parent nodes containing
>> changed entries
>>
>> Modified: branches/fsvs-1.2.x/​fsvs/src/status.c
>> Url:
>> http://fsvs.tigris.o​rg/source/browse/fsv​s/branches/fsvs-1.2.​x/fsvs/src/sta
>> tus.c?view=diff&​pathrev=2431&r1=​2430&r2=2431
>> ====================​====================​====================​==============
>> ==== --- branches/fsvs-1.2.x/​fsvs/src/status.c (original)
>> +++ branches/fsvs-1.2.x/​fsvs/src/status.c 2010-02-13 09:56:59-0800
>> @@ -351,11 +351,8 @@
>> if (hlp__only_dir_mtime​_changed(sts))
>> return status;
>>
>> - /*
>> - * @todo: this still exit(1) for excluded dir, why?
>> - */
>> - if (opt__get_int(OPT__S​TOP_ON_CHANGE) &&
>> - sts->entry_status)
>> + if (opt__get_int(OPT__S​TOP_ON_CHANGE) &&
>> + sts->entry_status && (!(sts->entry_status & FS_CHILD_CHANGED)))
>> /* Status is a read-only operation, so that works. */
>> exit(1);
>>
> I'm not fully sure that this is correct.
>
> What about directories with new/deleted entries in them, when the filter
> doesn't include "new,deleted"?
>
> Hmmm ... if the filter says "new not wanted", should we stop if there's a
> changed directory? Perhaps no, because that would defeat the filter
> definition.
> So your change might be correct.
>
> Did you verify the test status?

Hi Phil,

The additional condition only applies to objects that contains changed files or
further nodes not the changed files itself.
I did some tests, also where parents *and* childs are changed and with the stop
action no further unwanted output appeared. Also, I get the correct behaviour
because the parent objects caused unwanted stop_change behaviour.

What I see from the st -vv command is that fsvs iterates from the child objects
to the parent. So if there are changes in child they will always cause a
stop_change first.

Best,
Gunnar

>
>
> Regards,
>
> Phil
>
>

Re: svn commit: r2431 - branches/fsvs-1.2.x/fsvs/src/status.c

Author pmarek
Full name P.Marek
Date 2010-02-13 10:24:14 PST
Message On Saturday 13 February 2010 Gunnar Thielebein wrote:
> Author: tekknokrat
> Date: 2010-02-13 09:56:59-0800
> New Revision: 2431
>
> Modified:
> branches/fsvs-1.2.x/​fsvs/src/status.c
>
> Log:
> - change behavior in stop_change, don't stop on parent nodes containing
> changed entries
>
> Modified: branches/fsvs-1.2.x/​fsvs/src/status.c
> Url:
> http://fsvs.tigris.o​rg/source/browse/fsv​s/branches/fsvs-1.2.​x/fsvs/src/sta
> tus.c?view=diff&​pathrev=2431&r1=​2430&r2=2431
> ====================​====================​====================​==============
> ==== --- branches/fsvs-1.2.x/​fsvs/src/status.c (original)
> +++ branches/fsvs-1.2.x/​fsvs/src/status.c 2010-02-13 09:56:59-0800
> @@ -351,11 +351,8 @@
> if (hlp__only_dir_mtime​_changed(sts))
> return status;
>
> - /*
> - * @todo: this still exit(1) for excluded dir, why?
> - */
> - if (opt__get_int(OPT__S​TOP_ON_CHANGE) &&
> - sts->entry_status)
> + if (opt__get_int(OPT__S​TOP_ON_CHANGE) &&
> + sts->entry_status && (!(sts->entry_status & FS_CHILD_CHANGED)))
> /* Status is a read-only operation, so that works. */
> exit(1);
>
I'm not fully sure that this is correct.

What about directories with new/deleted entries in them, when the filter
doesn't include "new,deleted"?

Hmmm ... if the filter says "new not wanted", should we stop if there's a
changed directory? Perhaps no, because that would defeat the filter
definition.
So your change might be correct.

Did you verify the test status?


Regards,

Phil


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