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

tree conflict info

From: Neels Janosch Hofmeyr <neels_at_elego.de>
Date: Thu, 13 Aug 2009 04:30:09 +0200

Hi again Tree-conflicts folks,

how about shortening the URLs in the "Tree-conflict" section of `svn info';
patch attached. This is what it does:

`svn info' on a tree-conflicted node with this patch looks like this, less
the comments:
[[[
[...]
URL: http://full.url/to/trunk/alpha [ <-- as usual... ]
[...]
Tree conflict: local edit, incoming delete upon update
  Source left: (file) ^/trunk/alpha_at_1 [ <-- these URLs ]
  Source right: (file) ^/trunk/alpha_at_2 [ <-- were shortened ]
]]]

Currently, this section often looks overcrowded like this:
[[[
[...]
URL: file:///home/neels/svn/tests/tc_replace_update/m201b7297/repos/trunk/alpha
[...]
Tree conflict: local delete, incoming delete upon update
  Source left: (file)
file:///home/neels/svn/tests/tc_replace_update/m201b7297/repos/trunk/alpha_at_1
  Source right: (none)
file:///home/neels/svn/tests/tc_replace_update/m201b7297/repos/trunk/alpha_at_2
]]]

In many cases, the repos URL is printed in full further above, and repeating
the full URLs is redundant. However, when the current node kind is absent,
`svn info' is pretty quiet; this would be a whole info:

[[[
$ svn info m201b7297/trunk2/alpha
Path: m201b7297/trunk2/alpha
Name: alpha
Node Kind: none
Tree conflict: local delete, incoming delete upon update
  Source left: (file) ^/trunk/alpha_at_1
  Source right: (none) ^/trunk/alpha_at_2
]]]

I'd say it is still okay to use the caret notation. The parent dir's URL is
available from the working copy. The benefit of readability outweighs the
lack of full info.

There won't ever be a different repository's URL in there, will there.

Agreed?

~Neels

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2383099

In `svn info', tree-conflict section, show ^/ style URLs.

* subversion/svn/util.c
  (svn_cl__node_description): Use "^/" instead of root URL. Simplify.

--This line, and those below, will be ignored--
Index: subversion/svn/util.c
===================================================================
--- subversion/svn/util.c (revision 38703)
+++ subversion/svn/util.c (working copy)
@@ -1260,14 +1260,9 @@ svn_cl__node_description(const svn_wc_co
 {
   const char *url_str;
 
- /* Construct the whole URL if we can, else use whatever we have. */
- if (node->repos_url && node->path_in_repos)
- url_str = svn_path_url_add_component2(node->repos_url,
- node->path_in_repos, pool);
- else if (node->repos_url)
- url_str = svn_path_url_add_component2(node->repos_url, "...", pool);
- else if (node->path_in_repos)
- url_str = node->path_in_repos;
+ /* Construct a "caret notation" ^/URL if we can, else show dots. */
+ if (node->path_in_repos)
+ url_str = svn_path_url_add_component2("^", node->path_in_repos, pool);
   else
     url_str = "...";
 

Received on 2009-08-13 04:32:38 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.