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

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

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-06-29 18:21:03 CEST

David Faure <faure@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
Received on Wed Jun 29 18:22:02 2005

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