You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2011/01/20 23:26:46 UTC

svn commit: r1061547 - in /subversion/branches/uris-as-urls: ./ build/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_repos/ subversion/libsvn_wc/ subversion/tests/ subversion/tests/cmdline/ subversion/tests...

Author: cmpilato
Date: Thu Jan 20 22:26:45 2011
New Revision: 1061547

URL: http://svn.apache.org/viewvc?rev=1061547&view=rev
Log:
Syncronize the 'uris-as-urls' branch with trunk changes.
(Merged /subversion/trunk:r1060426-1061546)

Added:
    subversion/branches/uris-as-urls/subversion/libsvn_wc/wc_db_pristine.c
      - copied unchanged from r1061546, subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c
Modified:
    subversion/branches/uris-as-urls/   (props changed)
    subversion/branches/uris-as-urls/build/run_tests.py
    subversion/branches/uris-as-urls/subversion/include/private/svn_repos_private.h
    subversion/branches/uris-as-urls/subversion/include/svn_repos.h
    subversion/branches/uris-as-urls/subversion/libsvn_client/copy.c
    subversion/branches/uris-as-urls/subversion/libsvn_repos/authz.c
    subversion/branches/uris-as-urls/subversion/libsvn_repos/hooks.c
    subversion/branches/uris-as-urls/subversion/libsvn_repos/repos.c
    subversion/branches/uris-as-urls/subversion/libsvn_wc/wc_db.c
    subversion/branches/uris-as-urls/subversion/tests/cmdline/merge_tests.py
    subversion/branches/uris-as-urls/subversion/tests/cmdline/svntest/main.py
    subversion/branches/uris-as-urls/subversion/tests/svn_test_main.c
    subversion/branches/uris-as-urls/win-tests.py

Propchange: subversion/branches/uris-as-urls/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jan 20 22:26:45 2011
@@ -40,3 +40,4 @@
 /subversion/branches/tc_url_rev:874351-874483
 /subversion/branches/tree-conflicts:868291-873154
 /subversion/branches/tree-conflicts-notify:873926-874008
+/subversion/trunk:1060426-1061546

Modified: subversion/branches/uris-as-urls/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/build/run_tests.py?rev=1061547&r1=1061546&r2=1061547&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/build/run_tests.py (original)
+++ subversion/branches/uris-as-urls/build/run_tests.py Thu Jan 20 22:26:45 2011
@@ -153,14 +153,21 @@ class TestHarness:
 
     passed = [x for x in log_lines if x[:6] == 'PASS: ']
 
-    skipped = [x for x in log_lines if x[:6] == 'SKIP: ']
-    if skipped:
+    if self.list_tests:
+      skipped = [x for x in log_lines if x[9:13] == 'SKIP']
+    else:
+      skipped = [x for x in log_lines if x[:6] == 'SKIP: ']
+
+    if skipped and not self.list_tests:
       print('At least one test was SKIPPED, checking ' + self.logfile)
       for x in skipped:
         sys.stdout.write(x)
 
-    xfailed = [x for x in log_lines if x[:6] == 'XFAIL:']
-    if xfailed:
+    if self.list_tests:
+      xfailed = [x for x in log_lines if x[9:14] == 'XFAIL']
+    else:
+      xfailed = [x for x in log_lines if x[:6] == 'XFAIL:']
+    if xfailed and not self.list_tests:
       print('At least one test XFAILED, checking ' + self.logfile)
       for x in xfailed:
         printxfail(x)
@@ -178,21 +185,36 @@ class TestHarness:
         sys.stdout.write(x)
 
     # Print summaries, from least interesting to most interesting.
-    print('Summary of test results:')
+    if self.list_tests:
+      print('Summary of test listing:')
+    else:
+      print('Summary of test results:')
     if passed:
       print('  %d test%s PASSED'
             % (len(passed), 's'*min(len(passed) - 1, 1)))
     if skipped:
-      print('  %d test%s SKIPPED'
-            % (len(skipped), 's'*min(len(skipped) - 1, 1)))
+      if self.list_tests:
+        print('  %d test%s are set as SKIP'
+              % (len(skipped), 's'*min(len(skipped) - 1, 1)))
+      else:
+        print('  %d test%s SKIPPED'
+              % (len(skipped), 's'*min(len(skipped) - 1, 1)))
     if xfailed:
       passwimp = [x for x in xfailed if 0 <= x.find(wimptag)]
       if passwimp:
-        print('  %d test%s XFAILED (%d WORK-IN-PROGRESS)'
-              % (len(xfailed), 's'*min(len(xfailed) - 1, 1), len(passwimp)))
+        if self.list_tests:
+          print('  %d test%s are set to XFAIL (%d WORK-IN-PROGRESS)'
+                % (len(xfailed), 's'*min(len(xfailed) - 1, 1), len(passwimp)))
+        else:
+          print('  %d test%s XFAILED (%d WORK-IN-PROGRESS)'
+                % (len(xfailed), 's'*min(len(xfailed) - 1, 1), len(passwimp)))
       else:
-        print('  %d test%s XFAILED'
-              % (len(xfailed), 's'*min(len(xfailed) - 1, 1)))
+        if self.list_tests:
+          print('  %d test%s are set as XFAIL'
+                % (len(xfailed), 's'*min(len(xfailed) - 1, 1)))
+        else:
+          print('  %d test%s XFAILED'
+                % (len(xfailed), 's'*min(len(xfailed) - 1, 1)))
     if xpassed:
       failwimp = [x for x in xpassed if 0 <= x.find(wimptag)]
       if failwimp:
@@ -245,8 +267,9 @@ class TestHarness:
     'Run a c test, escaping parameters as required.'
     progdir, progbase = os.path.split(prog)
 
-    sys.stdout.write('.' * dot_count)
-    sys.stdout.flush()
+    if not self.list_tests:
+      sys.stdout.write('.' * dot_count)
+      sys.stdout.flush()
 
     if os.access(progbase, os.X_OK):
       progname = './' + progbase
@@ -265,18 +288,10 @@ class TestHarness:
       cmdline.append('--cleanup')
     if self.fs_type is not None:
       cmdline.append('--fs-type=' + self.fs_type)
-    if self.http_library is not None:
-      cmdline.append('--http-library=' + self.http_library)
     if self.server_minor_version is not None:
       cmdline.append('--server-minor-version=' + self.server_minor_version)
     if self.list_tests is not None:
       cmdline.append('--list')
-    if self.svn_bin is not None:
-      cmdline.append('--bin=' + self.svn_bin)
-    if self.fsfs_sharding is not None:
-      cmdline.append('--fsfs-sharding=%d' % self.fsfs_sharding)
-    if self.fsfs_packing is not None:
-      cmdline.append('--fsfs-packing')
 
     if test_nums:
       test_nums = test_nums.split(',')
@@ -356,10 +371,16 @@ class TestHarness:
 
     # run the tests
     svntest.testcase.TextColors.disable()
+
+    if self.list_tests:
+      prog_f = None
+    else:
+      prog_f = progress_func
+
     failed = svntest.main.execute_tests(prog_mod.test_list,
                                         serial_only=serial_only,
                                         test_name=progbase,
-                                        progress_func=progress_func)
+                                        progress_func=prog_f)
 
     # restore some values
     sys.path = old_path
@@ -389,13 +410,20 @@ class TestHarness:
     if self.log:
       # Using write here because we don't want even a trailing space
       test_info = '%s [%d/%d]' % (progbase, test_nr + 1, total_tests)
-      sys.stdout.write('Running tests in %s' % (test_info, ))
+      if self.list_tests:
+        sys.stdout.write('Listing tests in %s' % (test_info, ))
+      else:
+        sys.stdout.write('Running tests in %s' % (test_info, ))
       sys.stdout.flush()
     else:
       # ### Hack for --log-to-stdout to work (but not print any dots).
       test_info = ''
 
-    log.write('START: %s\n' % progbase)
+    if self.list_tests:
+      log.write('LISTING: %s\n' % progbase)
+    else:
+      log.write('START: %s\n' % progbase)
+
     log.flush()
 
     start_time = datetime.now()
@@ -427,18 +455,24 @@ class TestHarness:
       else:
         log.write('FAIL:  %s: Unknown test failure.\n' % progbase)
 
-    # Log the elapsed time.
-    elapsed_time = str(datetime.now() - start_time)
-    log.write('END: %s\n' % progbase)
-    log.write('ELAPSED: %s %s\n' % (progbase, elapsed_time))
+    if not self.list_tests:
+      # Log the elapsed time.
+      elapsed_time = str(datetime.now() - start_time)
+      log.write('END: %s\n' % progbase)
+      log.write('ELAPSED: %s %s\n' % (progbase, elapsed_time))
+
     log.write('\n')
 
-    # If we printed a "Running all tests in ..." line, add the test result.
+    # If we are only listing the tests just add a newline, otherwise if
+    # we printed a "Running all tests in ..." line, add the test result.
     if self.log:
-      if failed:
-        print(TextColors.FAILURE + 'FAILURE' + TextColors.ENDC)
+      if self.list_tests:
+        print ''
       else:
-        print(TextColors.SUCCESS + 'success' + TextColors.ENDC)
+        if failed:
+          print(TextColors.FAILURE + 'FAILURE' + TextColors.ENDC)
+        else:
+          print(TextColors.SUCCESS + 'success' + TextColors.ENDC)
 
     return failed
 

Modified: subversion/branches/uris-as-urls/subversion/include/private/svn_repos_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/include/private/svn_repos_private.h?rev=1061547&r1=1061546&r2=1061547&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/include/private/svn_repos_private.h (original)
+++ subversion/branches/uris-as-urls/subversion/include/private/svn_repos_private.h Thu Jan 20 22:26:45 2011
@@ -69,6 +69,24 @@ svn_repos__obliterate_path_rev(svn_repos
                                const char *path,
                                apr_pool_t *pool);
 
+/** Return the path to @a repos's pre-obliterate hook, allocated in
+ * @a pool.
+ *
+ * @since New in 1.7.
+ */
+const char *
+svn_repos__pre_obliterate_hook(svn_repos_t *repos,
+                               apr_pool_t *pool);
+
+/** Return the path to @a repos's post-obliterate hook, allocated in
+ * @a pool.
+ *
+ * @since New in 1.7.
+ */
+const char *
+svn_repos__post_obliterate_hook(svn_repos_t *repos,
+                                apr_pool_t *pool);
+
 
 /** Validate that property @a name is valid for use in a Subversion
  * repository; return @c SVN_ERR_REPOS_BAD_ARGS if it isn't.  For some

Modified: subversion/branches/uris-as-urls/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/include/svn_repos.h?rev=1061547&r1=1061546&r2=1061547&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/include/svn_repos.h (original)
+++ subversion/branches/uris-as-urls/subversion/include/svn_repos.h Thu Jan 20 22:26:45 2011
@@ -671,24 +671,6 @@ const char *
 svn_repos_post_revprop_change_hook(svn_repos_t *repos,
                                    apr_pool_t *pool);
 
-/** Return the path to @a repos's pre-obliterate hook, allocated in
- * @a pool.
- *
- * @since New in 1.7.
- */
-const char *
-svn_repos_pre_obliterate_hook(svn_repos_t *repos,
-                              apr_pool_t *pool);
-
-/** Return the path to @a repos's post-obliterate hook, allocated in
- * @a pool.
- *
- * @since New in 1.7.
- */
-const char *
-svn_repos_post_obliterate_hook(svn_repos_t *repos,
-                               apr_pool_t *pool);
-
 
 /** @defgroup svn_repos_lock_hooks Paths to lock hooks
  * @{

Modified: subversion/branches/uris-as-urls/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_client/copy.c?rev=1061547&r1=1061546&r2=1061547&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/uris-as-urls/subversion/libsvn_client/copy.c Thu Jan 20 22:26:45 2011
@@ -340,11 +340,18 @@ do_wc_to_wc_moves_with_locks2(void *bato
                                 scratch_pool);
 
   SVN_ERR(svn_wc_copy3(b->ctx->wc_ctx, b->pair->src_abspath_or_url,
-                       dst_abspath, FALSE /* metadata_only */,
+                       dst_abspath, TRUE /* metadata_only */,
                        b->ctx->cancel_func, b->ctx->cancel_baton,
                        b->ctx->notify_func2, b->ctx->notify_baton2,
                        scratch_pool));
 
+  /* Should we be using a workqueue for this move?  It's not clear.
+     What should happen if the copy above is interrupted?  The user
+     may want to abort the move and a workqueue might interfere with
+     that. */
+  SVN_ERR(svn_io_file_rename(b->pair->src_abspath_or_url, dst_abspath,
+                             scratch_pool));
+
   SVN_ERR(svn_wc_delete4(b->ctx->wc_ctx, b->pair->src_abspath_or_url,
                          FALSE, FALSE,
                          b->ctx->cancel_func, b->ctx->cancel_baton,

Modified: subversion/branches/uris-as-urls/subversion/libsvn_repos/authz.c
URL: http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_repos/authz.c?rev=1061547&r1=1061546&r2=1061547&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/libsvn_repos/authz.c (original)
+++ subversion/branches/uris-as-urls/subversion/libsvn_repos/authz.c Thu Jan 20 22:26:45 2011
@@ -391,8 +391,8 @@ authz_get_tree_access(svn_config_t *cfg,
    any kind of granted access.  Implements the
    svn_config_section_enumerator2_t interface. */
 static svn_boolean_t
-authz_global_parse_section(const char *section_name, void *baton,
-                           apr_pool_t *pool)
+authz_get_any_access_parser_cb(const char *section_name, void *baton,
+                               apr_pool_t *pool)
 {
   struct authz_lookup_baton *b = baton;
 
@@ -422,10 +422,10 @@ authz_global_parse_section(const char *s
  * to any path within the REPOSITORY.  Return TRUE if so.  Use POOL
  * for temporary allocations. */
 static svn_boolean_t
-authz_get_global_access(svn_config_t *cfg, const char *repos_name,
-                        const char *user,
-                        svn_repos_authz_access_t required_access,
-                        apr_pool_t *pool)
+authz_get_any_access(svn_config_t *cfg, const char *repos_name,
+                     const char *user,
+                     svn_repos_authz_access_t required_access,
+                     apr_pool_t *pool)
 {
   struct authz_lookup_baton baton = { 0 };
 
@@ -434,8 +434,13 @@ authz_get_global_access(svn_config_t *cf
   baton.required_access = required_access;
   baton.access = FALSE; /* Deny access by default. */
   baton.repos_path = apr_pstrcat(pool, repos_name, ":/", (char *)NULL);
-
-  svn_config_enumerate_sections2(cfg, authz_global_parse_section,
+  
+  /* We could have used svn_config_enumerate2 for "repos_name:/".
+   * However, this requires access for root explicitly (which the user
+   * may not always have). So we end up enumerating the sections in 
+   * the authz CFG and stop on the first match with some access for 
+   * this user. */
+  svn_config_enumerate_sections2(cfg, authz_get_any_access_parser_cb,
                                  &baton, pool);
 
   /* If walking the configuration was inconclusive, deny access. */
@@ -743,12 +748,12 @@ svn_repos_authz_check_access(svn_authz_t
 {
   const char *current_path = path;
 
-  /* If PATH is NULL, do a global access lookup. */
+  /* If PATH is NULL, check if the user has *any* access. */
   if (!path)
     {
-      *access_granted = authz_get_global_access(authz->cfg, repos_name,
-                                                user, required_access,
-                                                pool);
+      *access_granted = authz_get_any_access(authz->cfg, repos_name,
+                                             user, required_access,
+                                             pool);
       return SVN_NO_ERROR;
     }
 

Modified: subversion/branches/uris-as-urls/subversion/libsvn_repos/hooks.c
URL: http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_repos/hooks.c?rev=1061547&r1=1061546&r2=1061547&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/libsvn_repos/hooks.c (original)
+++ subversion/branches/uris-as-urls/subversion/libsvn_repos/hooks.c Thu Jan 20 22:26:45 2011
@@ -35,6 +35,7 @@
 #include "repos.h"
 #include "svn_private_config.h"
 #include "private/svn_fs_private.h"
+#include "private/svn_repos_private.h"
 
 
 
@@ -592,7 +593,7 @@ svn_repos__hooks_pre_obliterate(svn_repo
                                 const svn_string_t *obliteration_set,
                                 apr_pool_t *pool)
 {
-  const char *hook = svn_repos_pre_obliterate_hook(repos, pool);
+  const char *hook = svn_repos__pre_obliterate_hook(repos, pool);
   svn_boolean_t broken_link;
 
   if ((hook = check_hook_cmd(hook, &broken_link, pool)) && broken_link)

Modified: subversion/branches/uris-as-urls/subversion/libsvn_repos/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_repos/repos.c?rev=1061547&r1=1061546&r2=1061547&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/libsvn_repos/repos.c (original)
+++ subversion/branches/uris-as-urls/subversion/libsvn_repos/repos.c Thu Jan 20 22:26:45 2011
@@ -32,6 +32,7 @@
 #include "svn_fs.h"
 #include "svn_ra.h"  /* for SVN_RA_CAPABILITY_* */
 #include "svn_repos.h"
+#include "private/svn_repos_private.h"
 #include "svn_private_config.h" /* for SVN_TEMPLATE_ROOT_DIR */
 
 #include "repos.h"
@@ -163,7 +164,7 @@ svn_repos_post_revprop_change_hook(svn_r
 
 
 const char *
-svn_repos_pre_obliterate_hook(svn_repos_t *repos, apr_pool_t *pool)
+svn_repos__pre_obliterate_hook(svn_repos_t *repos, apr_pool_t *pool)
 {
   return svn_dirent_join(repos->hook_path, SVN_REPOS__HOOK_PRE_OBLITERATE,
                        pool);
@@ -171,7 +172,7 @@ svn_repos_pre_obliterate_hook(svn_repos_
 
 
 const char *
-svn_repos_post_obliterate_hook(svn_repos_t *repos, apr_pool_t *pool)
+svn_repos__post_obliterate_hook(svn_repos_t *repos, apr_pool_t *pool)
 {
   return svn_dirent_join(repos->hook_path, SVN_REPOS__HOOK_POST_OBLITERATE,
                        pool);
@@ -549,7 +550,7 @@ PREWRITTEN_HOOKS_TEXT
   /* Pre-obliterate hook. */
   {
     this_path = apr_psprintf(pool, "%s%s",
-                             svn_repos_pre_obliterate_hook(repos, pool),
+                             svn_repos__pre_obliterate_hook(repos, pool),
                              SVN_REPOS__HOOK_DESC_EXT);
 
 #define SCRIPT_NAME SVN_REPOS__HOOK_PRE_OBLITERATE
@@ -1042,7 +1043,7 @@ PREWRITTEN_HOOKS_TEXT
   /* Post-obliterate hook. */
   {
     this_path = apr_psprintf(pool, "%s%s",
-                             svn_repos_post_obliterate_hook(repos, pool),
+                             svn_repos__post_obliterate_hook(repos, pool),
                              SVN_REPOS__HOOK_DESC_EXT);
 
 #define SCRIPT_NAME SVN_REPOS__HOOK_POST_OBLITERATE

Modified: subversion/branches/uris-as-urls/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_wc/wc_db.c?rev=1061547&r1=1061546&r2=1061547&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/uris-as-urls/subversion/libsvn_wc/wc_db.c Thu Jan 20 22:26:45 2011
@@ -61,8 +61,6 @@
 #define SDB_FILE  "wc.db"
 #define SDB_FILE_UPGRADE "wc.db.upgrade"
 
-#define PRISTINE_STORAGE_RELPATH "pristine"
-#define PRISTINE_TEMPDIR_RELPATH ""
 #define WCROOT_TEMPDIR_RELPATH   "tmp"
 
 
@@ -421,77 +419,6 @@ static const char *construct_like_arg(co
 
 
 
-/* Returns in PRISTINE_ABSPATH a new string allocated from RESULT_POOL,
-   holding the local absolute path to the file location that is dedicated
-   to hold CHECKSUM's pristine file, relating to the pristine store
-   configured for the working copy indicated by PDH. The returned path
-   does not necessarily currently exist.
-
-   Iff CREATE_SUBDIR is TRUE, then this function will make sure that the
-   parent directory of PRISTINE_ABSPATH exists. This is only useful when
-   about to create a new pristine.
-
-   Any other allocations are made in SCRATCH_POOL. */
-static svn_error_t *
-get_pristine_fname(const char **pristine_abspath,
-                   const char *wcroot_abspath,
-                   const svn_checksum_t *sha1_checksum,
-                   svn_boolean_t create_subdir,
-                   apr_pool_t *result_pool,
-                   apr_pool_t *scratch_pool)
-{
-  const char *base_dir_abspath;
-  const char *hexdigest = svn_checksum_to_cstring(sha1_checksum, scratch_pool);
-  char subdir[3];
-
-  /* ### code is in transition. make sure we have the proper data.  */
-  SVN_ERR_ASSERT(pristine_abspath != NULL);
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(wcroot_abspath));
-  SVN_ERR_ASSERT(sha1_checksum != NULL);
-  SVN_ERR_ASSERT(sha1_checksum->kind == svn_checksum_sha1);
-
-  /* ### need to fix this to use a symbol for ".svn". we don't need
-     ### to use join_many since we know "/" is the separator for
-     ### internal canonical paths */
-  base_dir_abspath = svn_dirent_join_many(scratch_pool,
-                                          wcroot_abspath,
-                                          svn_wc_get_adm_dir(scratch_pool),
-                                          PRISTINE_STORAGE_RELPATH,
-                                          NULL);
-
-  /* We should have a valid checksum and (thus) a valid digest. */
-  SVN_ERR_ASSERT(hexdigest != NULL);
-
-  /* Get the first two characters of the digest, for the subdir. */
-  subdir[0] = hexdigest[0];
-  subdir[1] = hexdigest[1];
-  subdir[2] = '\0';
-
-  if (create_subdir)
-    {
-      const char *subdir_abspath = svn_dirent_join(base_dir_abspath, subdir,
-                                                   scratch_pool);
-      svn_error_t *err;
-
-      err = svn_io_dir_make(subdir_abspath, APR_OS_DEFAULT, scratch_pool);
-
-      /* Whatever error may have occurred... ignore it. Typically, this
-         will be "directory already exists", but if it is something
-         *different*, then presumably another error will follow when we
-         try to access the file within this (missing?) pristine subdir. */
-      svn_error_clear(err);
-    }
-
-  /* The file is located at DIR/.svn/pristine/XX/XXYYZZ... */
-  *pristine_abspath = svn_dirent_join_many(result_pool,
-                                           base_dir_abspath,
-                                           subdir,
-                                           hexdigest,
-                                           NULL);
-  return SVN_NO_ERROR;
-}
-
-
 /* Look up REPOS_ID in SDB and set *REPOS_ROOT_URL and/or *REPOS_UUID to
  * its root URL and UUID respectively.  If REPOS_ID is INVALID_REPOS_ID,
  * use NULL for both URL and UUID.  Either or both output parameters may be
@@ -2217,462 +2144,6 @@ svn_wc__db_base_clear_dav_cache_recursiv
   return SVN_NO_ERROR;
 }
 
-svn_error_t *
-svn_wc__db_pristine_get_path(const char **pristine_abspath,
-                             svn_wc__db_t *db,
-                             const char *wri_abspath,
-                             const svn_checksum_t *sha1_checksum,
-                             apr_pool_t *result_pool,
-                             apr_pool_t *scratch_pool)
-{
-  svn_wc__db_pdh_t *pdh;
-  const char *local_relpath;
-  svn_boolean_t present;
-
-  SVN_ERR_ASSERT(pristine_abspath != NULL);
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(wri_abspath));
-  SVN_ERR_ASSERT(sha1_checksum != NULL);
-  /* ### Transitional: accept MD-5 and look up the SHA-1.  Return an error
-   * if the pristine text is not in the store. */
-  if (sha1_checksum->kind != svn_checksum_sha1)
-    SVN_ERR(svn_wc__db_pristine_get_sha1(&sha1_checksum, db, wri_abspath,
-                                         sha1_checksum,
-                                         scratch_pool, scratch_pool));
-  SVN_ERR_ASSERT(sha1_checksum->kind == svn_checksum_sha1);
-
-  SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath,
-                                             db, wri_abspath,
-                                             svn_sqlite__mode_readonly,
-                                             scratch_pool, scratch_pool));
-  VERIFY_USABLE_PDH(pdh);
-
-  SVN_ERR(svn_wc__db_pristine_check(&present, db, wri_abspath, sha1_checksum,
-                                    scratch_pool));
-  if (! present)
-    return svn_error_createf(SVN_ERR_WC_DB_ERROR, NULL,
-                             _("Pristine text not found"));
-
-  SVN_ERR(get_pristine_fname(pristine_abspath, pdh->wcroot->abspath,
-                             sha1_checksum,
-                             FALSE /* create_subdir */,
-                             result_pool, scratch_pool));
-
-  return SVN_NO_ERROR;
-}
-
-svn_error_t *
-svn_wc__db_pristine_get_future_path(const char **pristine_abspath,
-                                    const char *wcroot_abspath,
-                                    svn_checksum_t *sha1_checksum,
-                                    apr_pool_t *result_pool,
-                                    apr_pool_t *scratch_pool)
-{
-  SVN_ERR(get_pristine_fname(pristine_abspath, wcroot_abspath,
-                             sha1_checksum,
-                             FALSE /* create_subdir */,
-                             result_pool, scratch_pool));
-  return SVN_NO_ERROR;
-}
-
-svn_error_t *
-svn_wc__db_pristine_read(svn_stream_t **contents,
-                         svn_wc__db_t *db,
-                         const char *wri_abspath,
-                         const svn_checksum_t *sha1_checksum,
-                         apr_pool_t *result_pool,
-                         apr_pool_t *scratch_pool)
-{
-  svn_wc__db_pdh_t *pdh;
-  const char *local_relpath;
-  const char *pristine_abspath;
-
-  SVN_ERR_ASSERT(contents != NULL);
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(wri_abspath));
-  SVN_ERR_ASSERT(sha1_checksum != NULL);
-  /* ### Transitional: accept MD-5 and look up the SHA-1.  Return an error
-   * if the pristine text is not in the store. */
-  if (sha1_checksum->kind != svn_checksum_sha1)
-    SVN_ERR(svn_wc__db_pristine_get_sha1(&sha1_checksum, db, wri_abspath,
-                                         sha1_checksum,
-                                         scratch_pool, scratch_pool));
-  SVN_ERR_ASSERT(sha1_checksum->kind == svn_checksum_sha1);
-
-  SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
-                              wri_abspath, svn_sqlite__mode_readonly,
-                              scratch_pool, scratch_pool));
-  VERIFY_USABLE_PDH(pdh);
-
-  /* ### should we look in the PRISTINE table for anything?  */
-
-  SVN_ERR(get_pristine_fname(&pristine_abspath, pdh->wcroot->abspath,
-                             sha1_checksum,
-                             FALSE /* create_subdir */,
-                             scratch_pool, scratch_pool));
-  return svn_error_return(svn_stream_open_readonly(
-                            contents, pristine_abspath,
-                            result_pool, scratch_pool));
-}
-
-
-svn_error_t *
-svn_wc__db_pristine_get_tempdir(const char **temp_dir_abspath,
-                                svn_wc__db_t *db,
-                                const char *wri_abspath,
-                                apr_pool_t *result_pool,
-                                apr_pool_t *scratch_pool)
-{
-  svn_wc__db_pdh_t *pdh;
-  const char *local_relpath;
-
-  SVN_ERR_ASSERT(temp_dir_abspath != NULL);
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(wri_abspath));
-
-  SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
-                              wri_abspath, svn_sqlite__mode_readonly,
-                              scratch_pool, scratch_pool));
-  VERIFY_USABLE_PDH(pdh);
-
-  *temp_dir_abspath = svn_dirent_join_many(result_pool,
-                                           pdh->wcroot->abspath,
-                                           svn_wc_get_adm_dir(scratch_pool),
-                                           PRISTINE_TEMPDIR_RELPATH,
-                                           NULL);
-  return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
-svn_wc__db_pristine_install(svn_wc__db_t *db,
-                            const char *tempfile_abspath,
-                            const svn_checksum_t *sha1_checksum,
-                            const svn_checksum_t *md5_checksum,
-                            apr_pool_t *scratch_pool)
-{
-  svn_wc__db_pdh_t *pdh;
-  const char *local_relpath;
-  const char *wri_abspath;
-  const char *pristine_abspath;
-  apr_finfo_t finfo;
-  svn_sqlite__stmt_t *stmt;
-  svn_node_kind_t kind;
-
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(tempfile_abspath));
-  SVN_ERR_ASSERT(sha1_checksum != NULL);
-  SVN_ERR_ASSERT(sha1_checksum->kind == svn_checksum_sha1);
-  SVN_ERR_ASSERT(md5_checksum != NULL);
-  SVN_ERR_ASSERT(md5_checksum->kind == svn_checksum_md5);
-
-  /* ### this logic assumes that TEMPFILE_ABSPATH follows this pattern:
-     ###   WCROOT_ABSPATH/COMPONENT/TEMPFNAME
-     ### if we change this (see PRISTINE_TEMPDIR_RELPATH), then this
-     ### logic should change.  */
-  wri_abspath = svn_dirent_dirname(svn_dirent_dirname(tempfile_abspath,
-                                                      scratch_pool),
-                                   scratch_pool);
-
-  SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
-                              wri_abspath, svn_sqlite__mode_readonly,
-                              scratch_pool, scratch_pool));
-  VERIFY_USABLE_PDH(pdh);
-
-  SVN_ERR(get_pristine_fname(&pristine_abspath, pdh->wcroot->abspath,
-                             sha1_checksum,
-                             TRUE /* create_subdir */,
-                             scratch_pool, scratch_pool));
-
-
-  SVN_ERR(svn_io_check_path(pristine_abspath, &kind, scratch_pool));
-
-  if (kind == svn_node_file)
-    {
-      /* Remove the tempfile, it's already there */
-      return svn_error_return(
-                  svn_io_remove_file2(tempfile_abspath,
-                                      FALSE, scratch_pool));
-    }
-
-  /* Put the file into its target location.  */
-    SVN_ERR(svn_io_file_rename(tempfile_abspath, pristine_abspath,
-                               scratch_pool));
-
-  SVN_ERR(svn_io_stat(&finfo, pristine_abspath, APR_FINFO_SIZE,
-                      scratch_pool));
-
-  SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                    STMT_INSERT_PRISTINE));
-  SVN_ERR(svn_sqlite__bind_checksum(stmt, 1, sha1_checksum, scratch_pool));
-  SVN_ERR(svn_sqlite__bind_checksum(stmt, 2, md5_checksum, scratch_pool));
-  SVN_ERR(svn_sqlite__bind_int64(stmt, 3, finfo.size));
-  SVN_ERR(svn_sqlite__insert(NULL, stmt));
-
-  return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
-svn_wc__db_pristine_get_md5(const svn_checksum_t **md5_checksum,
-                            svn_wc__db_t *db,
-                            const char *wri_abspath,
-                            const svn_checksum_t *sha1_checksum,
-                            apr_pool_t *result_pool,
-                            apr_pool_t *scratch_pool)
-{
-  svn_wc__db_pdh_t *pdh;
-  const char *local_relpath;
-  svn_sqlite__stmt_t *stmt;
-  svn_boolean_t have_row;
-
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(wri_abspath));
-  SVN_ERR_ASSERT(sha1_checksum != NULL);
-  SVN_ERR_ASSERT(sha1_checksum->kind == svn_checksum_sha1);
-
-  SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
-                              wri_abspath, svn_sqlite__mode_readonly,
-                              scratch_pool, scratch_pool));
-  VERIFY_USABLE_PDH(pdh);
-
-  SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                    STMT_SELECT_PRISTINE_MD5_CHECKSUM));
-  SVN_ERR(svn_sqlite__bind_checksum(stmt, 1, sha1_checksum, scratch_pool));
-  SVN_ERR(svn_sqlite__step(&have_row, stmt));
-  if (!have_row)
-    return svn_error_createf(SVN_ERR_WC_DB_ERROR, svn_sqlite__reset(stmt),
-                             _("The pristine text with checksum '%s' was "
-                               "not found"),
-                             svn_checksum_to_cstring_display(sha1_checksum,
-                                                             scratch_pool));
-
-  SVN_ERR(svn_sqlite__column_checksum(md5_checksum, stmt, 0, result_pool));
-  SVN_ERR_ASSERT((*md5_checksum)->kind == svn_checksum_md5);
-
-  return svn_error_return(svn_sqlite__reset(stmt));
-}
-
-
-svn_error_t *
-svn_wc__db_pristine_get_sha1(const svn_checksum_t **sha1_checksum,
-                             svn_wc__db_t *db,
-                             const char *wri_abspath,
-                             const svn_checksum_t *md5_checksum,
-                             apr_pool_t *result_pool,
-                             apr_pool_t *scratch_pool)
-{
-  svn_wc__db_pdh_t *pdh;
-  const char *local_relpath;
-  svn_sqlite__stmt_t *stmt;
-  svn_boolean_t have_row;
-
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(wri_abspath));
-  SVN_ERR_ASSERT(sha1_checksum != NULL);
-  SVN_ERR_ASSERT(md5_checksum->kind == svn_checksum_md5);
-
-  SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
-                              wri_abspath, svn_sqlite__mode_readonly,
-                              scratch_pool, scratch_pool));
-  VERIFY_USABLE_PDH(pdh);
-
-  SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                    STMT_SELECT_PRISTINE_SHA1_CHECKSUM));
-  SVN_ERR(svn_sqlite__bind_checksum(stmt, 1, md5_checksum, scratch_pool));
-  SVN_ERR(svn_sqlite__step(&have_row, stmt));
-  if (!have_row)
-    return svn_error_createf(SVN_ERR_WC_DB_ERROR, svn_sqlite__reset(stmt),
-                             _("The pristine text with MD5 checksum '%s' was "
-                               "not found"),
-                             svn_checksum_to_cstring_display(md5_checksum,
-                                                             scratch_pool));
-
-  SVN_ERR(svn_sqlite__column_checksum(sha1_checksum, stmt, 0, result_pool));
-  SVN_ERR_ASSERT((*sha1_checksum)->kind == svn_checksum_sha1);
-
-  return svn_error_return(svn_sqlite__reset(stmt));
-}
-
-
-/* If the pristine text referenced by SHA1_CHECKSUM has a reference count
- * of zero, delete it from the pristine store of WCROOT.  Delete both the
- * database row and the file on disk. */
-static svn_error_t *
-pristine_remove_if_unreferenced(svn_wc__db_wcroot_t *wcroot,
-                                const svn_checksum_t *sha1_checksum,
-                                apr_pool_t *scratch_pool)
-{
-  svn_sqlite__stmt_t *stmt;
-  const char *pristine_abspath;
-  int affected_rows;
-
-  /* Remove the DB row, if refcount is 0. */
-  SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                    STMT_DELETE_PRISTINE_IF_UNREFERENCED));
-  SVN_ERR(svn_sqlite__bind_checksum(stmt, 1, sha1_checksum, scratch_pool));
-  SVN_ERR(svn_sqlite__update(&affected_rows, stmt));
-
-  if (affected_rows > 0)
-    {
-      /* Remove the file. */
-      SVN_ERR(get_pristine_fname(&pristine_abspath, wcroot->abspath,
-                                 sha1_checksum, TRUE /* create_subdir */,
-                                 scratch_pool, scratch_pool));
-      SVN_ERR(svn_io_remove_file2(pristine_abspath, TRUE /* ignore_enoent */,
-                                  scratch_pool));
-    }
-
-  return SVN_NO_ERROR;
-}
-
-svn_error_t *
-svn_wc__db_pristine_remove(svn_wc__db_t *db,
-                           const char *wri_abspath,
-                           const svn_checksum_t *sha1_checksum,
-                           apr_pool_t *scratch_pool)
-{
-  svn_wc__db_pdh_t *pdh;
-  const char *local_relpath;
-
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(wri_abspath));
-  SVN_ERR_ASSERT(sha1_checksum != NULL);
-  /* ### Transitional: accept MD-5 and look up the SHA-1.  Return an error
-   * if the pristine text is not in the store. */
-  if (sha1_checksum->kind != svn_checksum_sha1)
-    SVN_ERR(svn_wc__db_pristine_get_sha1(&sha1_checksum, db, wri_abspath,
-                                         sha1_checksum,
-                                         scratch_pool, scratch_pool));
-  SVN_ERR_ASSERT(sha1_checksum->kind == svn_checksum_sha1);
-
-  SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
-                              wri_abspath, svn_sqlite__mode_readwrite,
-                              scratch_pool, scratch_pool));
-  VERIFY_USABLE_PDH(pdh);
-
-  /* If the work queue is not empty, don't delete any pristine text because
-   * the work queue may contain a reference to it. */
-  {
-    svn_sqlite__stmt_t *stmt;
-    svn_boolean_t have_row;
-
-    SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                      STMT_LOOK_FOR_WORK));
-    SVN_ERR(svn_sqlite__step(&have_row, stmt));
-    SVN_ERR(svn_sqlite__reset(stmt));
-
-    if (have_row)
-      return SVN_NO_ERROR;
-  }
-
-  /* If not referenced, remove the PRISTINE table row and the file. */
-  SVN_ERR(pristine_remove_if_unreferenced(pdh->wcroot, sha1_checksum,
-                                          scratch_pool));
-
-  return SVN_NO_ERROR;
-}
-
-
-static svn_error_t *
-pristine_cleanup_wcroot(svn_wc__db_wcroot_t *wcroot,
-                        apr_pool_t *scratch_pool)
-{
-  svn_sqlite__stmt_t *stmt;
-
-  /* Find each unreferenced pristine in the DB and remove it. */
-  SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                    STMT_SELECT_UNREFERENCED_PRISTINES));
-  while (1)
-    {
-      svn_boolean_t have_row;
-      const svn_checksum_t *sha1_checksum;
-
-      SVN_ERR(svn_sqlite__step(&have_row, stmt));
-      if (! have_row)
-        break;
-
-      SVN_ERR(svn_sqlite__column_checksum(&sha1_checksum, stmt, 0,
-                                          scratch_pool));
-      SVN_ERR(pristine_remove_if_unreferenced(wcroot, sha1_checksum,
-                                              scratch_pool));
-    }
-  SVN_ERR(svn_sqlite__reset(stmt));
-
-  return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
-svn_wc__db_pristine_cleanup(svn_wc__db_t *db,
-                            const char *wri_abspath,
-                            apr_pool_t *scratch_pool)
-{
-  svn_wc__db_pdh_t *pdh;
-  const char *local_relpath;
-
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(wri_abspath));
-
-  SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
-                              wri_abspath, svn_sqlite__mode_readonly,
-                              scratch_pool, scratch_pool));
-  VERIFY_USABLE_PDH(pdh);
-
-  SVN_ERR(pristine_cleanup_wcroot(pdh->wcroot, scratch_pool));
-
-  return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
-svn_wc__db_pristine_check(svn_boolean_t *present,
-                          svn_wc__db_t *db,
-                          const char *wri_abspath,
-                          const svn_checksum_t *sha1_checksum,
-                          apr_pool_t *scratch_pool)
-{
-  svn_wc__db_pdh_t *pdh;
-  const char *local_relpath;
-  const char *pristine_abspath;
-  svn_sqlite__stmt_t *stmt;
-  svn_boolean_t have_row;
-  svn_node_kind_t kind_on_disk;
-
-  SVN_ERR_ASSERT(present != NULL);
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(wri_abspath));
-  SVN_ERR_ASSERT(sha1_checksum != NULL);
-  /* ### Transitional: accept MD-5 and look up the SHA-1.  Return an error
-   * if the pristine text is not in the store. */
-  if (sha1_checksum->kind != svn_checksum_sha1)
-    SVN_ERR(svn_wc__db_pristine_get_sha1(&sha1_checksum, db, wri_abspath,
-                                         sha1_checksum,
-                                         scratch_pool, scratch_pool));
-  SVN_ERR_ASSERT(sha1_checksum->kind == svn_checksum_sha1);
-
-  SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
-                              wri_abspath, svn_sqlite__mode_readonly,
-                              scratch_pool, scratch_pool));
-  VERIFY_USABLE_PDH(pdh);
-
-  /* Check that there is an entry in the PRISTINE table. */
-  SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                    STMT_SELECT_PRISTINE_MD5_CHECKSUM));
-  SVN_ERR(svn_sqlite__bind_checksum(stmt, 1, sha1_checksum, scratch_pool));
-  SVN_ERR(svn_sqlite__step(&have_row, stmt));
-  SVN_ERR(svn_sqlite__reset(stmt));
-
-  /* Check that the pristine text file exists. */
-  SVN_ERR(get_pristine_fname(&pristine_abspath, pdh->wcroot->abspath,
-                             sha1_checksum,
-                             FALSE /* create_subdir */,
-                             scratch_pool, scratch_pool));
-  SVN_ERR(svn_io_check_path(pristine_abspath, &kind_on_disk, scratch_pool));
-
-  if (kind_on_disk != (have_row ? svn_node_file : svn_node_none))
-    return svn_error_createf(SVN_ERR_WC_DB_ERROR, svn_sqlite__reset(stmt),
-                             _("The pristine text with checksum '%s' was "
-                               "found in the DB or on disk but not both"),
-                             svn_checksum_to_cstring_display(sha1_checksum,
-                                                             scratch_pool));
-
-  *present = have_row;
-  return SVN_NO_ERROR;
-}
-
-
 /* Helper for svn_wc__db_op_copy to handle copying from one db to
    another */
 static svn_error_t *

Modified: subversion/branches/uris-as-urls/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/tests/cmdline/merge_tests.py?rev=1061547&r1=1061546&r2=1061547&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/uris-as-urls/subversion/tests/cmdline/merge_tests.py Thu Jan 20 22:26:45 2011
@@ -16316,6 +16316,92 @@ def subtree_merges_inherit_invalid_worki
     "Subtree merge under working merge produced the wrong mergeinfo",
     '/A/C/nu:9', [], 'pg', SVN_PROP_MERGEINFO, nu_COPY_path)
 
+
+#----------------------------------------------------------------------
+# Test for issue #3686 'executable flag not correctly set on merge'
+# See http://subversion.tigris.org/issues/show_bug.cgi?id=3686
+def merge_change_to_file_with_executable(sbox):
+  "executable flag is maintained during binary merge"
+
+  # Scenario: When merging a change to a binary file with the 'svn:executable'
+  # property set, the file is not marked as 'executable'. After commit, the 
+  # executable bit is set correctly.
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  trunk_url = sbox.repo_url + '/A/B/E'
+
+  alpha_path = os.path.join(wc_dir, "A", "B", "E", "alpha")
+  beta_path = os.path.join(wc_dir, "A", "B", "E", "beta")
+
+  # Force one of the files to be a binary type
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'propset', 'svn:mime-type',
+                                     'application/octet-stream',
+                                     alpha_path)
+
+  # Set the 'svn:executable' property on both files
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'propset', 'svn:executable', 'ON',
+                                     beta_path)
+
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'propset', 'svn:executable', 'ON',
+                                     alpha_path)
+
+  # Verify the executable bit has been set before committing
+  if not os.access(alpha_path, os.X_OK):
+    raise svntest.Failure("alpha not marked as executable before commit")
+  if not os.access(beta_path, os.X_OK):
+    raise svntest.Failure("beta is not marked as executable before commit")
+
+  # Commit change (r2)
+  sbox.simple_commit()
+
+  # Verify the executable bit has remained after committing
+  if not os.access(alpha_path, os.X_OK):
+    raise svntest.Failure("alpha not marked as executable before commit")
+  if not os.access(beta_path, os.X_OK):
+    raise svntest.Failure("beta is not marked as executable before commit")
+
+  # Create the branch
+  svntest.actions.run_and_verify_svn(None, None, [], 'cp',
+                                     trunk_url,
+                                     sbox.repo_url + '/branch',
+                                     '-m', "Creating the Branch")   
+
+  # Modify the files + commit (r3)
+  svntest.main.file_append(alpha_path, 'appended alpha text')
+  svntest.main.file_append(beta_path, 'appended beta text')
+  sbox.simple_commit()
+
+  # Switch the WC to the branch
+  svntest.actions.run_and_verify_svn(None, None, [], 'switch',
+                                     sbox.repo_url + '/branch',
+                                     wc_dir)
+  
+  # Recalculate the paths
+  alpha_path = os.path.join(wc_dir, "alpha")
+  beta_path = os.path.join(wc_dir, "beta")
+
+  # Merge the changes across
+  svntest.actions.run_and_verify_svn(None, None, [], 'merge',
+                                     trunk_url, wc_dir)
+
+  # Verify the executable bit has been set
+  if not os.access(alpha_path, os.X_OK):
+    raise svntest.Failure("alpha is not marked as executable after merge")
+  if not os.access(beta_path, os.X_OK):
+    raise svntest.Failure("beta is not marked as executable after merge")
+
+  # Commit (r4)
+  sbox.simple_commit()
+
+  # Verify the executable bit has been set
+  if not os.access(alpha_path, os.X_OK):
+    raise svntest.Failure("alpha is not marked as executable after commit")
+  if not os.access(beta_path, os.X_OK):
+    raise svntest.Failure("beta is not marked as executable after commit")
+
 ########################################################################
 # Run the tests
 
@@ -16507,6 +16593,8 @@ test_list = [ None,
               merge_with_os_deleted_subtrees,
               no_self_referential_or_nonexistent_inherited_mergeinfo,
               XFail(subtree_merges_inherit_invalid_working_mergeinfo),
+              XFail(SkipUnless(merge_change_to_file_with_executable,
+              	               svntest.main.is_posix_os)),
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/uris-as-urls/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/tests/cmdline/svntest/main.py?rev=1061547&r1=1061546&r2=1061547&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/uris-as-urls/subversion/tests/cmdline/svntest/main.py Thu Jan 20 22:26:45 2011
@@ -1570,8 +1570,8 @@ def execute_tests(test_list, serial_only
     for testnum in testnums:
       TestRunner(test_list[testnum], testnum).list()
 
-    # done. just exit with success.
-    sys.exit(0)
+    # We are simply listing the tests so always exit with success.
+    return 0
 
   # don't run tests in parallel when the tests don't support it or there
   # are only a few tests to run.

Modified: subversion/branches/uris-as-urls/subversion/tests/svn_test_main.c
URL: http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/tests/svn_test_main.c?rev=1061547&r1=1061546&r2=1061547&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/tests/svn_test_main.c (original)
+++ subversion/branches/uris-as-urls/subversion/tests/svn_test_main.c Thu Jan 20 22:26:45 2011
@@ -78,7 +78,8 @@ enum {
   quiet_opt,
   config_opt,
   server_minor_version_opt,
-  allow_segfault_opt
+  allow_segfault_opt,
+  srcdir_opt
 };
 
 static const apr_getopt_option_t cl_options[] =
@@ -102,6 +103,8 @@ static const apr_getopt_option_t cl_opti
                     N_("print only unexpected results")},
   {"allow-segfaults", allow_segfault_opt, 0,
                     N_("don't trap seg faults (useful for debugging)")},
+  {"srcdir",        srcdir_opt, 1,
+                    N_("source directory")},
   {0,               0, 0, 0}
 };
 

Modified: subversion/branches/uris-as-urls/win-tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/win-tests.py?rev=1061547&r1=1061546&r2=1061547&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/win-tests.py (original)
+++ subversion/branches/uris-as-urls/win-tests.py Thu Jan 20 22:26:45 2011
@@ -87,6 +87,7 @@ def _usage_exit():
   print(" --config-file           : Configuration file for tests")
   print(" --fsfs-sharding         : Specify shard size (for fsfs)")
   print(" --fsfs-packing          : Run 'svnadmin pack' automatically")
+  print(" --log-to-stdout         : Write log results to stdout")
 
   sys.exit(0)
 
@@ -119,7 +120,8 @@ opts, args = my_getopt(sys.argv[1:], 'hr
                         'httpd-server', 'http-library=', 'help',
                         'fsfs-packing', 'fsfs-sharding=', 'javahl',
                         'list', 'enable-sasl', 'bin=', 'parallel',
-                        'config-file=', 'server-minor-version='])
+                        'config-file=', 'server-minor-version=',
+                        'log-to-stdout'])
 if len(args) > 1:
   print('Warning: non-option arguments after the first one will be ignored')
 
@@ -144,6 +146,7 @@ fsfs_sharding = None
 fsfs_packing = None
 server_minor_version = None
 config_file = None
+log_to_stdout = None
 tests_to_run = []
 
 for opt, val in opts:
@@ -200,6 +203,8 @@ for opt, val in opts:
     parallel = 1
   elif opt in ('--config-file'):
     config_file = val
+  elif opt == '--log-to-stdout':
+    log_to_stdout = 1
 
 # Calculate the source and test directory names
 abs_srcdir = os.path.abspath("")
@@ -616,16 +621,19 @@ abs_builddir = fix_case(abs_builddir)
 
 daemon = None
 # Run the tests
-if run_svnserve:
-  daemon = Svnserve(svnserve_args, objdir, abs_objdir, abs_builddir)
 
-if run_httpd:
-  daemon = Httpd(abs_httpd_dir, abs_objdir, abs_builddir, httpd_port,
-                 httpd_service)
-
-# Start service daemon, if any
-if daemon:
-  daemon.start()
+# No need to start any servers if we are only listing the tests.
+if not list_tests:
+  if run_svnserve:
+    daemon = Svnserve(svnserve_args, objdir, abs_objdir, abs_builddir)
+
+  if run_httpd:
+    daemon = Httpd(abs_httpd_dir, abs_objdir, abs_builddir, httpd_port,
+                   httpd_service)
+
+  # Start service daemon, if any
+  if daemon:
+    daemon.start()
 
 # Find the full path and filename of any test that is specified just by
 # its base name.
@@ -653,14 +661,24 @@ else:
   tests_to_run = all_tests
 
 
-print('Testing %s configuration on %s' % (objdir, repo_loc))
+if list_tests:
+  print('Listing %s configuration on %s' % (objdir, repo_loc))
+else:
+  print('Testing %s configuration on %s' % (objdir, repo_loc))
 sys.path.insert(0, os.path.join(abs_srcdir, 'build'))
 
 if not test_javahl:
   import run_tests
+  if log_to_stdout:
+    log_file = None
+    fail_log_file = None
+  else:
+    log_file = os.path.join(abs_builddir, log)
+    fail_log_file = os.path.join(abs_builddir, faillog)
+
   th = run_tests.TestHarness(abs_srcdir, abs_builddir,
-                             os.path.join(abs_builddir, log),
-                             os.path.join(abs_builddir, faillog),
+                             log_file,
+                             fail_log_file,
                              base_url, fs_type, http_library,
                              server_minor_version, not quiet,
                              cleanup, enable_sasl, parallel, config_file,