subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1368454 - in /subversion/trunk/subversion/svn: main.c merge-cmd.c
Date Thu, 02 Aug 2012 13:09:52 GMT
Author: julianfoad
Date: Thu Aug  2 13:09:52 2012
New Revision: 1368454

URL: http://svn.apache.org/viewvc?rev=1368454&view=rev
Log:
Move some 'svn merge' option validity checks from main.c to merge-cmd.c
where the rest of them are.  Lose one special case of reporting two
conflicts in a single message ("--reintegrate cannot be used with
--ignore-ancestry or --record-only"), since there are many possible
combinations and the benefit is small.

* subversion/svn/main.c
  (sub_main): Move the 'reintegrate' checks from here ...

* subversion/svn/merge-cmd.c
  (svn_cl__merge): ... to here, and lose a two-errors-in-one-message.

Modified:
    subversion/trunk/subversion/svn/main.c
    subversion/trunk/subversion/svn/merge-cmd.c

Modified: subversion/trunk/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/main.c?rev=1368454&r1=1368453&r2=1368454&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/main.c (original)
+++ subversion/trunk/subversion/svn/main.c Thu Aug  2 13:09:52 2012
@@ -2539,37 +2539,6 @@ sub_main(int argc, const char *argv[], a
       return EXIT_ERROR(err);
     }
 
-  /* The --reintegrate option is mutually exclusive with both
-     --ignore-ancestry and --record-only. */
-  if (opt_state.reintegrate)
-    {
-      if (opt_state.ignore_ancestry)
-        {
-          if (opt_state.record_only)
-            {
-              err = svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
-                                     _("--reintegrate cannot be used with "
-                                       "--ignore-ancestry or "
-                                       "--record-only"));
-              return EXIT_ERROR(err);
-            }
-          else
-            {
-              err = svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
-                                     _("--reintegrate cannot be used with "
-                                       "--ignore-ancestry"));
-              return EXIT_ERROR(err);
-            }
-          }
-      else if (opt_state.record_only)
-        {
-          err = svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
-                                 _("--reintegrate cannot be used with "
-                                   "--record-only"));
-          return EXIT_ERROR(err);
-        }
-    }
-
   /* Update auto-props-enable option, and populate the MIME types map,
      for add/import commands */
   if (subcommand->cmd_func == svn_cl__add

Modified: subversion/trunk/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/merge-cmd.c?rev=1368454&r1=1368453&r2=1368454&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/merge-cmd.c (original)
+++ subversion/trunk/subversion/svn/merge-cmd.c Thu Aug  2 13:09:52 2012
@@ -371,6 +371,16 @@ svn_cl__merge(apr_getopt_t *os,
   /* More input validation. */
   if (opt_state->reintegrate)
     {
+      if (opt_state->ignore_ancestry)
+        return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
+                                _("--reintegrate cannot be used with "
+                                  "--ignore-ancestry"));
+
+      if (opt_state->record_only)
+        return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
+                                _("--reintegrate cannot be used with "
+                                  "--record-only"));
+
       if (opt_state->depth != svn_depth_unknown)
         return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
                                 _("--depth cannot be used with "



Mime
View raw message