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

Re: Adding file/directory to a directory with identical name but not same node.

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2006-03-31 23:27:56 CEST

On 3/31/06, Kamesh Jayachandran <kamesh@collab.net> wrote:
> Hi Garrett,
>
> Below are my investigation on this issue.
> In subversion/libsvn_repos/commit.c:add_directory(),
> I could see the following comment before creating the svn_fs_make_dir which
> should be corrected once we fix the issue,
> "/* No ancestry given, just make a new directory. We don't
> bother with an out-of-dateness check here because
> svn_fs_make_dir will error out if PATH already exists.
> Verify write access to the full path and the parent
> directory. */".
>
> To throw 'Out of date error' we need base_revision of the parent
> directory of
> the node getting added inside add_directory and add_file.
> Currently both add_directory, add_file in subversion/libsvn_repos/commit.c
> recieve parent_baton, unfortunately parent_baton->base_rev happens to be
> '-1'.
> The subversion/libsvn_client/commit_util.c:svn_client__do_commit() has the
> following line because of that parent_baton->base_rev is '-1' when seen from
> add_directory/add_file.
> SVN_ERR(svn_delta_path_driver(editor, edit_baton, SVN_INVALID_REVNUM,
> paths, do_item_commit, &cb_baton, pool));
> Changing the SVN_INVALID_REVNUM with base_revision of the concerned parent
> directory should help us in throwing 'Out of date parent'.
>
> Not sure of the consequences though.

Well, only one way to find out. I'd suggest making that change to the
call to svn_delta_path_driver and inserting the out of dateness check,
and then seeing how the test suite deals with it. Maybe there's a
reason it's done this way, maybe not, but either way the test suite
should be able to tell us more.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Mar 31 23:28:33 2006

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