subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1677030 - /subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c
Date Thu, 30 Apr 2015 17:13:16 GMT
Author: julianfoad
Date: Thu Apr 30 17:13:16 2015
New Revision: 1677030

URL: http://svn.apache.org/r1677030
Log:
On the 'move-tracking-2' branch: Factor out a tiny bit of code that prints a
branch id and path. Some output changes slightly, from '<branch-id> /<path>'
to '<branch-id> at /<path>'.

* subversion/svnmover/svnmover.c
  (branch_id_and_path): Move further up the source file.
  (branch_info): Use it.

Modified:
    subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c

Modified: subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c?rev=1677030&r1=1677029&r2=1677030&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c (original)
+++ subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c Thu Apr 30 17:13:16
2015
@@ -432,6 +432,16 @@ list_branch_elements_by_eid(svn_branch_s
   return SVN_NO_ERROR;
 }
 
+/*  */
+static char *
+branch_id_and_path(svn_branch_state_t *branch,
+                   apr_pool_t *result_pool)
+{
+  return apr_psprintf(result_pool, "%s at /%s",
+                      svn_branch_get_id(branch, result_pool),
+                      svn_branch_get_root_rrpath(branch, result_pool));
+}
+
 /* Show the id and path of BRANCH. If VERBOSE is true, alse list its elements.
  */
 static svn_error_t *
@@ -441,17 +451,15 @@ branch_info(svn_branch_state_t *branch,
 {
   if (the_ui_mode == UI_MODE_PATHS)
     {
-      printf("  %s /%s\n",
-             svn_branch_get_id(branch, scratch_pool),
-             svn_branch_get_root_rrpath(branch, scratch_pool));
+      printf("  %s\n",
+             branch_id_and_path(branch, scratch_pool));
       if (verbose)
         SVN_ERR(list_branch_elements(branch, scratch_pool));
     }
   else
     {
-      printf("  %s /%s root=e%d\n",
-             svn_branch_get_id(branch, scratch_pool),
-             svn_branch_get_root_rrpath(branch, scratch_pool),
+      printf("  %s root=e%d\n",
+             branch_id_and_path(branch, scratch_pool),
              branch->root_eid);
       if (verbose)
         SVN_ERR(list_branch_elements_by_eid(branch, scratch_pool));
@@ -1204,16 +1212,6 @@ svn_branch_diff_func_t(svn_editor3_t *ed
                        const char *header,
                        apr_pool_t *scratch_pool);
 
-/*  */
-static char *
-branch_id_and_path(svn_branch_state_t *branch,
-                   apr_pool_t *result_pool)
-{
-  return apr_psprintf(result_pool, "%s at /%s",
-                      svn_branch_get_id(branch, result_pool),
-                      svn_branch_get_root_rrpath(branch, result_pool));
-}
-
 /* Display differences between branch subtrees LEFT and RIGHT.
  *
  * Recurse into sub-branches.



Mime
View raw message