You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2010/09/28 12:11:00 UTC

svn commit: r1002094 - /subversion/trunk/subversion/svn/commit-cmd.c

Author: stsp
Date: Tue Sep 28 10:11:00 2010
New Revision: 1002094

URL: http://svn.apache.org/viewvc?rev=1002094&view=rev
Log:
* subversion/svn/commit-cmd.c
  (svn_cl__commit): In an attempt to prevent surprises due to issue #3699,
   when commits are performed with a depth smaller than infinity, print
   a warning explaining that copied directories will regardless be copied
   with infinite depth. This is not a fix for issue #3699, of course, and
   more work is needed to get to the desired behaviour described by Bert
   in http://subversion.tigris.org/issues/show_bug.cgi?id=3699#desc9

Modified:
    subversion/trunk/subversion/svn/commit-cmd.c

Modified: subversion/trunk/subversion/svn/commit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/commit-cmd.c?rev=1002094&r1=1002093&r2=1002094&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/commit-cmd.c (original)
+++ subversion/trunk/subversion/svn/commit-cmd.c Tue Sep 28 10:11:00 2010
@@ -97,6 +97,21 @@ svn_cl__commit(apr_getopt_t *os,
   if (opt_state->depth == svn_depth_unknown)
     opt_state->depth = svn_depth_infinity;
 
+  /* Copies are done server-side, and cheaply, which means they're
+   * effectively always done with infinite depth.
+   * This is a potential cause of confusion for users trying to commit
+   * copied subtrees in part by restricting the commit's depth.
+   * See issue #3699. */
+  if (opt_state->depth < svn_depth_infinity)
+    SVN_ERR(svn_cmdline_printf(pool,
+                               _("svn: warning: The depth of this commit "
+                                 "is '%s', but copied directories will "
+                                 "regardless be committed with depth '%s'. "
+                                 "You must remove unwanted children of those "
+                                 "directories in a separate commit.\n"),
+                               svn_depth_to_word(opt_state->depth),
+                               svn_depth_to_word(svn_depth_infinity)));
+    
   cfg = apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_CONFIG,
                      APR_HASH_KEY_STRING);
   if (cfg)