[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-16 23:31:53 CEST

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/attic' is missing or not locked

kdepim/korganizer/attic/ is a subdirectory of korganizer, same branch. The bug is
that svn commit doesn't create locks recursively inside korganizer/.

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: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jun 16 23:33:55 2005

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