[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: Stephen Butler <sbutler_at_elego.de>
Date: Mon, 13 Oct 2008 10:40:38 +0200

Quoting Stephen Butler <sbutler_at_elego.de>:

> Quoting Stephen Butler <sbutler_at_elego.de>:
>> Quoting Julian Foad <julianfoad_at_btopenworld.com>:
>>> Patch in progress, for any comments.
>>> (Stefan, you were working on this some time ago, weren't you?)
>>> 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:
>> Hi Julian,
>> 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.
> Whoops, by the clear light of day, I see the segfault when I run the tests.
> New patch removes an unnecessary check for a valid revnum in print_info_xml
> (only), and allows the new info_error_handler to ignore SVN_NO_ERROR. Also
> a fix to expected_str1 in the test (it expected too much).
Now with attachment. Doh!

And here's the commit message.

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
   (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.


Stephen Butler | Software Developer
elego Software Solutions GmbH
Gustav-Meyer-Allee 25 | 13355 Berlin | Germany
fon: +49 30 2345 8696 | mobile: +49 163 25 45 015
fax: +49 30 2345 8695 | http://www.elegosoft.com
Geschäftsführer: Olaf Wagner | Sitz der Gesellschaft: Berlin
Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194

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-13 10:40:57 CEST

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