You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by David Faure <fa...@kde.org> on 2005/06/29 13:27:28 UTC
svn commit in mixed checkout doesn't create locks recursively, and fails
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
Re: svn commit in mixed checkout doesn't create locks recursively,
and fails
Posted by Philip Martin <ph...@codematters.co.uk>.
David Faure <fa...@kde.org> writes:
> Or should I report a bug so that it doesn't get forgotten?
It's issue 2353.
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit in mixed checkout doesn't create locks recursively, and fails
Posted by David Faure <fa...@kde.org>.
On Wednesday 29 June 2005 18:21, Philip Martin wrote:
> David Faure <fa...@kde.org> writes:
>
> > proko2/kdepim>svn ci korganizer kontact/src/main.cpp
> > svn: Commit failed (details follow): svn: Working copy'/kdepim/korganizer/pics' is missing or not locked
>
> I can reproduce it:
>
> $SVN mkdir $REPO/foo $REPO/foo/bar $REPO/foo/baz $REPO/zig $REPO/zig/zag
> $SVN co $REPO/foo wc
> $SVN sw $REPO/zig wc/bar
> $SVN ps x x wc/baz
> $SVN ps x x wc/bar
> $SVN ci wc/baz wc/bar
>
> > 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
>
> check_wc_root() does this
>
> /* If PATH's parent in the WC is not its parent in the repository,
> PATH is a WC root. */
> if (entry && entry->url
> && (strcmp (svn_path_url_add_component (p_entry->url, base_name, pool),
> entry->url) != 0))
> return SVN_NO_ERROR;
>
> which means that a switched directory look like a wc root, I think
> that's a bug. Hmmm, if PATH was a switched file it looks like the
> above code would classify the file as a wc root, that's doesn't look
> right either. The check_wc_root function has been around for a long
> time, I'd guess it pre-dates switch altogether.
Hello Philip,
thanks for your followup. Did someone look into fixing this?
Or should I report a bug so that it doesn't get forgotten?
--
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
Re: svn commit in mixed checkout doesn't create locks recursively,
and fails
Posted by Philip Martin <ph...@codematters.co.uk>.
David Faure <fa...@kde.org> writes:
> 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
I can reproduce it:
$SVN mkdir $REPO/foo $REPO/foo/bar $REPO/foo/baz $REPO/zig $REPO/zig/zag
$SVN co $REPO/foo wc
$SVN sw $REPO/zig wc/bar
$SVN ps x x wc/baz
$SVN ps x x wc/bar
$SVN ci wc/baz wc/bar
> 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
check_wc_root() does this
/* If PATH's parent in the WC is not its parent in the repository,
PATH is a WC root. */
if (entry && entry->url
&& (strcmp (svn_path_url_add_component (p_entry->url, base_name, pool),
entry->url) != 0))
return SVN_NO_ERROR;
which means that a switched directory look like a wc root, I think
that's a bug. Hmmm, if PATH was a switched file it looks like the
above code would classify the file as a wc root, that's doesn't look
right either. The check_wc_root function has been around for a long
time, I'd guess it pre-dates switch altogether.
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org