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

svn commit in mixed checkout doesn't create locks recursively, and fails

From: David Faure <faure_at_kde.org>
Date: 2005-06-29 15:27:28 CEST

Hello there,

Here's a bug report which includes some source-code investigation.

I have a mixed checkout, i.e. a base directory called "kdepim" is from a given branch,
but a subdirectory of it was switched to another branch.

proko2/kdepim>svn info
URL: svn+ssh://dfaure@svn.kde.org/home/kde/branches/KDE/3.3/kdepim
proko2/kdepim>cd korganizer
kdepim/korganizer>svn info
URL: svn+ssh://dfaure@svn.kde.org/home/kde/branches/kdepim/proko2/kdepim/korganizer

Now if I commit things from both branches at the same time, a bug happens:

proko2/kdepim>svn ci korganizer kontact/src/main.cpp
svn: Commit failed (details follow):
svn: Working copy '/mnt/devel/kde/src/proko2/kdepim/korganizer/pics' is missing or not locked

kdepim/korganizer/pics/ is a subdirectory of korganizer, same branch. The bug is
that svn commit doesn't create locks recursively inside korganizer/.
Same thing if swapping the two arguments, order doesn't matter.

I used gdb to debug this a little (for once ;) ), and found out that the problem was
that is_wc_root is true for the first path (korganizer), so svn_wc_get_actual_target
returns an empty name, so the addition to dirs_to_lock_recursive inside the if(*name)
at subversion/libsvn_client/commit.c:1248 doesn't happen.
proko2/kdepim/korganizer is then added to "dirs_to_lock", like 1275,
but not to dirs_to_lock_recursive...

Either it should be recursively locked, or the code shouldn't later on try to
find locks recursively in the korganizer directory.

A comment in commit.c says:
  /* One day we might support committing from multiple working copies, but
     we don't yet.    ...
Is this the reason?

This is with subversion-1.2.0 on Linux.

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jun 29 15:30:58 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.