You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Garrett Rooney <ro...@electricjellyfish.net> on 2005/10/20 18:33:41 UTC
[PATCH] fix issue #2353 (commit switched error "missing or not locked")
So I looked into issue 2353, which is a problem committing files under
switched directories, and came up with a patch that fixes the problem,
but I'm not sure it's correct. According to cmpilato's comments in
the issue, the problem is that svn_wc_get_actual_target isn't doing
the right thing for commits, and fixing the underlying code isn't
trivial. I took a different approach, and just removed the call to
svn_wc_get_actual_target entirely.
My new version of svn_client_commit3 simply checks if the target path
is a directory, does the locking we would have done with the return
value from svn_wc_get_actual_target, and then splits off the dirname
so we can use it later. This seems to work (all tests pass, the XFail
test for this issue passes, etc), but I get the feeling that it's too
easy, I must be missing something fundamental about why we were using
svn_wc_get_actual_target in the first place.
Comments?
-garrett
Fix issue #2353, commit switched error "missing or not locked".
* subversion/libsvn_client/commit.c
(svn_client_commit3): since svn_wc_get_actual_target doesn't do the
right thing in all cases, lets stop using it. instead, just check
to see if the target path is a directory, and if it is, add it to
the correct array of dirs to lock. then, split off the parent dir
so we can chop it up and lock its components.
* subversion/tests/clients/cmdline/switch_tests.py
(test_list): remove XFail from commit_mods_below_switch.
Re: [PATCH] fix issue #2353 (commit switched error "missing or not locked")
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 10/28/05, Philip Martin <ph...@codematters.co.uk> wrote:
> Garrett Rooney <ro...@electricjellyfish.net> writes:
>
> > Ping? Anyone feel like taking a look at this patch? As far as I can
> > tell it fixes the problem and it doesn't cause any test breakage, so
> > unless someone points out some glaring issue with it I'm leaning
> > towards checking it in...
>
> It doesn't look unreasonable. You've written a more verbose log
> message than I would have done, perhaps some of it belongs in the
> code?
Thanks for the review. I've moved some of the content of the log
message into a comment and once the tests finish running I'll commit
the change.
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] fix issue #2353 (commit switched error "missing or not
locked")
Posted by Philip Martin <ph...@codematters.co.uk>.
Garrett Rooney <ro...@electricjellyfish.net> writes:
> Ping? Anyone feel like taking a look at this patch? As far as I can
> tell it fixes the problem and it doesn't cause any test breakage, so
> unless someone points out some glaring issue with it I'm leaning
> towards checking it in...
It doesn't look unreasonable. You've written a more verbose log
message than I would have done, perhaps some of it belongs in the
code?
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] fix issue #2353 (commit switched error "missing or not locked")
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 10/20/05, Garrett Rooney <ro...@electricjellyfish.net> wrote:
> So I looked into issue 2353, which is a problem committing files under
> switched directories, and came up with a patch that fixes the problem,
> but I'm not sure it's correct. According to cmpilato's comments in
> the issue, the problem is that svn_wc_get_actual_target isn't doing
> the right thing for commits, and fixing the underlying code isn't
> trivial. I took a different approach, and just removed the call to
> svn_wc_get_actual_target entirely.
>
> My new version of svn_client_commit3 simply checks if the target path
> is a directory, does the locking we would have done with the return
> value from svn_wc_get_actual_target, and then splits off the dirname
> so we can use it later. This seems to work (all tests pass, the XFail
> test for this issue passes, etc), but I get the feeling that it's too
> easy, I must be missing something fundamental about why we were using
> svn_wc_get_actual_target in the first place.
>
> Comments?
Ping? Anyone feel like taking a look at this patch? As far as I can
tell it fixes the problem and it doesn't cause any test breakage, so
unless someone points out some glaring issue with it I'm leaning
towards checking it in...
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org