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

Re: [PATCH] Tree conflicts - svn info reporting per victim

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Tue, 14 Oct 2008 00:01:55 +0200

On Mon, 2008-10-13 at 12:41 +0100, Julian Foad wrote:
> On Mon, 2008-10-13 at 10:40 +0200, Stephen Butler wrote:
> > Quoting Stephen Butler <sbutler_at_elego.de>:
> >
> > > Quoting Stephen Butler <sbutler_at_elego.de>:
> > >
> > >> Quoting Julian Foad <julianfoad_at_btopenworld.com>:
> > >>> The attached patch modifies the reporting of tree conflicts by "svn
> > >>> info" so that "svn info path/to/victim" reports any tree conflict info
> > >>> about the victim:
> > >
> > >> I took the liberty of extending your diff (version 3, attached). It now
> > >> prints minimal info (just the path and a tree conflict explanation) for
> > >> nonexistent tree conflict victims.
>
> Excellent. Thanks, Stephen.
>
> I like what you've made it do, and think it's the right way.

Committed revision 33620.

> There's one bit of the implementation I don't like:
> (svn_wc_get_tree_conflict): Add a boolean arg for new
> parent-dir option.
> Passing a flag feels yucky. The adm_access baton already says what
> directory it's for. I'll see if I can change the function to avoid the
> need for the flag.
>
> If I can't do that easily I'll commit this anyway.

I haven't changed that.

> - Julian
>
>
> > [[[
> > Make "svn info" report a tree conflict on the victim, rather than on the
> > parent directory.
> >
> > ### "svn info" won't work on an unversioned item. A tree conflict can
> > ### presently exist on an unversioned item. For "update", this should not
> > ### happen: a WC item must be schedule-del/mod/add for a tree conflict to
> > ### be raised, and the update should not proceed and make the item
> > ### unversioned. For "merge", it is legitimate to have a conflict on an
> > ### item that is not in the WC. For that, we need either to allow "svn info"
> > ### on an unversioned item, or ensure "merge" always makes a tree conflict
> > ### victim into some kind of versioned item (with schedule=missing or
> > ### something like that) if that's feasible.
> >
> > ### Steve Butler: I extended the diff so that "svn info" now works on
> > ### unversioned items. There's a new error-callback for gathering info in
> > ### the working copy. If the info-target does not exist, and is a tree
> > ### conflict victim, a minimal set of info is printed. I finished
> > ### adjusting the tests to act on victims directly.
> >
> > * subversion/libsvn_wc/tree_conflicts.c
> > (svn_wc_get_tree_conflict): Support getting the conflict info from the
> > parent dir of the victim.
> >
> > * subversion/include/svn_wc.h
> > (svn_wc_get_tree_conflict): Add a boolean arg for new parent-dir option.
> >
> > * subversion/libsvn_wc/status.c
> > (assemble_status): track changed svn_wc_get_tree_conflict declaration.
> >
> > * subversion/include/svn_client.h
> > (svn_info_t): Replace the 'tree_conflicts' array with a single
> > 'tree_conflict' pointer.
> >
> > * subversion/libsvn_client/info.c
> > (build_info_from_dirent): Initialize 'tree_conflict' instead of
> > 'tree_conflicts'.
> > (found_entry_baton): Add an 'adm_access' field.
> > (build_info_from_entry): Don't fill in the tree conflict info here, because
> > we don't have the required adm_access baton...
> > (info_found_entry_callback): ... but fill it in here instead,
> > (crawl_entries): Store the adm_access of the root directory of the crawl.
> > (info_error_handler): New function.
> > (entry_walk_callbacks): Use the new handler function.
> > (build_info_for_unversioned): New helper function.
> >
> > * subversion/svn/info-cmd.c
> > (print_info_xml, print_info): Print just the one tree conflict that is now
> > in the info structure, rather than an array of conflicts. In
> > print_info_xml, remove restriction that revnum must be valid.
> >
> > * subversion/svn/schema/info.rnc
> > Remove the 'tree-conflicts' wrapper element, as there can now be only one
> > tree conflict reported per node.
> >
> > * subversion/tests/cmdline/info_tests.py
> > (info_with_tree_conflicts): Adjust accordingly.
> >
> > * subversion/tests/cmdline/merge_tests.py
> > (tree_conflicts_and_obstructions): Adjust accordingly.
> > ]]]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: dev-help_at_subversion.tigris.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-10-14 00:02:16 CEST

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.