You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Lieven Govaerts <sv...@mobsol.be> on 2006/09/24 11:55:52 UTC
[PATCH] Fix for issue 2533: status -u doesn't show remote propchanges
on the root folder
Hi,
please find attached patch which fixes issue 2533.
The problem was that when remote propchanges are reported back to the
client, they are stored as status changed of the parent folder (see line
1589@close_directory@libsvn_wc/status.c). In the case of the root folder
there is no parent folder, so propchanges are silently dropped.
This patch will report remote propchanges on the root folder as status
changes of that root folder.
It slightly overlaps with my patch for issue #2468 which I sent to the
dev list a few days ago:
http://svn.haxx.se/dev/archive-2006-09/0809.shtml
regards,
Lieven.
[[[
Fix for issue #2533: fix status -u so it also shows remotely changed
properties on the root of our working copy.
* subversion/libsvn_wc/status.c
(close_directory): store remote propchanges on the root of our working
copy as status changes of that root folder.
(tweak_statushash): skip the test for issue #2122 on the root folder.
Use adm_access to create statusstruct.
* subversion/tests/cmdline/stat_tests.py
(status_update_with_incoming_props): put the expected output of
status -u in the correct order.
(test_list): This test is passing now, so remove the XFail wrapper.
]]]
Re: [PATCH] Fix for issue 2533: status -u doesn't show remote propchanges on the root folder
Posted by Daniel Rall <dl...@collab.net>.
On Wed, 27 Sep 2006, Lieven Govaerts wrote:
> Daniel Rall wrote:
> >On Tue, 26 Sep 2006, Daniel Rall wrote:
> >
> >
> >>On Tue, 26 Sep 2006, Lieven Govaerts wrote:
> >>...
> >>
> >>>We need some more status regression tests, do you mind writing one
> >>>for this scenario? I'll probably add some more later.
> >>>
> >>I modified the test for issue #2533 (status test #24) to also use
> >>'-vN', which is a good regression test variation in the first place.
> >>
> >...
> >
> >I committed the test case as XFail, so it'll be there available when
> >you start testing tomorrow, Paul.
> >
> I've made a new version of the patch as committed in r21638 which
> doesn't store the root folder in the status array, but solves it locally
> in the close_directory call.
>
> It seems like this patch keeps the fix for issue 2533, without the bad
> side-effects of the previous one.
>
> Note: this patch is based on r21637, so to test it you first have to
> revert r21638 (at least the changes in status.c).
...
This fixed #2533 in a much simpler fashion, so I committed a variation
of it yesterday with some tweaks, and removed the XFail from our test
case.
Lieven indicated he'd work on a final test case variation to get us
complete regression coverage.
Re: [PATCH] Fix for issue 2533: status -u doesn't show remote propchanges
on the root folder
Posted by Lieven Govaerts <sv...@mobsol.be>.
Daniel Rall wrote:
> On Tue, 26 Sep 2006, Daniel Rall wrote:
>
>
>> On Tue, 26 Sep 2006, Lieven Govaerts wrote:
>> ...
>>
>>> We need some more status regression tests, do you mind writing one
>>> for this scenario? I'll probably add some more later.
>>>
>> I modified the test for issue #2533 (status test #24) to also use
>> '-vN', which is a good regression test variation in the first place.
>>
> ...
>
> I committed the test case as XFail, so it'll be there available when
> you start testing tomorrow, Paul.
>
I've made a new version of the patch as committed in r21638 which
doesn't store the root folder in the status array, but solves it locally
in the close_directory call.
It seems like this patch keeps the fix for issue 2533, without the bad
side-effects of the previous one.
Note: this patch is based on r21637, so to test it you first have to
revert r21638 (at least the changes in status.c).
regards,
Lieven.
Re: [PATCH] Fix for issue 2533: status -u doesn't show remote propchanges on the root folder
Posted by Daniel Rall <dl...@collab.net>.
On Tue, 26 Sep 2006, Daniel Rall wrote:
> On Tue, 26 Sep 2006, Lieven Govaerts wrote:
> ...
> > We need some more status regression tests, do you mind writing one
> > for this scenario? I'll probably add some more later.
>
> I modified the test for issue #2533 (status test #24) to also use
> '-vN', which is a good regression test variation in the first place.
...
I committed the test case as XFail, so it'll be there available when
you start testing tomorrow, Paul.
Re: [PATCH] Fix for issue 2533: status -u doesn't show remote propchanges on the root folder
Posted by Daniel Rall <dl...@collab.net>.
On Tue, 26 Sep 2006, Lieven Govaerts wrote:
...
> We need some more status regression tests, do you mind writing one
> for this scenario? I'll probably add some more later.
I modified the test for issue #2533 (status test #24) to also use
'-vN', which is a good regression test variation in the first place.
New patch attached/log message below.
Paul indicated on IRC that he's found additional problems with r21638,
but had to run before he could elaborate. He indicated that he'd pick
this up again tomorrow morning.
[[[
A follow-up to r21638 (for issue #2533), preventing double status
reporting of a changed WC root when 'svn status' is invoked with the
'-v' flag.
* subversion/libsvn_wc/status.c
(close_directory): When root WC dir is out of date, avoid reporting
it twice (once correctly, once incompletely) when
DIR_BATON->edit_baton->get_all is set (which is always the case
with '-v').
* subversion/tests/cmdline/stat_tests.py
(status_update_with_incoming_props): Add trailing comma on the last
element in a dict definition to reduce change in case additional
elements are added.
Patch by: pburba
dlr
]]]
Re: [PATCH] Fix for issue 2533: status -u doesn't show remote propchanges
on the root folder
Posted by Lieven Govaerts <sv...@mobsol.be>.
Paul Burba wrote:
> ..
> This occurs because in r21638 when close_directory() processes the root WC
> dir, it uses tweak_statushash() to add the WC root dir's status info to
> itself (i.e. db->statii) when a change occurs. Later close_directory()
> calls handle_statii() to report on all of the dir's children, but
> db->statii now contains status info on itself, so the root dir is
> reported. But here comes the problem, we then call is_sendable_status()
> to see if we want to report on the root dir, and with the --verbose option
> in use (i.e. eb->get_all == TRUE) the answer is always yes, so we report
> the root dir a second time (and incorrectly at that, as issue 2533 still
> plagues this redundant report).
>
Correct analysis.
> I believe the attached patch solves the problem, please take a look if you
> have a chance.
>
> Paul B.
> [[[
> Follow-up to r21638, prevent double status reporting of changed WC root
> with -v.
>
> * subversion/libsvn_wc/status.c
> (close_directory): When root WC dir is out of date, stop reporting it
> twice when edit_baton get_all member is set.
> ]]]
>
We need some more status regression tests, do you mind writing one for
this scenario? I'll probably add some more later.
thanks,
Lieven.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Fix for issue 2533: status -u doesn't show remote propchanges
on the root folder
Posted by Paul Burba <pa...@softlanding.com>.
Daniel Rall <dl...@collab.net> wrote on 09/25/2006 04:53:54 PM:
> On Sun, 24 Sep 2006, Lieven Govaerts wrote:
> ...
> > The problem was that when remote propchanges are reported back to the
> > client, they are stored as status changed of the parent folder (see
line
> > 1589@close_directory@libsvn_wc/status.c). In the case of the root
folder
> > there is no parent folder, so propchanges are silently dropped.
> >
> > This patch will report remote propchanges on the root folder as status
> > changes of that root folder.
>
> lgo and I discussed this one a bit on IRC. I've made some minor
> stylistic tweaks, and commited to trunk in r21638. I've also proposed
> it for backport to the 1.4.x line.
> [attachment "attoc6fw.dat" deleted by Paul Burba/SoftLanding Systems]
Lieven & Dan,
I'm working on a patch involving the same code as r21638. I merged it
with my own work and noticed a problem. Looking at Lieven's patch alone
the problem still exists: When using the --verbose option with svn st, the
root directory is listed twice, for example:
svn st -u
Release\subversion\tests\cmdline\svn-test-work\working_copies\update_tests-1.backup
Status against revision: 1
svn ps prop val
Release\subversion\tests\cmdline\svn-test-work\working_copies\update_tests-1
property 'prop' set on
'Release\subversion\tests\cmdline\svn-test-work\working_copies\update_tests-1'
svn ci -m "add a prop to root"
Release\subversion\tests\cmdline\svn-test-work\working_copies\update_tests-1
Sending
Release\subversion\tests\cmdline\svn-test-work\working_copies\update_tests-1
Committed revision 2.
svn st -u -N
Release\subversion\tests\cmdline\svn-test-work\working_copies\update_tests-1.backup
* 1
Release\subversion\tests\cmdline\svn-test-work\working_copies\update_tests-1.backup
Status against revision: 2
svn st -u -N -v
Release\subversion\tests\cmdline\svn-test-work\working_copies\update_tests-1.backup
1 1 jrandom
Release\subversion\tests\cmdline\svn-test-work\working_copies\update_tests-1.backup\iota
1 1 jrandom
Release\subversion\tests\cmdline\svn-test-work\working_copies\update_tests-1.backup\A
* 1 1 jrandom
Release\subversion\tests\cmdline\svn-test-work\working_copies\update_tests-1.backup
1 1 jrandom
Release\subversion\tests\cmdline\svn-test-work\working_copies\update_tests-1.backup
Status against revision: 2
C:\SVN\svn.trunk.takeover\src-trunk.collabnet.trunk>
This occurs because in r21638 when close_directory() processes the root WC
dir, it uses tweak_statushash() to add the WC root dir's status info to
itself (i.e. db->statii) when a change occurs. Later close_directory()
calls handle_statii() to report on all of the dir's children, but
db->statii now contains status info on itself, so the root dir is
reported. But here comes the problem, we then call is_sendable_status()
to see if we want to report on the root dir, and with the --verbose option
in use (i.e. eb->get_all == TRUE) the answer is always yes, so we report
the root dir a second time (and incorrectly at that, as issue 2533 still
plagues this redundant report).
I believe the attached patch solves the problem, please take a look if you
have a chance.
Paul B.
[[[
Follow-up to r21638, prevent double status reporting of changed WC root
with -v.
* subversion/libsvn_wc/status.c
(close_directory): When root WC dir is out of date, stop reporting it
twice when edit_baton get_all member is set.
]]]
Re: [PATCH] Fix for issue 2533: status -u doesn't show remote propchanges on the root folder
Posted by Daniel Rall <dl...@collab.net>.
On Sun, 24 Sep 2006, Lieven Govaerts wrote:
...
> The problem was that when remote propchanges are reported back to the
> client, they are stored as status changed of the parent folder (see line
> 1589@close_directory@libsvn_wc/status.c). In the case of the root folder
> there is no parent folder, so propchanges are silently dropped.
>
> This patch will report remote propchanges on the root folder as status
> changes of that root folder.
lgo and I discussed this one a bit on IRC. I've made some minor
stylistic tweaks, and commited to trunk in r21638. I've also proposed
it for backport to the 1.4.x line.