You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2013/01/12 21:24:15 UTC

svn commit: r1432504 [5/6] - in /subversion/branches/ev2-export: ./ contrib/client-side/emacs/ notes/http-and-webdav/ subversion/bindings/javahl/native/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_delta/ ...

Modified: subversion/branches/ev2-export/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svn/conflict-callbacks.c?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/ev2-export/subversion/svn/conflict-callbacks.c Sat Jan 12 20:24:12 2013
@@ -36,7 +36,7 @@
 #include "svn_sorts.h"
 
 #include "cl.h"
-#include "tree-conflicts.h"
+#include "cl-conflicts.h"
 
 #include "private/svn_cmdline_private.h"
 

Modified: subversion/branches/ev2-export/subversion/svn/info-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svn/info-cmd.c?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svn/info-cmd.c (original)
+++ subversion/branches/ev2-export/subversion/svn/info-cmd.c Sat Jan 12 20:24:12 2013
@@ -40,7 +40,7 @@
 #include "cl.h"
 
 #include "svn_private_config.h"
-#include "tree-conflicts.h"
+#include "cl-conflicts.h"
 
 
 /*** Code. ***/
@@ -240,47 +240,7 @@ print_info_xml(void *baton,
                       APR_ARRAY_IDX(info->wc_info->conflicts, i,
                                     const svn_wc_conflict_description2_t *);
 
-          switch (conflict->kind)
-            {
-              case svn_wc_conflict_kind_text:
-                /* "<conflict>" */
-                svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "conflict",
-                                      NULL);
-
-                /* "<prev-base-file> xx </prev-base-file>" */
-                svn_cl__xml_tagged_cdata(&sb, pool, "prev-base-file",
-                                         conflict->base_abspath);
-
-                /* "<prev-wc-file> xx </prev-wc-file>" */
-                svn_cl__xml_tagged_cdata(&sb, pool, "prev-wc-file",
-                                         conflict->my_abspath);
-
-                /* "<cur-base-file> xx </cur-base-file>" */
-                svn_cl__xml_tagged_cdata(&sb, pool, "cur-base-file",
-                                         conflict->their_abspath);
-
-                /* "</conflict>" */
-                svn_xml_make_close_tag(&sb, pool, "conflict");
-              break;
-
-              case svn_wc_conflict_kind_property:
-                /* "<conflict>" */
-                svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "conflict",
-                                      NULL);
-
-                /* "<prop-file> xx </prop-file>" */
-                svn_cl__xml_tagged_cdata(&sb, pool, "prop-file",
-                                         conflict->their_abspath);
-
-                /* "</conflict>" */
-                svn_xml_make_close_tag(&sb, pool, "conflict");
-              break;
-
-              case svn_wc_conflict_kind_tree:
-                SVN_ERR(svn_cl__append_tree_conflict_info_xml(sb, conflict,
-                                                              pool));
-              break;
-            }
+          SVN_ERR(svn_cl__append_conflict_info_xml(sb, conflict, pool));
         }
     }
 
@@ -482,12 +442,10 @@ print_info(void *baton,
 
           for (i = 0; i < info->wc_info->conflicts->nelts; i++)
             {
-                const svn_wc_conflict_description2_t *conflict =
-                      APR_ARRAY_IDX(info->wc_info->conflicts, i,
-                                    const svn_wc_conflict_description2_t *);
-                const char *desc;
-                const char *src_left_version;
-                const char *src_right_version;
+              const svn_wc_conflict_description2_t *conflict =
+                    APR_ARRAY_IDX(info->wc_info->conflicts, i,
+                                  const svn_wc_conflict_description2_t *);
+              const char *desc;
 
               switch (conflict->kind)
                 {
@@ -526,33 +484,45 @@ print_info(void *baton,
                         svn_cl__get_human_readable_tree_conflict_description(
                                                     &desc, conflict, pool));
 
-                    src_left_version =
-                          svn_cl__node_description(conflict->src_left_version,
-                                                   info->repos_root_URL, pool);
-
-                    src_right_version =
-                          svn_cl__node_description(conflict->src_right_version,
-                                                   info->repos_root_URL, pool);
-
                     SVN_ERR(svn_cmdline_printf(pool, "%s: %s\n",
                                                _("Tree conflict"), desc));
-
-                    if (src_left_version)
-                        SVN_ERR(svn_cmdline_printf(pool, "  %s: %s\n",
-                                   _("Source  left"), /* (1) */
-                                   src_left_version));
-                    /* (1): Sneaking in a space in "Source  left" so that
-                     * it is the same length as "Source right" while it still
-                     * starts in the same column. That's just a tiny tweak in
-                     * the English `svn'. */
-
-                    if (src_right_version)
-                        SVN_ERR(svn_cmdline_printf(pool, "  %s: %s\n",
-                                                   _("Source right"),
-                                                   src_right_version));
                   break;
                 }
             }
+
+          /* We only store one left and right version for all conflicts, which is
+             referenced from all conflicts.
+             Print it after the conflicts to match the 1.6/1.7 output where it is
+             only available for tree conflicts */
+          {
+            const char *src_left_version;
+            const char *src_right_version;
+            const svn_wc_conflict_description2_t *conflict =
+                  APR_ARRAY_IDX(info->wc_info->conflicts, 0,
+                                const svn_wc_conflict_description2_t *);
+
+            src_left_version =
+                        svn_cl__node_description(conflict->src_left_version,
+                                                 info->repos_root_URL, pool);
+
+            src_right_version =
+                        svn_cl__node_description(conflict->src_right_version,
+                                                 info->repos_root_URL, pool);
+
+            if (src_left_version)
+              SVN_ERR(svn_cmdline_printf(pool, "  %s: %s\n",
+                                         _("Source  left"), /* (1) */
+                                         src_left_version));
+            /* (1): Sneaking in a space in "Source  left" so that
+             * it is the same length as "Source right" while it still
+             * starts in the same column. That's just a tiny tweak in
+             * the English `svn'. */
+
+            if (src_right_version)
+              SVN_ERR(svn_cmdline_printf(pool, "  %s: %s\n",
+                                         _("Source right"),
+                                         src_right_version));
+          }
         }
     }
 

Modified: subversion/branches/ev2-export/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svn/merge-cmd.c?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svn/merge-cmd.c (original)
+++ subversion/branches/ev2-export/subversion/svn/merge-cmd.c Sat Jan 12 20:24:12 2013
@@ -386,9 +386,9 @@ svn_cl__merge(apr_getopt_t *os,
   if (sourcepath1 && sourcepath2 && strcmp(targetpath, "") == 0)
     {
       /* If the sourcepath is a URL, it can only refer to a target in
-         the current working directory.  However, if the sourcepath is
-         a local path, it can refer to a target somewhere deeper in
-         the directory structure. */
+         the current working directory or which is the current working
+         directory.  However, if the sourcepath is a local path, it can
+         refer to a target somewhere deeper in the directory structure. */
       if (svn_path_is_url(sourcepath1))
         {
           const char *sp1_basename = svn_uri_basename(sourcepath1, pool);
@@ -396,12 +396,29 @@ svn_cl__merge(apr_getopt_t *os,
 
           if (strcmp(sp1_basename, sp2_basename) == 0)
             {
-              svn_node_kind_t kind;
+              const char *target_url;
+              const char *target_base;
 
-              SVN_ERR(svn_io_check_path(sp1_basename, &kind, pool));
-              if (kind == svn_node_file)
+              SVN_ERR(svn_client_url_from_path2(&target_url, targetpath, ctx,
+                                                pool, pool));
+              target_base = svn_uri_basename(target_url, pool);
+
+              /* If the basename of the source is the same as the basename of
+                 the cwd assume the cwd is the target. */
+              if (strcmp(sp1_basename, target_base) != 0)
                 {
-                  targetpath = sp1_basename;
+                  svn_node_kind_t kind;
+
+                  /* If the basename of the source differs from the basename
+                     of the target.  We still might assume the cwd is the
+                     target, but first check if there is a file in the cwd
+                     with the same name as the source basename.  If there is,
+                     then assume that file is the target. */
+                  SVN_ERR(svn_io_check_path(sp1_basename, &kind, pool));
+                  if (kind == svn_node_file)
+                    {
+                      targetpath = sp1_basename;
+                    }
                 }
             }
         }

Modified: subversion/branches/ev2-export/subversion/svn/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svn/status.c?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svn/status.c (original)
+++ subversion/branches/ev2-export/subversion/svn/status.c Sat Jan 12 20:24:12 2013
@@ -33,7 +33,7 @@
 #include "svn_time.h"
 #include "cl.h"
 #include "svn_private_config.h"
-#include "tree-conflicts.h"
+#include "cl-conflicts.h"
 #include "private/svn_wc_private.h"
 
 /* Return the single character representation of STATUS */

Modified: subversion/branches/ev2-export/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svn/svn.c?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svn/svn.c (original)
+++ subversion/branches/ev2-export/subversion/svn/svn.c Sat Jan 12 20:24:12 2013
@@ -2474,7 +2474,7 @@ sub_main(int argc, const char *argv[], a
     }
 
   /* -N has a different meaning depending on the command */
-  if (descend == FALSE)
+  if (!descend)
     {
       if (subcommand->cmd_func == svn_cl__status)
         {

Modified: subversion/branches/ev2-export/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svnadmin/svnadmin.c?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/ev2-export/subversion/svnadmin/svnadmin.c Sat Jan 12 20:24:12 2013
@@ -1150,7 +1150,7 @@ subcommand_load(apr_getopt_t *os, void *
                            opt_state->uuid_action, opt_state->parent_dir,
                            opt_state->use_pre_commit_hook,
                            opt_state->use_post_commit_hook,
-                           opt_state->bypass_prop_validation ? FALSE : TRUE,
+                           !opt_state->bypass_prop_validation,
                            opt_state->quiet ? NULL : repos_notify_handler,
                            stdout_stream, check_cancel, NULL, pool);
   if (err && err->apr_err == SVN_ERR_BAD_PROPERTY_VALUE)

Modified: subversion/branches/ev2-export/subversion/svnlook/svnlook.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svnlook/svnlook.c?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svnlook/svnlook.c (original)
+++ subversion/branches/ev2-export/subversion/svnlook/svnlook.c Sat Jan 12 20:24:12 2013
@@ -487,16 +487,20 @@ generate_delta_tree(svn_repos_node_t **t
 /*** Tree Printing Routines ***/
 
 /* Recursively print only directory nodes that either a) have property
-   mods, or b) contains files that have changed. */
+   mods, or b) contains files that have changed, or c) has added or deleted
+   children.  NODE is the root node of the tree delta, so every node in it
+   is either changed or is a directory with a changed node somewhere in the
+   subtree below it.
+ */
 static svn_error_t *
 print_dirs_changed_tree(svn_repos_node_t *node,
                         const char *path /* UTF-8! */,
                         apr_pool_t *pool)
 {
   svn_repos_node_t *tmp_node;
-  int print_me = 0;
+  svn_boolean_t print_me = FALSE;
   const char *full_path;
-  apr_pool_t *subpool;
+  apr_pool_t *iterpool;
 
   SVN_ERR(check_cancel(NULL));
 
@@ -509,33 +513,19 @@ print_dirs_changed_tree(svn_repos_node_t
 
   /* Got prop mods?  Excellent. */
   if (node->prop_mod)
-    print_me = 1;
+    print_me = TRUE;
 
-  if (! print_me)
+  /* Fly through the list of children, checking for modified files. */
+  tmp_node = node->child;
+  while (tmp_node && (! print_me))
     {
-      /* Fly through the list of children, checking for modified files. */
-      tmp_node = node->child;
-      if (tmp_node)
-        {
-          if ((tmp_node->kind == svn_node_file)
-              || (tmp_node->text_mod)
-              || (tmp_node->action == 'A')
-              || (tmp_node->action == 'D'))
-            {
-              print_me = 1;
-            }
-          while (tmp_node->sibling && (! print_me ))
-            {
-              tmp_node = tmp_node->sibling;
-              if ((tmp_node->kind == svn_node_file)
-                  || (tmp_node->text_mod)
-                  || (tmp_node->action == 'A')
-                  || (tmp_node->action == 'D'))
-                {
-                  print_me = 1;
-                }
-            }
+      if ((tmp_node->kind == svn_node_file)
+           || (tmp_node->action == 'A')
+           || (tmp_node->action == 'D'))
+        {
+          print_me = TRUE;
         }
+      tmp_node = tmp_node->sibling;
     }
 
   /* Print the node if it qualifies. */
@@ -550,17 +540,15 @@ print_dirs_changed_tree(svn_repos_node_t
     return SVN_NO_ERROR;
 
   /* Recursively handle the node's children. */
-  subpool = svn_pool_create(pool);
-  full_path = svn_dirent_join(path, tmp_node->name, subpool);
-  SVN_ERR(print_dirs_changed_tree(tmp_node, full_path, subpool));
-  while (tmp_node->sibling)
+  iterpool = svn_pool_create(pool);
+  while (tmp_node)
     {
-      svn_pool_clear(subpool);
+      svn_pool_clear(iterpool);
+      full_path = svn_dirent_join(path, tmp_node->name, iterpool);
+      SVN_ERR(print_dirs_changed_tree(tmp_node, full_path, iterpool));
       tmp_node = tmp_node->sibling;
-      full_path = svn_dirent_join(path, tmp_node->name, subpool);
-      SVN_ERR(print_dirs_changed_tree(tmp_node, full_path, subpool));
     }
-  svn_pool_destroy(subpool);
+  svn_pool_destroy(iterpool);
 
   return SVN_NO_ERROR;
 }
@@ -576,8 +564,8 @@ print_changed_tree(svn_repos_node_t *nod
 {
   const char *full_path;
   char status[4] = "_  ";
-  int print_me = 1;
-  apr_pool_t *subpool;
+  svn_boolean_t print_me = TRUE;
+  apr_pool_t *iterpool;
 
   SVN_ERR(check_cancel(NULL));
 
@@ -596,14 +584,14 @@ print_changed_tree(svn_repos_node_t *nod
   else if (node->action == 'R')
     {
       if ((! node->text_mod) && (! node->prop_mod))
-        print_me = 0;
+        print_me = FALSE;
       if (node->text_mod)
         status[0] = 'U';
       if (node->prop_mod)
         status[1] = 'U';
     }
   else
-    print_me = 0;
+    print_me = FALSE;
 
   /* Print this node unless told to skip it. */
   if (print_me)
@@ -629,17 +617,15 @@ print_changed_tree(svn_repos_node_t *nod
     return SVN_NO_ERROR;
 
   /* Recursively handle the node's children. */
-  subpool = svn_pool_create(pool);
-  full_path = svn_dirent_join(path, node->name, subpool);
-  SVN_ERR(print_changed_tree(node, full_path, copy_info, subpool));
-  while (node->sibling)
+  iterpool = svn_pool_create(pool);
+  while (node)
     {
-      svn_pool_clear(subpool);
+      svn_pool_clear(iterpool);
+      full_path = svn_dirent_join(path, node->name, iterpool);
+      SVN_ERR(print_changed_tree(node, full_path, copy_info, iterpool));
       node = node->sibling;
-      full_path = svn_dirent_join(path, node->name, subpool);
-      SVN_ERR(print_changed_tree(node, full_path, copy_info, subpool));
     }
-  svn_pool_destroy(subpool);
+  svn_pool_destroy(iterpool);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/ev2-export/subversion/svnsync/svnsync.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svnsync/svnsync.c?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svnsync/svnsync.c (original)
+++ subversion/branches/ev2-export/subversion/svnsync/svnsync.c Sat Jan 12 20:24:12 2013
@@ -531,7 +531,7 @@ filter_props(int *filtered_count, apr_ha
       /* Copy all properties:
           - not matching the exclude pattern if provided OR
           - matching the include pattern if provided */
-      if (!filter || filter(propname) == FALSE)
+      if (!filter || !filter(propname))
         {
           apr_hash_set(filtered, propname, APR_HASH_KEY_STRING, propval);
         }

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/basic_tests.py?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/basic_tests.py Sat Jan 12 20:24:12 2013
@@ -2525,22 +2525,22 @@ def basic_auth_test(sbox):
 
   # Checkout with jrandom
   exit_code, output, errput = svntest.main.run_command(
-    svntest.main.svn_binary, None, 1, 'co', sbox.repo_url, wc_dir,
+    svntest.main.svn_binary, None, True, 'co', sbox.repo_url, wc_dir,
     '--username', 'jrandom', '--password', 'rayjandom',
     '--config-dir', config_dir)
 
   exit_code, output, errput = svntest.main.run_command(
-    svntest.main.svn_binary, None, 1, 'co', sbox.repo_url, wc_dir,
+    svntest.main.svn_binary, None, True, 'co', sbox.repo_url, wc_dir,
     '--username', 'jrandom', '--non-interactive', '--config-dir', config_dir)
 
   # Checkout with jconstant
   exit_code, output, errput = svntest.main.run_command(
-    svntest.main.svn_binary, None, 1, 'co', sbox.repo_url, wc_dir,
+    svntest.main.svn_binary, None, True, 'co', sbox.repo_url, wc_dir,
     '--username', 'jconstant', '--password', 'rayjandom',
     '--config-dir', config_dir)
 
   exit_code, output, errput = svntest.main.run_command(
-    svntest.main.svn_binary, None, 1, 'co', sbox.repo_url, wc_dir,
+    svntest.main.svn_binary, None, True, 'co', sbox.repo_url, wc_dir,
     '--username', 'jconstant', '--non-interactive',
     '--config-dir', config_dir)
 
@@ -2548,7 +2548,7 @@ def basic_auth_test(sbox):
   # a password and the above cached password belongs to jconstant
   expected_err = ["authorization failed: Could not authenticate to server:"]
   exit_code, output, errput = svntest.main.run_command(
-    svntest.main.svn_binary, expected_err, 1, 'co', sbox.repo_url, wc_dir,
+    svntest.main.svn_binary, expected_err, True, 'co', sbox.repo_url, wc_dir,
     '--username', 'jrandom', '--non-interactive', '--config-dir', config_dir)
 
 def basic_add_svn_format_file(sbox):

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/copy_tests.py?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/copy_tests.py Sat Jan 12 20:24:12 2013
@@ -769,9 +769,11 @@ def mv_and_revert_directory(sbox):
   svntest.actions.run_and_verify_svn(None, None, [], 'move',
                                      E_path, F_path)
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
-  expected_status.tweak('A/B/E', 'A/B/E/alpha', 'A/B/E/beta', status='D ')
+  expected_status.tweak('A/B/E/alpha', 'A/B/E/beta', status='D ')
+  expected_status.tweak('A/B/E', status='D ', moved_to='A/B/F/E')
   expected_status.add({
-    'A/B/F/E' : Item(status='A ', wc_rev='-', copied='+'),
+    'A/B/F/E' : Item(status='A ', wc_rev='-', copied='+',
+                     moved_from='A/B/E'),
     'A/B/F/E/alpha' : Item(status='  ', wc_rev='-', copied='+'),
     'A/B/F/E/beta' : Item(status='  ', wc_rev='-', copied='+'),
     })
@@ -781,6 +783,7 @@ def mv_and_revert_directory(sbox):
   svntest.actions.run_and_verify_svn(None, None, [], 'revert', '--recursive',
                                      new_E_path)
   expected_status.remove('A/B/F/E', 'A/B/F/E/alpha', 'A/B/F/E/beta')
+  expected_status.tweak('A/B/E', moved_to=None)
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
 
@@ -2420,7 +2423,8 @@ def move_file_back_and_forth(sbox):
   # Check expected status before commit
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.add({
-    'A/D/G/rho' : Item(status='R ', copied='+', wc_rev='-'),
+    'A/D/G/rho' : Item(status='R ', copied='+', wc_rev='-',
+                       moved_from='A/D/G/rho', moved_to='A/D/G/rho'),
     })
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
@@ -2463,7 +2467,8 @@ def move_dir_back_and_forth(sbox):
   # Verify that the status indicates a replace with history
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.add({
-      'A/D'               : Item(status='R ', copied='+', wc_rev='-'),
+      'A/D'               : Item(status='R ', copied='+', wc_rev='-',
+                                 moved_from='A/D', moved_to='A/D'),
       'A/D/G'             : Item(status='  ', copied='+', wc_rev='-'),
       'A/D/G/pi'          : Item(status='  ', copied='+', wc_rev='-'),
       'A/D/G/rho'         : Item(status='  ', copied='+', wc_rev='-'),
@@ -2860,8 +2865,9 @@ def move_to_relative_paths(sbox):
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.add({
-    'beta'        : Item(status='A ', copied='+', wc_rev='-'),
-    'A/B/E/beta'  : Item(status='D ', wc_rev='1')
+    'beta'        : Item(status='A ', copied='+', wc_rev='-',
+                         moved_from='A/B/E/beta'),
+    'A/B/E/beta'  : Item(status='D ', wc_rev='1', moved_to='beta')
   })
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
@@ -2882,8 +2888,9 @@ def move_from_relative_paths(sbox):
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.add({
-    'A/B/F/beta'  : Item(status='A ', copied='+', wc_rev='-'),
-    'A/B/E/beta'  : Item(status='D ', wc_rev='1')
+    'A/B/F/beta'  : Item(status='A ', copied='+', wc_rev='-',
+                         moved_from='A/B/E/beta'),
+    'A/B/E/beta'  : Item(status='D ', wc_rev='1', moved_to='A/B/F/beta')
   })
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
@@ -4436,22 +4443,27 @@ def move_dir_containing_move(sbox):
                                      sbox.ospath('A/B_tmp'))
 
   expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1)
-  expected_status.tweak('A/B',
-                        'A/B/E',
+  expected_status.tweak('A/B', status='D ', moved_to='A/B_tmp')
+  expected_status.tweak('A/B/E',
                         'A/B/E/alpha',
                         'A/B/E/beta',
                         'A/B/F',
                         'A/B/lambda',
                         status='D ')
   expected_status.add({
-      'A/B_tmp'               : Item(status='A ', copied='+', wc_rev='-'),
+      'A/B_tmp'               : Item(status='A ', copied='+', wc_rev='-',
+                                     moved_from='A/B'),
       # alpha has a revision that isn't reported by status.
       'A/B_tmp/E'             : Item(status='  ', copied='+', wc_rev='-'),
-      'A/B_tmp/E/alpha'       : Item(status='D ', copied='+', wc_rev='-'),
-      'A/B_tmp/E/alpha_moved' : Item(status='A ', copied='+', wc_rev='-'),
+      'A/B_tmp/E/alpha'       : Item(status='D ', copied='+', wc_rev='-',
+                                     moved_to='A/B_tmp/E/alpha_moved'),
+      'A/B_tmp/E/alpha_moved' : Item(status='A ', copied='+', wc_rev='-',
+                                     moved_from='A/B_tmp/E/alpha'),
       'A/B_tmp/E/beta'        : Item(status='  ', copied='+', wc_rev='-'),
-      'A/B_tmp/F'             : Item(status='D ', copied='+', wc_rev='-'),
-      'A/B_tmp/F_moved'       : Item(status='A ', copied='+', wc_rev='-'),
+      'A/B_tmp/F'             : Item(status='D ', copied='+', wc_rev='-',
+                                     moved_to='A/B_tmp/F_moved'),
+      'A/B_tmp/F_moved'       : Item(status='A ', copied='+', wc_rev='-',
+                                     moved_from='A/B_tmp/F'),
       'A/B_tmp/lambda'        : Item(status='  ', copied='+', wc_rev='-'),
     })
 
@@ -4460,6 +4472,7 @@ def move_dir_containing_move(sbox):
   svntest.actions.run_and_verify_svn(None, None, [], 'mv',
                                      sbox.ospath('A/B_tmp'),
                                      sbox.ospath('A/B_moved'))
+  expected_status.tweak('A/B', moved_to='A/B_moved')
   expected_status.remove('A/B_tmp',
                          'A/B_tmp/E',
                          'A/B_tmp/E/alpha',
@@ -4469,13 +4482,18 @@ def move_dir_containing_move(sbox):
                          'A/B_tmp/F_moved',
                          'A/B_tmp/lambda')
   expected_status.add({
-      'A/B_moved'               : Item(status='A ', copied='+', wc_rev='-'),
+      'A/B_moved'               : Item(status='A ', copied='+', wc_rev='-',
+                                       moved_from='A/B'),
       'A/B_moved/E'             : Item(status='  ', copied='+', wc_rev='-'),
-      'A/B_moved/E/alpha'       : Item(status='D ', copied='+', wc_rev='-'),
-      'A/B_moved/E/alpha_moved' : Item(status='A ', copied='+', wc_rev='-'),
+      'A/B_moved/E/alpha'       : Item(status='D ', copied='+', wc_rev='-',
+                                       moved_to='A/B_moved/E/alpha_moved'),
+      'A/B_moved/E/alpha_moved' : Item(status='A ', copied='+', wc_rev='-',
+                                       moved_from='A/B_moved/E/alpha'),
       'A/B_moved/E/beta'        : Item(status='  ', copied='+', wc_rev='-'),
-      'A/B_moved/F'             : Item(status='D ', copied='+', wc_rev='-'),
-      'A/B_moved/F_moved'       : Item(status='A ', copied='+', wc_rev='-'),
+      'A/B_moved/F'             : Item(status='D ', copied='+', wc_rev='-',
+                                       moved_to='A/B_moved/F_moved'),
+      'A/B_moved/F_moved'       : Item(status='A ', copied='+', wc_rev='-',
+                                       moved_from='A/B_moved/F'),
       'A/B_moved/lambda'        : Item(status='  ', copied='+', wc_rev='-'),
     })
 
@@ -4505,6 +4523,8 @@ def move_dir_containing_move(sbox):
                          'A/B/lambda',
                          'A/B_moved/E/alpha',
                          'A/B_moved/F')
+  expected_status.tweak('A/B_moved', 'A/B_moved/E/alpha_moved',
+                        'A/B_moved/F_moved', moved_from=None)
   svntest.actions.run_and_verify_commit(sbox.wc_dir,
                                         expected_output,
                                         expected_status,
@@ -5148,8 +5168,8 @@ def deleted_file_with_case_clash(sbox):
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.add({
-    'iota' : Item(status='D ', wc_rev=1),
-    'IOTA' : Item(status='A ', copied='+', wc_rev='-'),
+    'iota' : Item(status='D ', wc_rev=1, moved_to='IOTA'),
+    'IOTA' : Item(status='A ', copied='+', wc_rev='-', moved_from='iota'),
     })
 
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
@@ -5211,15 +5231,16 @@ def case_only_rename(sbox):
   # Create expected status.
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.add({
-    'iota'              : Item(status='D ', wc_rev=1),
-    'IoTa'              : Item(status='A ', copied='+', wc_rev='-'),
-    'A/B'               : Item(status='D ', wc_rev='1'),
+  
+    'iota'              : Item(status='D ', wc_rev=1, moved_to='IoTa'),
+    'IoTa'              : Item(status='A ', copied='+', wc_rev='-', moved_from='iota'),
+    'A/B'               : Item(status='D ', wc_rev='1', moved_to='A/b'),
     'A/B/lambda'        : Item(status='D ', wc_rev='1'),
     'A/B/E'             : Item(status='D ', wc_rev='1'),
     'A/B/E/alpha'       : Item(status='D ', wc_rev='1'),
     'A/B/E/beta'        : Item(status='D ', wc_rev='1'),
     'A/B/F'             : Item(status='D ', wc_rev='1'),
-    'A/b'               : Item(status='A ', copied='+', wc_rev='-'),
+    'A/b'               : Item(status='A ', copied='+', wc_rev='-', moved_from='A/B'),
     'A/b/E'             : Item(status='  ', copied='+', wc_rev='-'),
     'A/b/E/beta'        : Item(status='  ', copied='+', wc_rev='-'),
     'A/b/E/alpha'       : Item(status='  ', copied='+', wc_rev='-'),

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/getopt_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/getopt_tests.py?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/getopt_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/getopt_tests.py Sat Jan 12 20:24:12 2013
@@ -172,7 +172,7 @@ def run_one_test(sbox, basename, *vararg
     exit_code, actual_stdout, actual_stderr = svntest.main.run_svn(1, *varargs)
   else:
     exit_code, actual_stdout, actual_stderr = svntest.main.run_command(svntest.main.svn_binary,
-                                                                       1, 0, *varargs)
+                                                                       1, False, *varargs)
 
   # Delete and perform search and replaces on the lines from the
   # actual and expected output that may differ between build

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/import_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/import_tests.py?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/import_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/import_tests.py Sat Jan 12 20:24:12 2013
@@ -354,10 +354,13 @@ enable-auto-props = yes
 
   # eol styl of test.dsp is CRLF, so diff will use that too. Make sure we
   # define CRLF in a platform independent way.
+  # CRLF is a string that will match a CRLF sequence read from a text file.
+  # ### On Windows, we assume CRLF will be read as LF, so it's a poor test.
   if os.name == 'nt':
     crlf = '\n'
   else:
     crlf = '\r\n'
+
   expected_output = [
   "Index: test.dsp\n",
   "===================================================================\n",

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/merge_tests.py?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/merge_tests.py Sat Jan 12 20:24:12 2013
@@ -3626,6 +3626,8 @@ def merge_conflict_markers_matching_eol(
 
   mu_path = sbox.ospath('A/mu')
 
+  # CRLF is a string that will match a CRLF sequence read from a text file.
+  # ### On Windows, we assume CRLF will be read as LF, so it's a poor test.
   if os.name == 'nt':
     crlf = '\n'
   else:
@@ -3765,6 +3767,8 @@ def merge_eolstyle_handling(sbox):
 
   mu_path = sbox.ospath('A/mu')
 
+  # CRLF is a string that will match a CRLF sequence read from a text file.
+  # ### On Windows, we assume CRLF will be read as LF, so it's a poor test.
   if os.name == 'nt':
     crlf = '\n'
   else:
@@ -16423,9 +16427,12 @@ def no_self_referential_or_nonexistent_i
                                        None, 1)
 
 #----------------------------------------------------------------------
-# Test for issue #3756 'subtree merge can inherit invalid working mergeinfo'.
+# Test for issue #3756 'subtree merge can inherit invalid working mergeinfo',
+# issue #3668 'inheritance can result in self-referential mergeinfo', and
+# issue #3669 'inheritance can result in mergeinfo describing nonexistent
+# sources'.
 @XFail()
-@Issue(3756)
+@Issue(3756,3668,3669)
 def subtree_merges_inherit_invalid_working_mergeinfo(sbox):
   "don't inherit bogus working mergeinfo"
 
@@ -16474,7 +16481,7 @@ def subtree_merges_inherit_invalid_worki
   # resulting mergeinfo on 'A_COPY/C/nu' should be only '/A/C/nu:9'.
   #
   # Currently this test is marked as XFail because the resulting mergeinfo is
-  # '/A/C/nu:3,9' and thus includes a non-existent path-rev.
+  # '/A/C/nu:3,7,9' and thus includes a non-existent path-rev.
   svntest.actions.run_and_verify_svn(
     "Merge failed unexpectedly",
     svntest.verify.AnyOutput, [], 'merge', sbox.repo_url + '/A',

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/patch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/patch_tests.py?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/patch_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/patch_tests.py Sat Jan 12 20:24:12 2013
@@ -1584,12 +1584,14 @@ def patch_no_svn_eol_style(sbox):
   patch_file_path = make_patch_path(sbox)
   mu_path = sbox.ospath('A/mu')
 
+  # CRLF is a string that will match a CRLF sequence read from a text file.
+  # ### On Windows, we assume CRLF will be read as LF, so it's a poor test.
   if os.name == 'nt':
     crlf = '\n'
   else:
     crlf = '\r\n'
-  eols = [crlf, '\015', '\n', '\012']
 
+  eols = [crlf, '\015', '\n', '\012']
   for target_eol in eols:
     for patch_eol in eols:
       mu_contents = [
@@ -1687,7 +1689,8 @@ def patch_with_svn_eol_style(sbox):
   patch_file_path = make_patch_path(sbox)
   mu_path = sbox.ospath('A/mu')
 
-
+  # CRLF is a string that will match a CRLF sequence read from a text file.
+  # ### On Windows, we assume CRLF will be read as LF, so it's a poor test.
   if os.name == 'nt':
     crlf = '\n'
   else:
@@ -1801,7 +1804,8 @@ def patch_with_svn_eol_style_uncommitted
   patch_file_path = make_patch_path(sbox)
   mu_path = sbox.ospath('A/mu')
 
-
+  # CRLF is a string that will match a CRLF sequence read from a text file.
+  # ### On Windows, we assume CRLF will be read as LF, so it's a poor test.
   if os.name == 'nt':
     crlf = '\n'
   else:
@@ -3597,9 +3601,11 @@ def patch_moved_away(sbox):
   expected_disk.remove('A/mu')
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
-  expected_status.add({'A/mu2' : Item(status='A ', copied='+', wc_rev='-')})
+  expected_status.add({
+    'A/mu2' : Item(status='A ', copied='+', wc_rev='-', moved_from='A/mu'),
+  })
 
-  expected_status.tweak('A/mu', status='D ', wc_rev=2)
+  expected_status.tweak('A/mu', status='D ', wc_rev=2, moved_to='A/mu2')
 
   expected_skip = wc.State('', { })
 

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/revert_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/revert_tests.py?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/revert_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/revert_tests.py Sat Jan 12 20:24:12 2013
@@ -398,9 +398,10 @@ def revert_moved_file(sbox):
   # svn st
   expected_status = actions.get_virginal_state(wc_dir, 1)
   expected_status.add({
-    'iota_moved'        : Item(status='A ', copied='+', wc_rev='-'),
+    'iota_moved'        : Item(status='A ', copied='+', wc_rev='-',
+                               moved_from='iota'),
   })
-  expected_status.tweak('iota', status='D ')
+  expected_status.tweak('iota', status='D ', moved_to='iota_moved')
 
   actions.run_and_verify_unquiet_status(wc_dir, expected_status)
 
@@ -411,7 +412,8 @@ def revert_moved_file(sbox):
     iota)
 
   # svn st
-  expected_status.tweak('iota', status='  ')
+  expected_status.tweak('iota', status='  ', moved_to=None)
+  expected_status.tweak('iota_moved', moved_from=None)
 
   actions.run_and_verify_unquiet_status(wc_dir, expected_status)
 

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/svnadmin_tests.py?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/svnadmin_tests.py Sat Jan 12 20:24:12 2013
@@ -201,7 +201,7 @@ def load_and_verify_dumpstream(sbox, exp
     dump = [ dump ]
 
   exit_code, output, errput = svntest.main.run_command_stdin(
-    svntest.main.svnadmin_binary, expected_stderr, 0, 1, dump,
+    svntest.main.svnadmin_binary, expected_stderr, 0, True, dump,
     'load', '--quiet', sbox.repo_dir, *varargs)
 
   if expected_stdout:

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/svndumpfilter_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/svndumpfilter_tests.py?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/svndumpfilter_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/svndumpfilter_tests.py Sat Jan 12 20:24:12 2013
@@ -71,7 +71,7 @@ def filter_and_return_output(dump, bufsi
           expected_errput = svntest.verify.AnyOutput
   ## TODO: Should we handle exit_code?
   exit_code, output, errput = svntest.main.run_command_stdin(
-    svntest.main.svndumpfilter_binary, expected_errput, bufsize, 1,
+    svntest.main.svndumpfilter_binary, expected_errput, bufsize, True,
     dump, *varargs)
 
   # Since we call svntest.main.run_command_stdin() in binary mode,

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/svnlook_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/svnlook_tests.py?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/svnlook_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/svnlook_tests.py Sat Jan 12 20:24:12 2013
@@ -48,10 +48,12 @@ Item = svntest.wc.StateItem
 # Convenience functions to make writing more tests easier
 
 def run_svnlook(*varargs):
-  """Run svnlook with VARARGS, returns stdout as list of lines.
-  Raises Failure if any stderr messages."""
+  """Run svnlook with VARARGS, returns exit code as int; stdout, stderr as
+  list of lines (including line terminators).
+  Raises Failure if any stderr messages.
+  """
   exit_code, output, dummy_errput = svntest.main.run_command(
-    svntest.main.svnlook_binary, 0, 0, *varargs)
+    svntest.main.svnlook_binary, 0, False, *varargs)
 
   return output
 
@@ -98,7 +100,7 @@ def test_misc(sbox):
 
   # give the repo a new UUID
   uuid = "01234567-89ab-cdef-89ab-cdef01234567"
-  svntest.main.run_command_stdin(svntest.main.svnadmin_binary, None, 0, 1,
+  svntest.main.run_command_stdin(svntest.main.svnadmin_binary, None, 0, True,
                            ["SVN-fs-dump-format-version: 2\n",
                             "\n",
                             "UUID: ", uuid, "\n",
@@ -504,6 +506,8 @@ def diff_ignore_eolstyle(sbox):
   repo_dir = sbox.repo_dir
   wc_dir = sbox.wc_dir
 
+  # CRLF is a string that will match a CRLF sequence read from a text file.
+  # ### On Windows, we assume CRLF will be read as LF, so it's a poor test.
   if os.name == 'nt':
     crlf = '\n'
   else:

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/svntest/actions.py?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/svntest/actions.py Sat Jan 12 20:24:12 2013
@@ -333,11 +333,11 @@ def run_and_verify_load(repo_dir, dump_f
   expected_stderr = []
   if bypass_prop_validation:
     exit_code, output, errput = main.run_command_stdin(
-      main.svnadmin_binary, expected_stderr, 0, 1, dump_file_content,
+      main.svnadmin_binary, expected_stderr, 0, True, dump_file_content,
       'load', '--force-uuid', '--quiet', '--bypass-prop-validation', repo_dir)
   else:
     exit_code, output, errput = main.run_command_stdin(
-      main.svnadmin_binary, expected_stderr, 0, 1, dump_file_content,
+      main.svnadmin_binary, expected_stderr, 0, True, dump_file_content,
       'load', '--force-uuid', '--quiet', repo_dir)
 
   verify.verify_outputs("Unexpected stderr output", None, errput,
@@ -1475,7 +1475,7 @@ def run_and_verify_status(wc_dir_name, o
   exit_code, output, errput = main.run_svn(None, 'status', '-v', '-u', '-q',
                                            wc_dir_name)
 
-  actual = tree.build_tree_from_status(output)
+  actual = tree.build_tree_from_status(output, wc_dir_name=wc_dir_name)
 
   # Verify actual output against expected output.
   try:
@@ -1514,7 +1514,7 @@ def run_and_verify_unquiet_status(wc_dir
   exit_code, output, errput = main.run_svn(None, 'status', '-v',
                                            '-u', wc_dir_name)
 
-  actual = tree.build_tree_from_status(output)
+  actual = tree.build_tree_from_status(output, wc_dir_name=wc_dir_name)
 
   # Verify actual output against expected output.
   try:
@@ -2024,7 +2024,7 @@ def check_prop(name, path, exp_out, revp
   else:
     revprop_options = []
   # Not using run_svn because binary_mode must be set
-  exit_code, out, err = main.run_command(main.svn_binary, None, 1, 'pg',
+  exit_code, out, err = main.run_command(main.svn_binary, None, True, 'pg',
                                          '--strict', name, path,
                                          '--config-dir',
                                          main.default_config_dir,

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/svntest/main.py?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/svntest/main.py Sat Jan 12 20:24:12 2013
@@ -343,7 +343,7 @@ def filter_dbg(lines):
   return included
 
 # Run any binary, logging the command line and return code
-def run_command(command, error_expected, binary_mode=0, *varargs):
+def run_command(command, error_expected, binary_mode=False, *varargs):
   """Run COMMAND with VARARGS. Return exit code as int; stdout, stderr
   as lists of lines (including line terminators).  See run_command_stdin()
   for details.  If ERROR_EXPECTED is None, any stderr output will be
@@ -451,17 +451,20 @@ def wait_on_pipe(waiter, binary_mode, st
       logger.info("CMD: %s exited with %d" % (command_string, exit_code))
     return stdout_lines, stderr_lines, exit_code
 
-def spawn_process(command, bufsize=-1, binary_mode=0, stdin_lines=None,
+def spawn_process(command, bufsize=-1, binary_mode=False, stdin_lines=None,
                   *varargs):
   """Run any binary, supplying input text, logging the command line.
+
   BUFSIZE dictates the pipe buffer size used in communication with the
-  subprocess: 0 means unbuffered, 1 means line buffered, any other
-  positive value means use a buffer of (approximately) that size.
-  A negative bufsize means to use the system default, which usually
-  means fully buffered. The default value for bufsize is 0 (unbuffered).
+  subprocess: quoting from subprocess.Popen(), "0 means unbuffered,
+  1 means line buffered, any other positive value means use a buffer of
+  (approximately) that size. A negative bufsize means to use the system
+  default, which usually means fully buffered."
+
   Normalize Windows line endings of stdout and stderr if not BINARY_MODE.
   Return exit code as int; stdout, stderr as lists of lines (including
-  line terminators)."""
+  line terminators).
+  """
   if stdin_lines and not isinstance(stdin_lines, list):
     raise TypeError("stdin_lines should have list type")
 
@@ -484,7 +487,7 @@ def spawn_process(command, bufsize=-1, b
 
   return exit_code, stdout_lines, stderr_lines
 
-def run_command_stdin(command, error_expected, bufsize=-1, binary_mode=0,
+def run_command_stdin(command, error_expected, bufsize=-1, binary_mode=False,
                       stdin_lines=None, *varargs):
   """Run COMMAND with VARARGS; input STDIN_LINES (a list of strings
   which should include newline characters) to program via stdin - this
@@ -659,45 +662,45 @@ def run_svn(error_expected, *varargs):
   non-zero exit code will raise an exception.  If
   you're just checking that something does/doesn't come out of
   stdout/stderr, you might want to use actions.run_and_verify_svn()."""
-  return run_command(svn_binary, error_expected, 0,
+  return run_command(svn_binary, error_expected, False,
                      *(_with_auth(_with_config_dir(varargs))))
 
 # For running svnadmin.  Ignores the output.
 def run_svnadmin(*varargs):
   """Run svnadmin with VARARGS, returns exit code as int; stdout, stderr as
   list of lines (including line terminators)."""
-  return run_command(svnadmin_binary, 1, 0, *varargs)
+  return run_command(svnadmin_binary, 1, False, *varargs)
 
 # For running svnlook.  Ignores the output.
 def run_svnlook(*varargs):
   """Run svnlook with VARARGS, returns exit code as int; stdout, stderr as
   list of lines (including line terminators)."""
-  return run_command(svnlook_binary, 1, 0, *varargs)
+  return run_command(svnlook_binary, 1, False, *varargs)
 
 def run_svnrdump(stdin_input, *varargs):
   """Run svnrdump with VARARGS, returns exit code as int; stdout, stderr as
   list of lines (including line terminators).  Use binary mode for output."""
   if stdin_input:
-    return run_command_stdin(svnrdump_binary, 1, 1, 1, stdin_input,
+    return run_command_stdin(svnrdump_binary, 1, 1, True, stdin_input,
                              *(_with_auth(_with_config_dir(varargs))))
   else:
-    return run_command(svnrdump_binary, 1, 1,
+    return run_command(svnrdump_binary, 1, True,
                        *(_with_auth(_with_config_dir(varargs))))
 
 def run_svnsync(*varargs):
   """Run svnsync with VARARGS, returns exit code as int; stdout, stderr as
   list of lines (including line terminators)."""
-  return run_command(svnsync_binary, 1, 0, *(_with_config_dir(varargs)))
+  return run_command(svnsync_binary, 1, False, *(_with_config_dir(varargs)))
 
 def run_svnversion(*varargs):
   """Run svnversion with VARARGS, returns exit code as int; stdout, stderr
   as list of lines (including line terminators)."""
-  return run_command(svnversion_binary, 1, 0, *varargs)
+  return run_command(svnversion_binary, 1, False, *varargs)
 
 def run_svnmucc(*varargs):
   """Run svnmucc with VARARGS, returns exit code as int; stdout, stderr as
   list of lines (including line terminators).  Use binary mode for output."""
-  return run_command(svnmucc_binary, 1, 1,
+  return run_command(svnmucc_binary, 1, True,
                      *(_with_auth(_with_config_dir(varargs))))
 
 def run_entriesdump(path):
@@ -705,7 +708,7 @@ def run_entriesdump(path):
   # use spawn_process rather than run_command to avoid copying all the data
   # to stdout in verbose mode.
   exit_code, stdout_lines, stderr_lines = spawn_process(entriesdump_binary,
-                                                        0, 0, None, path)
+                                                        0, False, None, path)
   if exit_code or stderr_lines:
     ### report on this? or continue to just skip it?
     return None
@@ -721,7 +724,7 @@ def run_entriesdump_subdirs(path):
   # use spawn_process rather than run_command to avoid copying all the data
   # to stdout in verbose mode.
   exit_code, stdout_lines, stderr_lines = spawn_process(entriesdump_binary,
-                                                        0, 0, None, '--subdirs', path)
+                                                        0, False, None, '--subdirs', path)
   return map(lambda line: line.strip(), filter_dbg(stdout_lines))
 
 def run_atomic_ra_revprop_change(url, revision, propname, skel, want_error):
@@ -730,7 +733,7 @@ def run_atomic_ra_revprop_change(url, re
   # use spawn_process rather than run_command to avoid copying all the data
   # to stdout in verbose mode.
   #exit_code, stdout_lines, stderr_lines = spawn_process(entriesdump_binary,
-  #                                                      0, 0, None, path)
+  #                                                      0, False, None, path)
 
   # This passes HTTP_LIBRARY in addition to our params.
   return run_command(atomic_ra_revprop_change_binary, True, False,
@@ -752,7 +755,7 @@ def run_wc_incomplete_tester(wc_dir, rev
 
 def youngest(repos_path):
   "run 'svnlook youngest' on REPOS_PATH, returns revision as int"
-  exit_code, stdout_lines, stderr_lines = run_command(svnlook_binary, None, 0,
+  exit_code, stdout_lines, stderr_lines = run_command(svnlook_binary, None, False,
                                                       'youngest', repos_path)
   if exit_code or stderr_lines:
     raise Failure("Unexpected failure of 'svnlook youngest':\n%s" % stderr_lines)
@@ -832,7 +835,7 @@ def create_repos(path, minor_version = N
   opts += ("--compatible-version=1.%d" % (minor_version),)
   if options.fs_type is not None:
     opts += ("--fs-type=" + options.fs_type,)
-  exit_code, stdout, stderr = run_command(svnadmin_binary, 1, 0, "create",
+  exit_code, stdout, stderr = run_command(svnadmin_binary, 1, False, "create",
                                           path, *opts)
 
   # Skip tests if we can't create the repository.
@@ -1296,7 +1299,7 @@ class TestSpawningThread(threading.Threa
     if options.http_proxy:
       args.append('--http-proxy=' + options.http_proxy)
 
-    result, stdout_lines, stderr_lines = spawn_process(command, 0, 0, None,
+    result, stdout_lines, stderr_lines = spawn_process(command, 0, False, None,
                                                        *args)
     self.results.append((index, result, stdout_lines, stderr_lines))
 

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/svntest/tree.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/svntest/tree.py?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/svntest/tree.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/svntest/tree.py Sat Jan 12 20:24:12 2013
@@ -834,10 +834,11 @@ def build_tree_from_commit(lines):
 #             IFF columns non-empty.
 #
 
-def build_tree_from_status(lines):
+def build_tree_from_status(lines, wc_dir_name=None):
   "Return a tree derived by parsing the output LINES from 'st -vuq'."
 
-  return svntest.wc.State.from_status(lines).old_tree()
+  return svntest.wc.State.from_status(lines,
+                                       wc_dir_name=wc_dir_name).old_tree()
 
 
 # Parse merge "skipped" output

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/svntest/wc.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/svntest/wc.py?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/svntest/wc.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/svntest/wc.py Sat Jan 12 20:24:12 2013
@@ -94,6 +94,11 @@ _re_parse_status = re.compile('^([?!MACD
                               '((?P<wc_rev>\d+|-|\?) +(\d|-|\?)+ +(\S+) +)?'
                               '(?P<path>.+)$')
 
+_re_parse_status_ex = re.compile('^      ('
+               '(  \> moved (from (?P<moved_from>.+)|to (?P<moved_to>.*)))'
+              '|(\>   (?P<tc>.+))'
+  ')$')
+
 _re_parse_skipped = re.compile("^(Skipped[^']*) '(.+)'( --.*)?\n")
 
 _re_parse_summarize = re.compile("^([MAD ][M ])      (.+)\n")
@@ -254,8 +259,11 @@ class State:
 
     base = to_relpath(os.path.normpath(self.wc_dir))
 
+    # TODO: We should probably normalize the paths in moved_from and moved_to.
+
     desc = dict([(repos_join(base, path), item)
                  for path, item in self.desc.items()])
+
     return State('', desc)
 
   def compare(self, other):
@@ -362,6 +370,8 @@ class State:
           item.writelocked = 'K'
         elif item.writelocked == 'O':
           item.writelocked = None
+      item.moved_from = None
+      item.moved_to = None
 
   def old_tree(self):
     "Return an old-style tree (for compatibility purposes)."
@@ -397,7 +407,7 @@ class State:
     return not self.__eq__(other)
 
   @classmethod
-  def from_status(cls, lines):
+  def from_status(cls, lines, wc_dir_name=None):
     """Create a State object from 'svn status' output."""
 
     def not_space(value):
@@ -406,6 +416,7 @@ class State:
       return None
 
     desc = { }
+    last = None
     for line in lines:
       if line.startswith('DBG:'):
         continue
@@ -418,6 +429,25 @@ class State:
 
       match = _re_parse_status.search(line)
       if not match or match.group(10) == '-':
+
+        ex_match = _re_parse_status_ex.search(line)
+
+        if ex_match:
+          if ex_match.group('moved_from'):
+            path = ex_match.group('moved_from')
+            if wc_dir_name and path.startswith(wc_dir_name + os.path.sep):
+              path = path[len(wc_dir_name) + 1:]
+            
+            last.tweak(moved_from = to_relpath(path))
+          elif ex_match.group('moved_to'):
+            path = ex_match.group('moved_to')
+            if wc_dir_name and path.startswith(wc_dir_name + os.path.sep):
+              path = path[len(wc_dir_name) + 1:]
+            
+            last.tweak(moved_to = to_relpath(path))
+
+          # Parse TC description?
+
         # ignore non-matching lines, or items that only exist on repos
         continue
 
@@ -430,6 +460,7 @@ class State:
                        wc_rev=not_space(match.group('wc_rev')),
                        )
       desc[to_relpath(match.group('path'))] = item
+      last = item
 
     return cls('', desc)
 
@@ -647,7 +678,7 @@ class StateItem:
                status=None, verb=None, wc_rev=None,
                entry_rev=None, entry_status=None,
                locked=None, copied=None, switched=None, writelocked=None,
-               treeconflict=None):
+               treeconflict=None, moved_from=None, moved_to=None):
     # provide an empty prop dict if it wasn't provided
     if props is None:
       props = { }
@@ -680,6 +711,9 @@ class StateItem:
     self.writelocked = writelocked
     # Value 'C' or ' ', or None as an expected status meaning 'do not check'.
     self.treeconflict = treeconflict
+    # Relative paths to the move locations
+    self.moved_from = moved_from
+    self.moved_to = moved_to
 
   def copy(self):
     "Make a deep copy of self."
@@ -731,6 +765,10 @@ class StateItem:
       atts['writelocked'] = self.writelocked
     if self.treeconflict is not None:
       atts['treeconflict'] = self.treeconflict
+    if self.moved_from is not None:
+      atts['moved_from'] = self.moved_from
+    if self.moved_to is not None:
+      atts['moved_to'] = self.moved_to
 
     return (os.path.normpath(path), self.contents, self.props, atts)
 

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/update_tests.py?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/update_tests.py Sat Jan 12 20:24:12 2013
@@ -1731,6 +1731,8 @@ def conflict_markers_matching_eol(sbox):
 
   mu_path = sbox.ospath('A/mu')
 
+  # CRLF is a string that will match a CRLF sequence read from a text file.
+  # ### On Windows, we assume CRLF will be read as LF, so it's a poor test.
   if os.name == 'nt':
     crlf = '\n'
   else:
@@ -1862,6 +1864,8 @@ def update_eolstyle_handling(sbox):
 
   mu_path = sbox.ospath('A/mu')
 
+  # CRLF is a string that will match a CRLF sequence read from a text file.
+  # ### On Windows, we assume CRLF will be read as LF, so it's a poor test.
   if os.name == 'nt':
     crlf = '\n'
   else:
@@ -5574,11 +5578,12 @@ def update_moved_dir_dir_add(sbox):
   })
   expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
   expected_status.tweak('A/B/E', 'A/B/E/alpha', 'A/B/E/beta', status='D ')
-  expected_status.tweak('A/B/E', treeconflict='C')
+  expected_status.tweak('A/B/E', treeconflict='C', moved_to='A/B/E2')
   expected_status.add({
     'A/B/E/foo'         : Item(status='D ', wc_rev='2'),
     'A/B/E/foo/bar'     : Item(status='D ', wc_rev='2'),
-    'A/B/E2'            : Item(status='A ', copied='+', wc_rev='-'),
+    'A/B/E2'            : Item(status='A ', copied='+', wc_rev='-',
+                               moved_from='A/B/E'),
     'A/B/E2/beta'       : Item(status='  ', copied='+', wc_rev='-'),
     'A/B/E2/alpha'      : Item(status='  ', copied='+', wc_rev='-'),
   })
@@ -5629,11 +5634,13 @@ def update_moved_dir_file_move(sbox):
   })
   expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
   expected_status.remove('A/B/E/alpha')
-  expected_status.tweak('A/B/E', status='D ', treeconflict='C')
+  expected_status.tweak('A/B/E', status='D ', treeconflict='C',
+                        moved_to='A/B/E2')
   expected_status.tweak('A/B/E/beta', status='D ')
   expected_status.add({
     'A/B/F/alpha'       : Item(status='  ', wc_rev='2'),
-    'A/B/E2'            : Item(status='A ', copied='+', wc_rev='-'),
+    'A/B/E2'            : Item(status='A ', copied='+', wc_rev='-',
+                               moved_from='A/B/E'),
     'A/B/E2/alpha'      : Item(status='  ', copied='+', wc_rev='-'),
     'A/B/E2/beta'       : Item(status='  ', copied='+', wc_rev='-'),
   })
@@ -5810,6 +5817,87 @@ def update_with_parents_and_exclude(sbox
                                         '--parents',
                                         sbox.ospath('A/B'))
 
+@Issue(4288)
+def update_edit_delete_obstruction(sbox):
+  "obstructions shouldn't cause update failures"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # r2
+  sbox.simple_rm('A/B','iota')
+  svntest.main.file_append(sbox.ospath('A/mu'), "File change")
+  sbox.simple_propset('key', 'value', 'A/D', 'A/D/G')
+  sbox.simple_commit()
+
+  # r3
+  #sbox.simple_mkdir('iota')
+  #sbox.simple_copy('A/D/gamma', 'A/B')
+  #sbox.simple_commit()
+
+  sbox.simple_update('', 1)
+
+  # Create obstructions
+  svntest.main.safe_rmtree(sbox.ospath('A/B'))
+  svntest.main.file_append(sbox.ospath('A/B'), "Obstruction")
+
+  svntest.main.safe_rmtree(sbox.ospath('A/D'))
+  svntest.main.file_append(sbox.ospath('A/D'), "Obstruction")
+
+  os.remove(sbox.ospath('iota'))
+  os.mkdir(sbox.ospath('iota'))
+
+  os.remove(sbox.ospath('A/mu'))
+  os.mkdir(sbox.ospath('A/mu'))
+
+  expected_status = svntest.wc.State(wc_dir, {
+    ''                  : Item(status='  ', wc_rev='2'),
+    'A'                 : Item(status='  ', wc_rev='2'),
+    'A/mu'              : Item(status='~ ', treeconflict='C', wc_rev='2'),
+    'A/D'               : Item(status='~ ', treeconflict='C', wc_rev='2'),
+    'A/D/G'             : Item(status='! ', wc_rev='2'),
+    'A/D/G/pi'          : Item(status='! ', wc_rev='2'),
+    'A/D/G/tau'         : Item(status='! ', wc_rev='2'),
+    'A/D/G/rho'         : Item(status='! ', wc_rev='2'),
+    'A/D/H'             : Item(status='! ', wc_rev='2'),
+    'A/D/H/omega'       : Item(status='! ', wc_rev='2'),
+    'A/D/H/chi'         : Item(status='! ', wc_rev='2'),
+    'A/D/H/psi'         : Item(status='! ', wc_rev='2'),
+    'A/D/gamma'         : Item(status='! ', wc_rev='2'),
+    'A/C'               : Item(status='  ', wc_rev='2'),
+    'A/B'               : Item(status='~ ', treeconflict='C', wc_rev='-'),
+    'A/B/F'             : Item(status='! ', wc_rev='-'),
+    'A/B/E'             : Item(status='! ', wc_rev='-'),
+    'A/B/E/beta'        : Item(status='! ', wc_rev='-'),
+    'A/B/E/alpha'       : Item(status='! ', wc_rev='-'),
+    'A/B/lambda'        : Item(status='! ', wc_rev='-'),
+    'iota'              : Item(status='~ ', treeconflict='C', wc_rev='-'),
+  })
+  expected_disk = svntest.wc.State('', {
+    'A/D'               : Item(contents="Obstruction", props={'key':'value'}),
+    'A/C'               : Item(),
+    'A/B'               : Item(contents="Obstruction"),
+    'A/mu'              : Item(),
+    'iota'              : Item(),
+  })
+
+  expected_output = svntest.wc.State(wc_dir, {
+    'iota'    : Item(status='  ', treeconflict='C'),
+    'A/mu'    : Item(status='  ', treeconflict='C'),
+    'A/D'     : Item(status='  ', treeconflict='C'),
+    'A/D/G'   : Item(status='  ', treeconflict='U'),
+    'A/B'     : Item(status='  ', treeconflict='C'),
+  })
+
+  # And now update to delete B and iota
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        expected_output,
+                                        expected_disk,
+                                        expected_status,
+                                        None, None, None,
+                                        None, None, 1,
+                                        '-r', '2', wc_dir)
+
 
 #######################################################################
 # Run the tests
@@ -5885,6 +5973,7 @@ test_list = [ None,
               update_move_text_mod,
               update_nested_move_text_mod,
               update_with_parents_and_exclude,
+              update_edit_delete_obstruction,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/wc_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/wc_tests.py?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/wc_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/wc_tests.py Sat Jan 12 20:24:12 2013
@@ -191,6 +191,15 @@ def status_with_missing_wc_db_and_maybe_
     "st", sbox.wc_dir)
 
 
+@Issue(4267)
+def cleanup_below_wc_root(sbox):
+  """cleanup from directory below WC root"""
+
+  sbox.build(read_only = True)
+  svntest.actions.lock_admin_dir(sbox.ospath(""), True)
+  svntest.actions.run_and_verify_svn("Cleanup below wc root", None, [],
+                                     "cleanup", sbox.ospath("A"))
+
 ########################################################################
 # Run the tests
 
@@ -208,6 +217,7 @@ test_list = [ None,
               status_without_wc_db,
               status_without_wc_db_and_entries,
               status_with_missing_wc_db_and_maybe_valid_entries,
+              cleanup_below_wc_root,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ev2-export/subversion/tests/libsvn_subr/mergeinfo-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/libsvn_subr/mergeinfo-test.c?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/libsvn_subr/mergeinfo-test.c (original)
+++ subversion/branches/ev2-export/subversion/tests/libsvn_subr/mergeinfo-test.c Sat Jan 12 20:24:12 2013
@@ -1117,7 +1117,7 @@ test_rangelist_to_string(apr_pool_t *poo
 
   SVN_ERR(svn_rangelist_to_string(&output, result, pool));
 
-  if (svn_string_compare(expected, output) != TRUE)
+  if (!svn_string_compare(expected, output))
     return fail(pool, "Rangelist string not what we expected");
 
   return SVN_NO_ERROR;
@@ -1134,7 +1134,7 @@ test_mergeinfo_to_string(apr_pool_t *poo
 
   SVN_ERR(svn_mergeinfo_to_string(&output, info1, pool));
 
-  if (svn_string_compare(expected, output) != TRUE)
+  if (!svn_string_compare(expected, output))
     return fail(pool, "Mergeinfo string not what we expected");
 
   /* Manually construct some mergeinfo with relative path
@@ -1150,7 +1150,7 @@ test_mergeinfo_to_string(apr_pool_t *poo
                apr_hash_get(info1, "/trunk", APR_HASH_KEY_STRING));
   SVN_ERR(svn_mergeinfo_to_string(&output, info2, pool));
 
-  if (svn_string_compare(expected, output) != TRUE)
+  if (!svn_string_compare(expected, output))
     return fail(pool, "Mergeinfo string not what we expected");
 
   return SVN_NO_ERROR;

Modified: subversion/branches/ev2-export/subversion/tests/libsvn_subr/stream-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/libsvn_subr/stream-test.c?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/libsvn_subr/stream-test.c (original)
+++ subversion/branches/ev2-export/subversion/tests/libsvn_subr/stream-test.c Sat Jan 12 20:24:12 2013
@@ -490,7 +490,7 @@ test_readonly(apr_pool_t *pool)
   /* File should be writable */
   SVN_ERR(svn_io_stat(&finfo, path, wanted, pool));
   SVN_ERR(svn_io__is_finfo_read_only(&read_only, &finfo, pool));
-  SVN_TEST_ASSERT(read_only == FALSE);
+  SVN_TEST_ASSERT(!read_only);
 
   /* Set read only */
   SVN_ERR(svn_io_set_file_read_only(path, FALSE, pool));
@@ -506,7 +506,7 @@ test_readonly(apr_pool_t *pool)
   /* File should be writable */
   SVN_ERR(svn_io_stat(&finfo, path, wanted, pool));
   SVN_ERR(svn_io__is_finfo_read_only(&read_only, &finfo, pool));
-  SVN_TEST_ASSERT(read_only == FALSE);
+  SVN_TEST_ASSERT(!read_only);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/ev2-export/subversion/tests/libsvn_subr/string-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/libsvn_subr/string-test.c?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/libsvn_subr/string-test.c (original)
+++ subversion/branches/ev2-export/subversion/tests/libsvn_subr/string-test.c Sat Jan 12 20:24:12 2013
@@ -479,7 +479,7 @@ test21(apr_pool_t *pool)
 
   svn_stringbuf_strip_whitespace(a);
 
-  if (svn_stringbuf_compare(a, b) == TRUE)
+  if (svn_stringbuf_compare(a, b))
     return SVN_NO_ERROR;
   else
     return fail(pool, "test failed");

Modified: subversion/branches/ev2-export/subversion/tests/libsvn_subr/subst_translate-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/libsvn_subr/subst_translate-test.c?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/libsvn_subr/subst_translate-test.c (original)
+++ subversion/branches/ev2-export/subversion/tests/libsvn_subr/subst_translate-test.c Sat Jan 12 20:24:12 2013
@@ -123,8 +123,8 @@ test_svn_subst_translate_string2_null_en
                                         source_string, NULL, FALSE,
                                         pool, pool));
     SVN_TEST_STRING_ASSERT(new_value->data, "\xc3\x86");
-    SVN_TEST_ASSERT(translated_to_utf8 == TRUE);
-    SVN_TEST_ASSERT(translated_line_endings == FALSE);
+    SVN_TEST_ASSERT(translated_to_utf8);
+    SVN_TEST_ASSERT(!translated_line_endings);
   }
 
   return SVN_NO_ERROR;

Modified: subversion/branches/ev2-export/subversion/tests/libsvn_wc/db-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/libsvn_wc/db-test.c?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/libsvn_wc/db-test.c (original)
+++ subversion/branches/ev2-export/subversion/tests/libsvn_wc/db-test.c Sat Jan 12 20:24:12 2013
@@ -421,7 +421,7 @@ test_getting_info(apr_pool_t *pool)
   SVN_TEST_ASSERT(checksum == NULL);
   SVN_TEST_ASSERT(target == NULL);
   SVN_TEST_ASSERT(lock == NULL);
-  SVN_TEST_ASSERT(had_props == FALSE);
+  SVN_TEST_ASSERT(!had_props);
   SVN_TEST_ASSERT(apr_hash_count(props) == 0);
   /* SVN_TEST_ASSERT(update_root == ???); */
 
@@ -862,12 +862,12 @@ test_working_info(apr_pool_t *pool)
   SVN_TEST_STRING_ASSERT(original_root_url, ROOT_TWO);
   SVN_TEST_STRING_ASSERT(original_uuid, UUID_TWO);
   SVN_TEST_ASSERT(original_revnum == 2);
-  SVN_TEST_ASSERT(had_props == FALSE);
-  SVN_TEST_ASSERT(props_mod == FALSE);
-  SVN_TEST_ASSERT(have_base == TRUE);
+  SVN_TEST_ASSERT(!had_props);
+  SVN_TEST_ASSERT(!props_mod);
+  SVN_TEST_ASSERT(have_base);
   /* SVN_TEST_ASSERT(have_more_work...); */
-  SVN_TEST_ASSERT(have_work == TRUE);
-  SVN_TEST_ASSERT(conflicted == FALSE);
+  SVN_TEST_ASSERT(have_work);
+  SVN_TEST_ASSERT(!conflicted);
   SVN_TEST_ASSERT(lock == NULL);
   /* SVN_TEST_ASSERT(last_mod_time...); */
   /* SVN_TEST_ASSERT(op_root...); */

Modified: subversion/branches/ev2-export/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/libsvn_wc/op-depth-test.c?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/ev2-export/subversion/tests/libsvn_wc/op-depth-test.c Sat Jan 12 20:24:12 2013
@@ -45,6 +45,7 @@
 #include "../../libsvn_wc/wc.h"
 #include "../../libsvn_wc/wc_db.h"
 #include "../../libsvn_wc/workqueue.h"
+#include "../../libsvn_wc/conflicts.h"
 #define SVN_WC__I_AM_WC_DB
 #include "../../libsvn_wc/wc_db_private.h"
 
@@ -5164,6 +5165,10 @@ nested_move_update(const svn_test_opts_t
   sbox_file_write(&b, "A/B/C/f", "r1 content\nr2 content\n");
   SVN_ERR(sbox_wc_commit(&b, ""));
 
+  /* r3: Create 'X' */
+  SVN_ERR(sbox_wc_mkdir(&b, "X"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+
   SVN_ERR(sbox_wc_update(&b, "", 1));
 
   SVN_ERR(sbox_wc_move(&b, "A", "A2"));
@@ -5222,6 +5227,31 @@ nested_move_update(const svn_test_opts_t
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
 
+  /* Update A to r3 brings no changes but updates the revisions. */
+  SVN_ERR(sbox_wc_update(&b, "A", 3));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",          "normal",       2, ""},
+      {0, "A",         "normal",       3, "A"},
+      {0, "A/B",       "normal",       3, "A/B"},
+      {0, "A/B/C",     "normal",       3, "A/B/C"},
+      {0, "A/B/C/f",   "normal",       3, "A/B/C/f"},
+      {1, "A",         "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",       "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C",     "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C/f",   "base-deleted", NO_COPY_FROM},
+      {1, "A2",        "normal",       3, "A", MOVED_HERE},
+      {1, "A2/B",      "normal",       3, "A/B", MOVED_HERE},
+      {1, "A2/B/C",    "normal",       3, "A/B/C", MOVED_HERE},
+      {1, "A2/B/C/f",  "normal",       3, "A/B/C/f", MOVED_HERE},
+      {3, "A2/B/C",    "base-deleted", NO_COPY_FROM, "A2/B/C2"},
+      {3, "A2/B/C/f",  "base-deleted", NO_COPY_FROM},
+      {3, "A2/B/C2",   "normal",       3, "A/B/C", MOVED_HERE},
+      {3, "A2/B/C2/f", "normal",       3, "A/B/C/f", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
 
   return SVN_NO_ERROR;
 }
@@ -5390,6 +5420,204 @@ nested_move_commit(const svn_test_opts_t
                                  expected_from, moved_from);
   }
 
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+nested_move_update2(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "nested_move_update2", opts, pool));
+
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "P"));
+  SVN_ERR(sbox_wc_mkdir(&b, "P/Q"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_mkdir(&b, "X"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_move(&b, "A", "A2"));
+  SVN_ERR(sbox_wc_move(&b, "P", "A"));
+  SVN_ERR(sbox_wc_move(&b, "A2", "P"));
+  SVN_ERR(sbox_wc_move(&b, "A/Q", "A/Q2"));
+  SVN_ERR(sbox_wc_move(&b, "P/B", "P/B2"));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",          "normal",       1, ""},
+      {0, "A",         "normal",       1, "A"},
+      {0, "A/B",       "normal",       1, "A/B"},
+      {0, "P",         "normal",       1, "P"},
+      {0, "P/Q",       "normal",       1, "P/Q"},
+      {1, "A",         "normal",       1, "P", FALSE, "P", TRUE},
+      {1, "A/B",       "base-deleted", NO_COPY_FROM},
+      {1, "A/Q",       "normal",       1, "P/Q", MOVED_HERE},
+      {1, "P",         "normal",       1, "A", FALSE, "A", TRUE},
+      {1, "P/Q",       "base-deleted", NO_COPY_FROM},
+      {1, "P/B",       "normal",       1, "A/B", MOVED_HERE},
+      {2, "A/Q",       "base-deleted", NO_COPY_FROM, "A/Q2"},
+      {2, "A/Q2",      "normal",       1, "P/Q", MOVED_HERE},
+      {2, "P/B",       "base-deleted", NO_COPY_FROM, "P/B2"},
+      {2, "P/B2",      "normal",       1, "A/B", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Update A bumps revisions but only for moves originating in A.  In
+     particular A/Q to A/Q2 does not get bumped. */
+  SVN_ERR(sbox_wc_update(&b, "A", 2));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",          "normal",       1, ""},
+      {0, "A",         "normal",       2, "A"},
+      {0, "A/B",       "normal",       2, "A/B"},
+      {0, "P",         "normal",       1, "P"},
+      {0, "P/Q",       "normal",       1, "P/Q"},
+      {1, "A",         "normal",       1, "P", FALSE, "P", TRUE},
+      {1, "A/B",       "base-deleted", NO_COPY_FROM},
+      {1, "A/Q",       "normal",       1, "P/Q", MOVED_HERE},
+      {1, "P",         "normal",       2, "A", FALSE, "A", TRUE},
+      {1, "P/Q",       "base-deleted", NO_COPY_FROM},
+      {1, "P/B",       "normal",       2, "A/B", MOVED_HERE},
+      {2, "A/Q",       "base-deleted", NO_COPY_FROM, "A/Q2"},
+      {2, "A/Q2",      "normal",       1, "P/Q", MOVED_HERE},
+      {2, "P/B",       "base-deleted", NO_COPY_FROM, "P/B2"},
+      {2, "P/B2",      "normal",       2, "A/B", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+check_tree_conflict_repos_path(svn_test__sandbox_t *b,
+                               const char *wc_path,
+                               const char *repos_path1,
+                               const char *repos_path2)
+{
+  svn_skel_t *conflict;
+  svn_wc_operation_t operation;
+  const apr_array_header_t *locations;
+  svn_boolean_t text_conflicted, prop_conflicted, tree_conflicted;
+
+  SVN_ERR(svn_wc__db_read_conflict(&conflict, b->wc_ctx->db,
+                                   sbox_wc_path(b, wc_path),
+                                   b->pool, b->pool));
+
+  SVN_ERR(svn_wc__conflict_read_info(&operation, &locations,
+                                     &text_conflicted, &prop_conflicted,
+                                     &tree_conflicted,
+                                     b->wc_ctx->db,  b->wc_abspath,
+                                     conflict, b->pool, b->pool));
+
+  SVN_ERR_ASSERT(tree_conflicted);
+
+  if (repos_path1)
+    {
+      svn_wc_conflict_version_t *version
+        = APR_ARRAY_IDX(locations, 0, svn_wc_conflict_version_t *);
+
+      SVN_ERR_ASSERT(!strcmp(version->path_in_repos, repos_path1));
+    }
+
+  if (repos_path2)
+    {
+      svn_wc_conflict_version_t *version
+        = APR_ARRAY_IDX(locations, 1, svn_wc_conflict_version_t *);
+
+      SVN_ERR_ASSERT(!strcmp(version->path_in_repos, repos_path2));
+    }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_update_conflicts(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "move_update_conflicts", opts, pool));
+
+  SVN_ERR(sbox_wc_mkdir(&b, "X"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/A/B/C"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/A/B/C/D"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/A/B/C/D/E"));
+  SVN_ERR(sbox_wc_mkdir(&b, "X/A/B/F"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_switch(&b, "/X"));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_move(&b, "A", "A2"));
+  SVN_ERR(sbox_wc_move(&b, "A2/B/C", "A2/B/C2"));
+  sbox_file_write(&b, "A2/B/F", "obstruction\n");
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",          "normal",       1, "X"},
+      {0, "A",         "normal",       1, "X/A"},
+      {0, "A/B",       "normal",       1, "X/A/B"},
+      {0, "A/B/C",     "normal",       1, "X/A/B/C"},
+      {0, "A/B/C/D",   "normal",       1, "X/A/B/C/D"},
+      {1, "A",         "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",       "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C",     "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C/D",   "base-deleted", NO_COPY_FROM},
+      {1, "A2",        "normal",       1, "X/A", MOVED_HERE},
+      {1, "A2/B",      "normal",       1, "X/A/B", MOVED_HERE},
+      {1, "A2/B/C",    "normal",       1, "X/A/B/C", MOVED_HERE},
+      {1, "A2/B/C/D",  "normal",       1, "X/A/B/C/D", MOVED_HERE},
+      {3, "A2/B/C",    "base-deleted", NO_COPY_FROM, "A2/B/C2"},
+      {3, "A2/B/C/D",  "base-deleted", NO_COPY_FROM},
+      {3, "A2/B/C2",   "normal",       1, "X/A/B/C", MOVED_HERE},
+      {3, "A2/B/C2/D", "normal",       1, "X/A/B/C/D", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_update(&b, "A", 2));
+  SVN_ERR(check_tree_conflict_repos_path(&b, "A", "X/A", "X/A"));
+  SVN_ERR(sbox_wc_resolve(&b, "A", svn_wc_conflict_choose_mine_conflict));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",           "normal",       1, "X"},
+      {0, "A",          "normal",       2, "X/A"},
+      {0, "A/B",        "normal",       2, "X/A/B"},
+      {0, "A/B/C",      "normal",       2, "X/A/B/C"},
+      {0, "A/B/C/D",    "normal",       2, "X/A/B/C/D"},
+      {0, "A/B/C/D/E",  "normal",       2, "X/A/B/C/D/E"},
+      {0, "A/B/F",      "normal",       2, "X/A/B/F"},
+      {1, "A",          "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",        "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C",      "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C/D",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C/D/E",  "base-deleted", NO_COPY_FROM},
+      {1, "A/B/F",      "base-deleted", NO_COPY_FROM},
+      {1, "A2",         "normal",       2, "X/A", MOVED_HERE},
+      {1, "A2/B",       "normal",       2, "X/A/B", MOVED_HERE},
+      {1, "A2/B/C",     "normal",       2, "X/A/B/C", MOVED_HERE},
+      {1, "A2/B/C/D",   "normal",       2, "X/A/B/C/D", MOVED_HERE},
+      {1, "A2/B/C/D/E", "normal",       2, "X/A/B/C/D/E", MOVED_HERE},
+      {1, "A2/B/F",     "normal",       2, "X/A/B/F", MOVED_HERE},
+      {3, "A2/B/C",     "base-deleted", NO_COPY_FROM, "A2/B/C2"},
+      {3, "A2/B/C/D",   "base-deleted", NO_COPY_FROM},
+      {3, "A2/B/C/D/E", "base-deleted", NO_COPY_FROM},
+      {3, "A2/B/C2",    "normal",       1, "X/A/B/C", MOVED_HERE},
+      {3, "A2/B/C2/D",  "normal",       1, "X/A/B/C/D", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(check_tree_conflict_repos_path(&b, "A2/B/C", "X/A/B/C", "X/A/B/C"));
+  SVN_ERR(check_tree_conflict_repos_path(&b, "A2/B/F", NULL, "X/A/B/F"));
 
   return SVN_NO_ERROR;
 }
@@ -5497,5 +5725,9 @@ struct svn_test_descriptor_t test_funcs[
                        "nested_move_update"),
     SVN_TEST_OPTS_XFAIL(nested_move_commit,
                        "nested_move_commit"),
+    SVN_TEST_OPTS_PASS(nested_move_update2,
+                       "nested_move_update2"),
+    SVN_TEST_OPTS_PASS(move_update_conflicts,
+                       "move_update_conflicts"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/ev2-export/subversion/tests/libsvn_wc/utils.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/libsvn_wc/utils.c?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/libsvn_wc/utils.c (original)
+++ subversion/branches/ev2-export/subversion/tests/libsvn_wc/utils.c Sat Jan 12 20:24:12 2013
@@ -334,6 +334,25 @@ sbox_wc_update(svn_test__sandbox_t *b, c
 }
 
 svn_error_t *
+sbox_wc_switch(svn_test__sandbox_t *b, const char *url)
+{
+  svn_client_ctx_t *ctx;
+  svn_revnum_t result_rev;
+  svn_opt_revision_t head_rev = { svn_opt_revision_head, {0} };
+
+  url = apr_pstrcat(b->pool, b->repos_url, url, (char*)NULL);
+  SVN_ERR(svn_client_create_context2(&ctx, NULL, b->pool));
+  ctx->wc_ctx = b->wc_ctx;
+  return svn_client_switch3(&result_rev, sbox_wc_path(b, ""), url,
+                            &head_rev, &head_rev, svn_depth_infinity,
+                            FALSE /* depth_is_sticky */,
+                            TRUE /* ignore_externals */,
+                            FALSE /* allow_unver_obstructions */,
+                            TRUE /* ignore_ancestry */,
+                            ctx, b->pool);
+}
+
+svn_error_t *
 sbox_wc_resolved(svn_test__sandbox_t *b, const char *path)
 {
   return sbox_wc_resolve(b, path, svn_wc_conflict_choose_merged);

Modified: subversion/branches/ev2-export/subversion/tests/libsvn_wc/utils.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/libsvn_wc/utils.h?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/libsvn_wc/utils.h (original)
+++ subversion/branches/ev2-export/subversion/tests/libsvn_wc/utils.h Sat Jan 12 20:24:12 2013
@@ -130,6 +130,9 @@ sbox_wc_commit_ex(svn_test__sandbox_t *b
 svn_error_t *
 sbox_wc_update(svn_test__sandbox_t *b, const char *path, svn_revnum_t revnum);
 
+svn_error_t *
+sbox_wc_switch(svn_test__sandbox_t *b, const char *url);
+
 /* */
 svn_error_t *
 sbox_wc_resolved(svn_test__sandbox_t *b, const char *path);

Modified: subversion/branches/ev2-export/tools/client-side/svn-bench/svn-bench.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/client-side/svn-bench/svn-bench.c?rev=1432504&r1=1432503&r2=1432504&view=diff
==============================================================================
--- subversion/branches/ev2-export/tools/client-side/svn-bench/svn-bench.c (original)
+++ subversion/branches/ev2-export/tools/client-side/svn-bench/svn-bench.c Sat Jan 12 20:24:12 2013
@@ -798,7 +798,7 @@ sub_main(int argc, const char *argv[], a
     }
 
   /* -N has a different meaning depending on the command */
-  if (descend == FALSE)
+  if (!descend)
     opt_state.depth = svn_depth_files;
 
   err = svn_config_get_config(&(ctx->config),

Propchange: subversion/branches/ev2-export/tools/dev/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sat Jan 12 20:24:12 2013
@@ -1 +1,4 @@
+.libs
+fsfs-access-map
+fsfs-reorg
 logdata.py