[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] fix issue #2353 (commit switched error "missing or not locked")

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2005-10-20 20:33:41 CEST

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.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Thu Oct 20 20:36:44 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.