subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1369577 - in /subversion/trunk/subversion/svn: cl.h conflict-callbacks.c file-merge.c
Date Sun, 05 Aug 2012 13:21:31 GMT
Author: stsp
Date: Sun Aug  5 13:21:31 2012
New Revision: 1369577

URL: http://svn.apache.org/viewvc?rev=1369577&view=rev
Log:
Provide additional notifications at the beginning and end of a file merge.

* subversion/svn/cl.h
  (svn_cl__merge_file): Declare path_prefix parameter.

* subversion/svn/conflict-callbacks.c
  (svn_cl__conflict_handler): Pass path_prefix to the file merge tool.

* subversion/svn/file-merge.c
  (svn_cl__merge_file): New path_prefix parameter. Display the file's name
   at the start of the merge, and add a nofication at the end of the merge
   indicating whether the file remains in conflict.

Modified:
    subversion/trunk/subversion/svn/cl.h
    subversion/trunk/subversion/svn/conflict-callbacks.c
    subversion/trunk/subversion/svn/file-merge.c

Modified: subversion/trunk/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/cl.h?rev=1369577&r1=1369576&r2=1369577&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/cl.h (original)
+++ subversion/trunk/subversion/svn/cl.h Sun Aug  5 13:21:31 2012
@@ -584,6 +584,7 @@ svn_cl__merge_file(const char *base_path
                    const char *my_path,
                    const char *merged_path,
                    const char *wc_path,
+                   const char *path_prefix,
                    const char *editor_cmd,
                    apr_hash_t *config,
                    svn_boolean_t *remains_in_conflict,

Modified: subversion/trunk/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/conflict-callbacks.c?rev=1369577&r1=1369576&r2=1369577&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/conflict-callbacks.c (original)
+++ subversion/trunk/subversion/svn/conflict-callbacks.c Sun Aug  5 13:21:31 2012
@@ -687,6 +687,7 @@ svn_cl__conflict_handler(svn_wc_conflict
                                              desc->my_abspath,
                                              desc->merged_file,
                                              desc->local_abspath,
+                                             b->path_prefix,
                                              b->editor_cmd,
                                              b->config,
                                              &remains_in_conflict,

Modified: subversion/trunk/subversion/svn/file-merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/file-merge.c?rev=1369577&r1=1369576&r2=1369577&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/file-merge.c (original)
+++ subversion/trunk/subversion/svn/file-merge.c Sun Aug  5 13:21:31 2012
@@ -830,6 +830,7 @@ svn_cl__merge_file(const char *base_path
                    const char *my_path,
                    const char *merged_path,
                    const char *wc_path,
+                   const char *path_prefix,
                    const char *editor_cmd,
                    apr_hash_t *config,
                    svn_boolean_t *remains_in_conflict,
@@ -844,6 +845,13 @@ svn_cl__merge_file(const char *base_path
   const char *merged_file_name;
   struct file_merge_baton fmb;
 
+
+  SVN_ERR(svn_cmdline_printf(
+            scratch_pool, _("Merging '%s'.\n"),
+            svn_dirent_local_style(svn_dirent_skip_ancestor(path_prefix,
+                                                            wc_path),
+                                   scratch_pool)));
+
   SVN_ERR(svn_io_file_open(&original_file, base_path,
                            APR_READ|APR_BUFFERED|APR_BINARY,
                            APR_OS_DEFAULT, scratch_pool));
@@ -887,6 +895,12 @@ svn_cl__merge_file(const char *base_path
   if (fmb.abort_merge)
     {
       SVN_ERR(svn_io_remove_file2(merged_file_name, TRUE, scratch_pool));
+      SVN_ERR(svn_cmdline_printf(
+                scratch_pool, _("Merge of '%s' aborted.\n"),
+                svn_dirent_local_style(svn_dirent_skip_ancestor(path_prefix,
+                                                                wc_path),
+                                       scratch_pool)));
+                
       return SVN_NO_ERROR;
     }
 
@@ -899,5 +913,19 @@ svn_cl__merge_file(const char *base_path
                          svn_dirent_local_style(merged_file_name,
                                                 scratch_pool)));
 
+  if (fmb.remains_in_conflict)
+    SVN_ERR(svn_cmdline_printf(
+              scratch_pool,
+              _("Merge of '%s' completed (remains in conflict).\n"),
+              svn_dirent_local_style(svn_dirent_skip_ancestor(path_prefix,
+                                                              wc_path),
+                                     scratch_pool)));
+  else
+    SVN_ERR(svn_cmdline_printf(
+              scratch_pool, _("Merge of '%s' completed.\n"),
+              svn_dirent_local_style(svn_dirent_skip_ancestor(path_prefix,
+                                                              wc_path),
+                                     scratch_pool)));
+                
   return SVN_NO_ERROR;
 }



Mime
View raw message