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

Re: svn commit: r33620 - in trunk/subversion: include libsvn_client libsvn_wc svn svn/schema tests/cmdline

From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta_at_gmail.com>
Date: Tue, 14 Oct 2008 12:19:56 +0200

2008-10-13 23:56 <julianfoad_at_tigris.org> napisaƂ(a):
> Author: julianfoad
> Date: Mon Oct 13 14:56:30 2008
> New Revision: 33620
>
> Log:
> Make "svn info" report a tree conflict on the victim, rather than on the
> parent directory. Enable "svn info" to report on an unversioned item that
> is the victim of a tree conflict, to support the cases where "merge" tries
> to modify an item that is not present in the target.
>
> Patch by: me
> Steve Butler
>
> * 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.
>
> Modified:
> trunk/subversion/include/svn_client.h
> trunk/subversion/include/svn_wc.h
> trunk/subversion/libsvn_client/info.c
> trunk/subversion/libsvn_wc/status.c
> trunk/subversion/libsvn_wc/tree_conflicts.c
> trunk/subversion/svn/info-cmd.c
> trunk/subversion/svn/schema/info.rnc
> trunk/subversion/tests/cmdline/info_tests.py
> trunk/subversion/tests/cmdline/merge_tests.py
>
> ...
>
> Modified: trunk/subversion/svn/info-cmd.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/svn/info-cmd.c?pathrev=33620&r1=33619&r2=33620
> ==============================================================================
> --- trunk/subversion/svn/info-cmd.c Mon Oct 13 12:32:20 2008 (r33619)
> +++ trunk/subversion/svn/info-cmd.c Mon Oct 13 14:56:30 2008 (r33620)
> @@ -85,10 +85,8 @@ print_info_xml(void *baton,
> /* If revision is invalid, assume WC is corrupt. */

This comment should be updated.

> if (SVN_IS_VALID_REVNUM(info->rev))
> rev_str = apr_psprintf(pool, "%ld", info->rev);
> else
> - return svn_error_createf(SVN_ERR_WC_CORRUPT, NULL,
> - _("'%s' has invalid revision"),
> - svn_path_local_style(target, pool));
> + rev_str = apr_pstrdup(pool, "Resource is not under version control.");

This string probably should be marked for translation:
_("Resource is not under version control.")

>
> /* "<entry ...>" */
> svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "entry",
> @@ -222,24 +220,9 @@ print_info_xml(void *baton,
> svn_xml_make_close_tag(&sb, pool, "lock");
> }
>
> - if (info->tree_conflicts)
> - {
> - svn_wc_conflict_description_t *conflict;
> - int i;
> -
> - /* "<tree-conflicts>" */
> - svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "tree-conflicts", NULL);
> -
> - for (i = 0; i < info->tree_conflicts->nelts; i++)
> - {
> - conflict = APR_ARRAY_IDX(info->tree_conflicts, i,
> - svn_wc_conflict_description_t *);
> - SVN_ERR(svn_cl__append_tree_conflict_info_xml(sb, conflict, pool));
> - }
> -
> - /* "</tree-conflicts>" */
> - svn_xml_make_close_tag(&sb, pool, "tree-conflicts");
> - }
> + if (info->tree_conflict)
> + SVN_ERR(svn_cl__append_tree_conflict_info_xml(sb, info->tree_conflict,
> + pool));
>
> /* "</entry>" */
> svn_xml_make_close_tag(&sb, pool, "entry");
> @@ -447,28 +430,14 @@ print_info(void *baton,
> SVN_ERR(svn_cmdline_printf(pool, _("Changelist: %s\n"),
> info->changelist));
>
> - if (info->tree_conflicts)
> + if (info->tree_conflict)
> {
> - svn_wc_conflict_description_t *tree_conflict;
> - svn_stringbuf_t *tree_conflict_descs = svn_stringbuf_create("", pool);
> - int i;
> + svn_stringbuf_t *desc = svn_stringbuf_create("", pool);
>
> - for (i = 0; i < info->tree_conflicts->nelts; i++)
> - {
> - svn_stringbuf_appendcstr(tree_conflict_descs, "\n");
> - tree_conflict = APR_ARRAY_IDX(info->tree_conflicts, i,
> - svn_wc_conflict_description_t *);
> - SVN_ERR(svn_cl__append_human_readable_tree_conflict_description(
> - tree_conflict_descs,
> - tree_conflict,
> - pool));
> - }
> + SVN_ERR(svn_cl__append_human_readable_tree_conflict_description(
> + desc, info->tree_conflict, pool));
>
> - if (tree_conflict_descs->len > 0)
> - {
> - svn_cmdline_printf(pool, "Tree conflicts:%s",
> - tree_conflict_descs->data);
> - }
> + svn_cmdline_printf(pool, "Tree conflicts:\n%s", desc->data);

"Tree conflicts:\n%s" should be marked for translation.

> }
>
> /* Print extra newline separator. */
>
Received on 2008-10-14 12:20:14 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.