You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/04/14 08:51:03 UTC

svn commit: r933863 [5/5] - in /subversion/branches/svn-patch-improvements: ./ notes/commit-access-templates/ notes/wc-ng/ subversion/bindings/javahl/native/ subversion/bindings/swig/ruby/svn/ subversion/bindings/swig/ruby/test/ subversion/include/ sub...

Modified: subversion/branches/svn-patch-improvements/subversion/svn/status-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/svn/status-cmd.c?rev=933863&r1=933862&r2=933863&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/svn/status-cmd.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/svn/status-cmd.c Wed Apr 14 06:51:00 2010
@@ -71,7 +71,7 @@ struct status_baton
 struct status_cache
 {
   const char *path;
-  svn_wc_status2_t *status;
+  svn_wc_status3_t *status;
 };
 
 /* Print conflict stats accumulated in status baton SB.
@@ -140,7 +140,7 @@ print_finish_target_xml(svn_revnum_t rep
 static svn_error_t *
 print_status_normal_or_xml(void *baton,
                            const char *path,
-                           const svn_wc_status2_t *status,
+                           const svn_wc_status3_t *status,
                            apr_pool_t *pool)
 {
   struct status_baton *sb = baton;
@@ -163,7 +163,7 @@ print_status_normal_or_xml(void *baton,
 static svn_error_t *
 print_status(void *baton,
              const char *path,
-             const svn_wc_status2_t *status,
+             const svn_wc_status3_t *status,
              apr_pool_t *pool)
 {
   struct status_baton *sb = baton;
@@ -178,7 +178,7 @@ print_status(void *baton,
       const char *cl_key = apr_pstrdup(sb->cl_pool, status->entry->changelist);
       struct status_cache *scache = apr_pcalloc(sb->cl_pool, sizeof(*scache));
       scache->path = apr_pstrdup(sb->cl_pool, path);
-      scache->status = svn_wc_dup_status2(status, sb->cl_pool);
+      scache->status = svn_wc_dup_status3(status, sb->cl_pool);
 
       path_array =
         apr_hash_get(sb->cached_changelists, cl_key, APR_HASH_KEY_STRING);

Modified: subversion/branches/svn-patch-improvements/subversion/svn/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/svn/status.c?rev=933863&r1=933862&r2=933863&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/svn/status.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/svn/status.c Wed Apr 14 06:51:00 2010
@@ -62,7 +62,7 @@ generate_status_code(enum svn_wc_status_
 /* Return the single character representation of the switched column
    status. */
 static char
-generate_switch_column_code(const svn_wc_status2_t *status)
+generate_switch_column_code(const svn_wc_status3_t *status)
 {
   if (status->switched)
     return 'S';
@@ -104,7 +104,7 @@ print_status(const char *path,
              svn_boolean_t detailed,
              svn_boolean_t show_last_committed,
              svn_boolean_t repos_locks,
-             const svn_wc_status2_t *status,
+             const svn_wc_status3_t *status,
              unsigned int *text_conflicts,
              unsigned int *prop_conflicts,
              unsigned int *tree_conflicts,
@@ -249,7 +249,7 @@ print_status(const char *path,
 
 svn_error_t *
 svn_cl__print_status_xml(const char *path,
-                         const svn_wc_status2_t *status,
+                         const svn_wc_status3_t *status,
                          apr_pool_t *pool)
 {
   svn_stringbuf_t *sb = svn_stringbuf_create("", pool);
@@ -369,7 +369,7 @@ svn_cl__print_status_xml(const char *pat
 /* Called by status-cmd.c */
 svn_error_t *
 svn_cl__print_status(const char *path,
-                     const svn_wc_status2_t *status,
+                     const svn_wc_status3_t *status,
                      svn_boolean_t detailed,
                      svn_boolean_t show_last_committed,
                      svn_boolean_t skip_unrecognized,

Modified: subversion/branches/svn-patch-improvements/subversion/svnsync/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/svnsync/main.c?rev=933863&r1=933862&r2=933863&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/svnsync/main.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/svnsync/main.c Wed Apr 14 06:51:00 2010
@@ -1572,6 +1572,7 @@ main(int argc, const char *argv[])
   const char *username = NULL, *source_username = NULL, *sync_username = NULL;
   const char *password = NULL, *source_password = NULL, *sync_password = NULL;
   apr_array_header_t *config_options = NULL;
+  apr_allocator_t *allocator;
 
   if (svn_cmdline_init("svnsync", stderr) != EXIT_SUCCESS)
     {
@@ -1582,7 +1583,16 @@ main(int argc, const char *argv[])
   if (err)
     return svn_cmdline_handle_exit_error(err, NULL, "svnsync: ");
 
-  pool = svn_pool_create(NULL);
+  /* Create our top-level pool.  Use a separate mutexless allocator,
+   * given this application is single threaded.
+   */
+  if (apr_allocator_create(&allocator))
+    return EXIT_FAILURE;
+
+  apr_allocator_max_free_set(allocator, SVN_ALLOCATOR_RECOMMENDED_MAX_FREE);
+
+  pool = svn_pool_create_ex(NULL, allocator);
+  apr_allocator_owner_set(allocator, pool);
 
   err = svn_ra_initialize(pool);
   if (err)

Modified: subversion/branches/svn-patch-improvements/subversion/tests/cmdline/authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/tests/cmdline/authz_tests.py?rev=933863&r1=933862&r2=933863&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/tests/cmdline/authz_tests.py (original)
+++ subversion/branches/svn-patch-improvements/subversion/tests/cmdline/authz_tests.py Wed Apr 14 06:51:00 2010
@@ -903,6 +903,42 @@ def authz_access_required_at_repo_root(s
                        root_url + '/A-copy/B/E/beta',
                        root_url + '/A-copy/C')
 
+def authz_access_required_at_repo_root2(sbox):
+  "more authz issue #3242 - update to renamed file"
+
+  sbox.build(create_wc = False)
+  root_url = sbox.repo_url
+
+  # Now we get all restrictive.
+  write_authz_file(sbox, {'/': '* =',
+                          '/A': 'jrandom = rw'})
+  write_restrictive_svnserve_conf(sbox.repo_dir)
+
+  # Rename a file.
+  svntest.main.run_svn(None, 'mv',
+                       '-m', 'rename file in readable writable space',
+                       root_url + '/A/B/E/alpha',
+                       root_url + '/A/B/E/alpha-renamed')
+  
+  # Check out original greek sub tree below /A/B/E 
+  # and update it to the above rename.
+  wc_dir = sbox.add_wc_path('ABE')
+  os.mkdir(wc_dir)
+  svntest.main.run_svn(None, 'co', '-r', '1', root_url + '/A/B/E', wc_dir)
+  svntest.main.run_svn(None, 'up', wc_dir)
+
+  # Rename a directory.
+  svntest.main.run_svn(None, 'mv',
+                       '-m', 'rename diretory in readable writable space',
+                       root_url + '/A/D/H',
+                       root_url + '/A/D/a g e')
+  
+  # Check out original greek sub tree below /A/D
+  # and update it to the above rename.
+  wc_dir = sbox.add_wc_path('AD')
+  os.mkdir(wc_dir)
+  svntest.main.run_svn(None, 'co', '-r', '1', root_url + '/A/D', wc_dir)
+  svntest.main.run_svn(None, 'up', wc_dir)
 
 def multiple_matches(sbox):
   "multiple lines matching a user"
@@ -962,6 +998,8 @@ test_list = [ None,
                          svntest.main.is_ra_type_file)),
               Skip(authz_access_required_at_repo_root,
                    svntest.main.is_ra_type_file),
+              Skip(authz_access_required_at_repo_root2,
+                   svntest.main.is_ra_type_file),
               Skip(multiple_matches, svntest.main.is_ra_type_file),
              ]
 

Modified: subversion/branches/svn-patch-improvements/subversion/tests/cmdline/depth_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/tests/cmdline/depth_tests.py?rev=933863&r1=933862&r2=933863&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/tests/cmdline/depth_tests.py (original)
+++ subversion/branches/svn-patch-improvements/subversion/tests/cmdline/depth_tests.py Wed Apr 14 06:51:00 2010
@@ -2694,7 +2694,7 @@ test_list = [ None,
               pull_in_tree_with_depth_option,
               fold_tree_with_unversioned_modified_items,
               depth_empty_update_on_file,
-              XFail(excluded_path_update_operation),
+              excluded_path_update_operation,
               excluded_path_misc_operation,
               excluded_receive_remote_removal,
               exclude_keeps_hidden_entries,

Modified: subversion/branches/svn-patch-improvements/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/tests/cmdline/merge_tests.py?rev=933863&r1=933862&r2=933863&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/svn-patch-improvements/subversion/tests/cmdline/merge_tests.py Wed Apr 14 06:51:00 2010
@@ -18803,6 +18803,90 @@ def reintegrate_with_subtree_merges(sbox
                                        None, None, None, None,
                                        None, 1, 1, "--reintegrate")
 
+def foreign_repos_del_and_props(sbox):
+  "merge del and ps variants from a foreign repos"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  wc2_dir = sbox.add_wc_path('wc2')
+  
+  (r2_path, r2_url) = sbox.add_repo_path('fgn');
+  svntest.main.create_repos(r2_path)
+
+  svntest.actions.run_and_verify_svn(None, None, [], 'checkout',
+                                     r2_url, wc2_dir)
+
+  svntest.actions.run_and_verify_svn(None, None, [], 'propset',
+                                      'svn:eol-style', 'native',
+                                      os.path.join(wc_dir, 'iota'))
+
+  svntest.actions.run_and_verify_svn(None, None, [], 'cp',
+                                      os.path.join(wc_dir, 'A/D'),
+                                      os.path.join(wc_dir, 'D'))
+
+  svntest.actions.run_and_verify_svn(None, None, [], 'rm',
+                                      os.path.join(wc_dir, 'A/D'),
+                                      os.path.join(wc_dir, 'D/G'))
+
+  new_file = os.path.join(wc_dir, 'new-file')
+  svntest.main.file_write(new_file, 'new-file')
+  svntest.actions.run_and_verify_svn(None, None, [], 'add', new_file)
+  
+  svntest.actions.run_and_verify_svn(None, None, [], 'propset',
+                                      'svn:eol-style', 'native', new_file)
+
+  svntest.actions.run_and_verify_svn(None, None, [], 'commit', wc_dir,
+                                      '-m', 'changed')
+
+  svntest.actions.run_and_verify_svn(None, None, [], 'merge',
+                                      sbox.repo_url, wc2_dir,
+                                      '-r', '0:1')
+
+  expected_status = svntest.actions.get_virginal_state(wc2_dir, 0)
+  expected_status.tweak(status='A ')
+  expected_status.add(
+     {
+        ''                  : Item(status='  ', wc_rev='0'),
+     })
+  svntest.actions.run_and_verify_status(wc2_dir, expected_status)
+
+  expected_status = svntest.actions.get_virginal_state(wc2_dir, 1)
+
+  svntest.actions.run_and_verify_svn(None, None, [], 'commit', wc2_dir,
+                                     '-m', 'Merged r1')
+
+  svntest.actions.run_and_verify_svn(None, None, [], 'merge',
+                                      sbox.repo_url, wc2_dir,
+                                      '-r', '1:2')
+
+  expected_status.tweak('A/D', 'A/D/G', 'A/D/G/rho', 'A/D/G/tau', 'A/D/G/pi',
+                         'A/D/gamma', 'A/D/H', 'A/D/H/psi', 'A/D/H/omega',
+                         'A/D/H/chi', status='D ')
+  expected_status.tweak(wc_rev='1')
+  expected_status.tweak('', wc_rev='0')
+  expected_status.tweak('iota', status=' M')
+  
+  expected_status.add(
+     {
+        'new-file'          : Item(status='A ', wc_rev='0'),
+        'D'                 : Item(status='A ', wc_rev='0'),
+        'D/H'               : Item(status='A ', wc_rev='0'),
+        'D/H/omega'         : Item(status='A ', wc_rev='0'),
+        'D/H/psi'           : Item(status='A ', wc_rev='0'),
+        'D/H/chi'           : Item(status='A ', wc_rev='0'),
+        'D/gamma'           : Item(status='A ', wc_rev='0'),
+     })
+  
+  svntest.actions.run_and_verify_status(wc2_dir, expected_status)
+
+  expected_output = ["Properties on '%s':\n" % (os.path.join(wc2_dir, 'iota')),
+                     "  svn:eol-style\n",
+                     "Properties on '%s':\n" % (os.path.join(wc2_dir, 'new-file')),
+                     "  svn:eol-style\n" ]
+  svntest.actions.run_and_verify_svn(None, expected_output, [], 'proplist',
+                                     os.path.join(wc2_dir, 'iota'),
+                                     os.path.join(wc2_dir, 'new-file'))
+
 ########################################################################
 # Run the tests
 
@@ -19034,6 +19118,7 @@ test_list = [ None,
               merge_into_wc_for_deleted_branch,
               reintegrate_with_self_referential_mergeinfo,
               reintegrate_with_subtree_merges,
+              foreign_repos_del_and_props,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/svn-patch-improvements/subversion/tests/cmdline/patch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/tests/cmdline/patch_tests.py?rev=933863&r1=933862&r2=933863&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/tests/cmdline/patch_tests.py (original)
+++ subversion/branches/svn-patch-improvements/subversion/tests/cmdline/patch_tests.py Wed Apr 14 06:51:00 2010
@@ -46,6 +46,11 @@ SkipUnless = svntest.testcase.SkipUnless
 Item = svntest.wc.StateItem
 XFail = svntest.testcase.XFail
 
+def make_patch_path(sbox, name='my.patch'):
+  dir = sbox.add_wc_path('patches')
+  os.mkdir(dir)
+  return os.path.abspath(os.path.join(dir, name))
+
 ########################################################################
 #Tests
 
@@ -55,8 +60,7 @@ def patch(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  (fd, patch_file_path) = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))
-  os.close(fd)
+  patch_file_path = make_patch_path(sbox)
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
   mu_contents = [
@@ -226,9 +230,7 @@ def patch_absolute_paths(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  dir = os.path.abspath(svntest.main.temp_dir)
-  (fd, patch_file_path) = tempfile.mkstemp(dir=dir)
-  os.close(fd)
+  patch_file_path = make_patch_path(sbox)
 
   os.chdir(wc_dir)
 
@@ -291,8 +293,7 @@ def patch_offset(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  (fd, patch_file_path) = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))
-  os.close(fd)
+  patch_file_path = make_patch_path(sbox)
   mu_path = os.path.join(wc_dir, 'A', 'mu')
   iota_path = os.path.join(wc_dir, 'iota')
 
@@ -505,8 +506,7 @@ def patch_chopped_leading_spaces(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  (fd, patch_file_path) = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))
-  os.close(fd)
+  patch_file_path = make_patch_path(sbox)
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
   mu_contents = [
@@ -676,8 +676,7 @@ def patch_strip1(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  (fd, patch_file_path) = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))
-  os.close(fd)
+  patch_file_path = make_patch_path(sbox)
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
   mu_contents = [
@@ -847,7 +846,7 @@ def patch_no_index_line(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  patch_file_path = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))[1]
+  patch_file_path = make_patch_path(sbox)
   gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
   iota_path = os.path.join(wc_dir, 'iota')
 
@@ -933,8 +932,7 @@ def patch_add_new_dir(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  (fd, patch_file_path) = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))
-  os.close(fd)
+  patch_file_path = make_patch_path(sbox)
 
   # The first diff is adding 'new' with two missing dirs. The second is
   # adding 'new' with one missing dir to a 'A' that is locally deleted
@@ -1123,8 +1121,7 @@ def patch_reject(sbox):
   svntest.actions.run_and_verify_commit(wc_dir, expected_output,
                                         expected_status, None, wc_dir)
 
-  (fd, patch_file_path) = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))
-  os.close(fd)
+  patch_file_path = make_patch_path(sbox)
 
   # Apply patch
 
@@ -1197,8 +1194,7 @@ def patch_keywords(sbox):
   svntest.actions.run_and_verify_commit(wc_dir, expected_output,
                                         expected_status, None, wc_dir)
 
-  (fd, patch_file_path) = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))
-  os.close(fd)
+  patch_file_path = make_patch_path(sbox)
 
   # Apply patch
 
@@ -1243,8 +1239,7 @@ def patch_with_fuzz(sbox):
 
   sbox.build()
   wc_dir = sbox.wc_dir
-  (fd, patch_file_path) = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))
-  os.close(fd)
+  patch_file_path = make_patch_path(sbox)
 
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
@@ -1384,8 +1379,7 @@ def patch_reverse(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  (fd, patch_file_path) = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))
-  os.close(fd)
+  patch_file_path = make_patch_path(sbox)
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
   mu_contents = [
@@ -1555,8 +1549,7 @@ def patch_no_svn_eol_style(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  (fd, patch_file_path) = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))
-  os.close(fd)
+  patch_file_path = make_patch_path(sbox)
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
   if os.name == 'nt':
@@ -1659,8 +1652,7 @@ def patch_with_svn_eol_style(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  (fd, patch_file_path) = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))
-  os.close(fd)
+  patch_file_path = make_patch_path(sbox)
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
 
@@ -1774,8 +1766,7 @@ def patch_with_svn_eol_style_uncommitted
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  (fd, patch_file_path) = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))
-  os.close(fd)
+  patch_file_path = make_patch_path(sbox)
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
 
@@ -1883,8 +1874,7 @@ def patch_with_include_patterns(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  (fd, patch_file_path) = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))
-  os.close(fd)
+  patch_file_path = make_patch_path(sbox)
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
   mu_contents = [
@@ -2042,8 +2032,7 @@ def patch_with_exclude_patterns(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  (fd, patch_file_path) = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))
-  os.close(fd)
+  patch_file_path = make_patch_path(sbox)
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
   mu_contents = [
@@ -2203,8 +2192,7 @@ def patch_with_include_exclude_patterns(
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  (fd, patch_file_path) = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))
-  os.close(fd)
+  patch_file_path = make_patch_path(sbox)
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
   mu_contents = [

Modified: subversion/branches/svn-patch-improvements/subversion/tests/cmdline/schedule_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/tests/cmdline/schedule_tests.py?rev=933863&r1=933862&r2=933863&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/tests/cmdline/schedule_tests.py (original)
+++ subversion/branches/svn-patch-improvements/subversion/tests/cmdline/schedule_tests.py Wed Apr 14 06:51:00 2010
@@ -62,15 +62,15 @@ def add_files(sbox):
   wc_dir = sbox.wc_dir
 
   # Create some files, then schedule them for addition
-  delta_path = os.path.join(wc_dir, 'delta')
-  zeta_path = os.path.join(wc_dir, 'A', 'B', 'zeta')
-  epsilon_path = os.path.join(wc_dir, 'A', 'D', 'G', 'epsilon')
+  delta_path = sbox.ospath('delta')
+  zeta_path = sbox.ospath('A/B/zeta')
+  epsilon_path = sbox.ospath('A/D/G/epsilon')
 
   svntest.main.file_append(delta_path, "This is the file 'delta'.")
   svntest.main.file_append(zeta_path, "This is the file 'zeta'.")
   svntest.main.file_append(epsilon_path, "This is the file 'epsilon'.")
 
-  svntest.main.run_svn(None, 'add', delta_path, zeta_path, epsilon_path)
+  sbox.simple_add(delta_path, zeta_path, epsilon_path)
 
   # Make sure the adds show up as such in status
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -91,15 +91,15 @@ def add_directories(sbox):
   wc_dir = sbox.wc_dir
 
   # Create some directories, then schedule them for addition
-  X_path = os.path.join(wc_dir, 'X')
-  Y_path = os.path.join(wc_dir, 'A', 'C', 'Y')
-  Z_path = os.path.join(wc_dir, 'A', 'D', 'H', 'Z')
+  X_path = sbox.ospath('X')
+  Y_path = sbox.ospath('A/C/Y')
+  Z_path = sbox.ospath('A/D/H/Z')
 
   os.mkdir(X_path)
   os.mkdir(Y_path)
   os.mkdir(Z_path)
 
-  svntest.main.run_svn(None, 'add', X_path, Y_path, Z_path)
+  sbox.simple_add(X_path, Y_path, Z_path)
 
   # Make sure the adds show up as such in status
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -120,9 +120,9 @@ def nested_adds(sbox):
   wc_dir = sbox.wc_dir
 
   # Create some directories then schedule them for addition
-  X_path = os.path.join(wc_dir, 'X')
-  Y_path = os.path.join(wc_dir, 'A', 'C', 'Y')
-  Z_path = os.path.join(wc_dir, 'A', 'D', 'H', 'Z')
+  X_path = sbox.ospath('X')
+  Y_path = sbox.ospath('A/C/Y')
+  Z_path = sbox.ospath('A/D/H/Z')
 
   os.mkdir(X_path)
   os.mkdir(Y_path)
@@ -130,18 +130,18 @@ def nested_adds(sbox):
 
   # Now, create some files and directories to put into our newly added
   # directories
-  P_path = os.path.join(X_path, 'P')
-  Q_path = os.path.join(Y_path, 'Q')
-  R_path = os.path.join(Z_path, 'R')
+  P_path = sbox.ospath('X/P')
+  Q_path = sbox.ospath('A/C/Y/Q')
+  R_path = sbox.ospath('A/D/H/Z/R')
 
   os.mkdir(P_path)
   os.mkdir(Q_path)
   os.mkdir(R_path)
 
-  delta_path = os.path.join(X_path, 'delta')
-  epsilon_path = os.path.join(Y_path, 'epsilon')
-  upsilon_path = os.path.join(Y_path, 'upsilon')
-  zeta_path = os.path.join(Z_path, 'zeta')
+  delta_path = sbox.ospath('X/delta')
+  epsilon_path = sbox.ospath('A/C/Y/epsilon')
+  upsilon_path = sbox.ospath('A/C/Y/upsilon')
+  zeta_path = sbox.ospath('A/D/H/Z/zeta')
 
   svntest.main.file_append(delta_path, "This is the file 'delta'.")
   svntest.main.file_append(epsilon_path, "This is the file 'epsilon'.")
@@ -149,7 +149,7 @@ def nested_adds(sbox):
   svntest.main.file_append(zeta_path, "This is the file 'zeta'.")
 
   # Finally, let's try adding our new files and directories
-  svntest.main.run_svn(None, 'add', X_path, Y_path, Z_path)
+  sbox.simple_add(X_path, Y_path, Z_path)
 
   # Make sure the adds show up as such in status
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -176,15 +176,17 @@ def add_executable(sbox):
   sbox.build(read_only = True)
 
   def runTest(wc_dir, fileName, perm, executable):
-    fileName = os.path.join(wc_dir, fileName)
+    fileName = sbox.ospath(fileName)
     if executable:
       expected_out = ["*\n"]
     else:
       expected_out = []
-    f = open(fileName,"w")
-    f.close()
-    os.chmod(fileName,perm)
-    svntest.main.run_svn(None, 'add', fileName)
+
+    # create an empty file
+    open(fileName, "w")
+
+    os.chmod(fileName, perm)
+    sbox.simple_add(fileName)
     svntest.actions.run_and_verify_svn(None, expected_out, [],
                                        'propget', "svn:executable", fileName)
 
@@ -207,12 +209,12 @@ def delete_files(sbox):
   wc_dir = sbox.wc_dir
 
   # Schedule some files for deletion
-  iota_path = os.path.join(wc_dir, 'iota')
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
-  omega_path = os.path.join(wc_dir, 'A', 'D', 'H', 'omega')
+  iota_path = sbox.ospath('iota')
+  mu_path = sbox.ospath('A/mu')
+  rho_path = sbox.ospath('A/D/G/rho')
+  omega_path = sbox.ospath('A/D/H/omega')
 
-  svntest.main.run_svn(None, 'del', iota_path, mu_path, rho_path, omega_path)
+  sbox.simple_rm(iota_path, mu_path, rho_path, omega_path)
 
   # Make sure the deletes show up as such in status
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -230,17 +232,17 @@ def delete_dirs(sbox):
   wc_dir = sbox.wc_dir
 
   # Schedule some directories for deletion (this is recursive!)
-  E_path = os.path.join(wc_dir, 'A', 'B', 'E')
-  F_path = os.path.join(wc_dir, 'A', 'B', 'F')
-  H_path = os.path.join(wc_dir, 'A', 'D', 'H')
-  alpha_path = os.path.join(E_path, 'alpha')
-  beta_path  = os.path.join(E_path, 'beta')
-  chi_path   = os.path.join(H_path, 'chi')
-  omega_path = os.path.join(H_path, 'omega')
-  psi_path   = os.path.join(H_path, 'psi')
+  E_path = sbox.ospath('A/B/E')
+  F_path = sbox.ospath('A/B/F')
+  H_path = sbox.ospath('A/D/H')
+  alpha_path = sbox.ospath('A/B/E/alpha')
+  beta_path  = sbox.ospath('A/B/E/beta')
+  chi_path   = sbox.ospath('A/D/H/chi')
+  omega_path = sbox.ospath('A/D/H/omega')
+  psi_path   = sbox.ospath('A/D/H/psi')
 
   # Now, delete (recursively) the directories.
-  svntest.main.run_svn(None, 'del', E_path, F_path, H_path)
+  sbox.simple_rm(E_path, F_path, H_path)
 
   # Make sure the deletes show up as such in status
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -279,9 +281,9 @@ def revert_add_files(sbox):
   wc_dir = sbox.wc_dir
 
   # Revert our changes recursively from wc_dir.
-  delta_path = os.path.join(wc_dir, 'delta')
-  zeta_path = os.path.join(wc_dir, 'A', 'B', 'zeta')
-  epsilon_path = os.path.join(wc_dir, 'A', 'D', 'G', 'epsilon')
+  delta_path = sbox.ospath('delta')
+  zeta_path = sbox.ospath('A/B/zeta')
+  epsilon_path = sbox.ospath('A/D/G/epsilon')
   files = [delta_path, zeta_path, epsilon_path]
 
   exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
@@ -299,9 +301,9 @@ def revert_add_directories(sbox):
   wc_dir = sbox.wc_dir
 
   # Revert our changes recursively from wc_dir.
-  X_path = os.path.join(wc_dir, 'X')
-  Y_path = os.path.join(wc_dir, 'A', 'C', 'Y')
-  Z_path = os.path.join(wc_dir, 'A', 'D', 'H', 'Z')
+  X_path = sbox.ospath('X')
+  Y_path = sbox.ospath('A/C/Y')
+  Z_path = sbox.ospath('A/D/H/Z')
   files = [X_path, Y_path, Z_path]
 
   exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
@@ -319,9 +321,9 @@ def revert_nested_adds(sbox):
   wc_dir = sbox.wc_dir
 
   # Revert our changes recursively from wc_dir.
-  X_path = os.path.join(wc_dir, 'X')
-  Y_path = os.path.join(wc_dir, 'A', 'C', 'Y')
-  Z_path = os.path.join(wc_dir, 'A', 'D', 'H', 'Z')
+  X_path = sbox.ospath('X')
+  Y_path = sbox.ospath('A/C/Y')
+  Z_path = sbox.ospath('A/D/H/Z')
   files = [X_path, Y_path, Z_path]
 
   exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
@@ -338,11 +340,11 @@ def revert_add_executable(sbox):
   add_executable(sbox)
   wc_dir = sbox.wc_dir
 
-  all_path = os.path.join(wc_dir, 'all_exe')
-  none_path = os.path.join(wc_dir, 'none_exe')
-  user_path = os.path.join(wc_dir, 'user_exe')
-  group_path = os.path.join(wc_dir, 'group_exe')
-  other_path = os.path.join(wc_dir, 'other_exe')
+  all_path = sbox.ospath('all_exe')
+  none_path = sbox.ospath('none_exe')
+  user_path = sbox.ospath('user_exe')
+  group_path = sbox.ospath('group_exe')
+  other_path = sbox.ospath('other_exe')
   files = [all_path, none_path, user_path, group_path, other_path]
 
   exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
@@ -360,10 +362,10 @@ def revert_delete_files(sbox):
   wc_dir = sbox.wc_dir
 
   # Revert our changes recursively from wc_dir.
-  iota_path = os.path.join(wc_dir, 'iota')
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
-  omega_path = os.path.join(wc_dir, 'A', 'D', 'H', 'omega')
+  iota_path = sbox.ospath('iota')
+  mu_path = sbox.ospath('A/mu')
+  rho_path = sbox.ospath('A/D/G/rho')
+  omega_path = sbox.ospath('A/D/H/omega')
   files = [iota_path, mu_path, omega_path, rho_path]
 
   exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
@@ -381,14 +383,14 @@ def revert_delete_dirs(sbox):
   wc_dir = sbox.wc_dir
 
   # Revert our changes recursively from wc_dir.
-  E_path = os.path.join(wc_dir, 'A', 'B', 'E')
-  F_path = os.path.join(wc_dir, 'A', 'B', 'F')
-  H_path = os.path.join(wc_dir, 'A', 'D', 'H')
-  alpha_path = os.path.join(E_path, 'alpha')
-  beta_path  = os.path.join(E_path, 'beta')
-  chi_path   = os.path.join(H_path, 'chi')
-  omega_path = os.path.join(H_path, 'omega')
-  psi_path   = os.path.join(H_path, 'psi')
+  E_path = sbox.ospath('A/B/E')
+  F_path = sbox.ospath('A/B/F')
+  H_path = sbox.ospath('A/D/H')
+  alpha_path = sbox.ospath('A/B/E/alpha')
+  beta_path  = sbox.ospath('A/B/E/beta')
+  chi_path   = sbox.ospath('A/D/H/chi')
+  omega_path = sbox.ospath('A/D/H/omega')
+  psi_path   = sbox.ospath('A/D/H/psi')
   files = [E_path, F_path, H_path,
            alpha_path, beta_path, chi_path, omega_path, psi_path]
 
@@ -420,15 +422,15 @@ def unschedule_missing_added(sbox):
   wc_dir = sbox.wc_dir
 
   # Create some files and dirs, then schedule them for addition
-  file1_path = os.path.join(wc_dir, 'file1')
-  file2_path = os.path.join(wc_dir, 'file2')
-  dir1_path = os.path.join(wc_dir, 'dir1')
-  dir2_path = os.path.join(wc_dir, 'dir2')
+  file1_path = sbox.ospath('file1')
+  file2_path = sbox.ospath('file2')
+  dir1_path = sbox.ospath('dir1')
+  dir2_path = sbox.ospath('dir2')
 
   svntest.main.file_append(file1_path, "This is the file 'file1'.")
   svntest.main.file_append(file2_path, "This is the file 'file2'.")
-  svntest.main.run_svn(None, 'add', file1_path, file2_path)
-  svntest.main.run_svn(None, 'mkdir', dir1_path, dir2_path)
+  sbox.simple_add(file1_path, file2_path)
+  sbox.simple_mkdir(dir1_path, dir2_path)
 
   # Make sure the 4 adds show up as such in status
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -448,9 +450,11 @@ def unschedule_missing_added(sbox):
   svntest.main.safe_rmtree(dir2_path)
 
   # Unschedule the additions, using 'svn rm' and 'svn revert'.
+  # FILE1_PATH will throw an error. DIR1_PATH will not since the stub is
+  # still available in the parent directory.
   svntest.main.run_svn(svntest.verify.AnyOutput, 'rm', file1_path)
-  svntest.main.run_svn(svntest.verify.AnyOutput, 'rm', dir1_path)
-  svntest.main.run_svn(None, 'revert', file2_path, dir2_path)
+  sbox.simple_rm(dir1_path)
+  sbox.simple_revert(file2_path, dir2_path)
 
   # 'svn st' should now show absolutely zero local mods.
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -468,15 +472,15 @@ def delete_missing(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  H_path = os.path.join(wc_dir, 'A', 'D', 'H')
+  mu_path = sbox.ospath('A/mu')
+  H_path = sbox.ospath('A/D/H')
 
   # Manually remove a file and a directory.
   os.remove(mu_path)
   svntest.main.safe_rmtree(H_path)
 
   # Now schedule them for deletion anyway, and make sure no error is output.
-  svntest.actions.run_and_verify_svn(None, None, [], 'rm', mu_path, H_path)
+  sbox.simple_rm(mu_path, H_path)
 
   # Commit the deletions.
   expected_output = svntest.wc.State(wc_dir, {
@@ -510,13 +514,12 @@ def revert_inside_newly_added_dir(sbox):
 
   # Schedule a new directory for addition
   os.mkdir('foo')
-  svntest.main.run_svn(None, 'add', 'foo')
+  sbox.simple_add('foo')
 
   # Now change into the newly added directory, revert and make sure
   # no error is output.
   os.chdir('foo')
-  svntest.actions.run_and_verify_svn(None, None, [],
-                                     'revert', '.')
+  sbox.simple_revert('.')
 
 #----------------------------------------------------------------------
 # Regression test for issue #1609:
@@ -538,12 +541,13 @@ def status_add_deleted_directory(sbox):
   # svn ci wc -m r2
   # svn mkdir wc/foo
 
-  A_path = os.path.join(wc_dir, 'A')
-  svntest.actions.run_and_verify_svn(None, None, [], 'rm', A_path)
+  A_path = sbox.ospath('A')
+
+  sbox.simple_rm(A_path)
   svntest.main.safe_rmtree(A_path)
-  svntest.actions.run_and_verify_svn(None, None, [],
-                                     'ci', '-m', 'log msg', wc_dir)
-  svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', A_path)
+  sbox.simple_commit()
+
+  sbox.simple_mkdir(A_path)
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
   expected_status = svntest.wc.State(wc_dir,
@@ -573,9 +577,9 @@ def add_recursive_already_versioned(sbox
     return 1
 
   # Create some files, then schedule them for addition
-  delta_path = os.path.join(wc_dir, 'delta')
-  zeta_path = os.path.join(wc_dir, 'A', 'B', 'zeta')
-  epsilon_path = os.path.join(wc_dir, 'A', 'D', 'G', 'epsilon')
+  delta_path = sbox.ospath('delta')
+  zeta_path = sbox.ospath('A/B/zeta')
+  epsilon_path = sbox.ospath('A/D/G/epsilon')
 
   svntest.main.file_append(delta_path, "This is the file 'delta'.")
   svntest.main.file_append(zeta_path, "This is the file 'zeta'.")

Modified: subversion/branches/svn-patch-improvements/subversion/tests/cmdline/svnsync_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/tests/cmdline/svnsync_tests.py?rev=933863&r1=933862&r2=933863&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/tests/cmdline/svnsync_tests.py (original)
+++ subversion/branches/svn-patch-improvements/subversion/tests/cmdline/svnsync_tests.py Wed Apr 14 06:51:00 2010
@@ -39,7 +39,7 @@ Skip = svntest.testcase.Skip
 SkipUnless = svntest.testcase.SkipUnless
 XFail = svntest.testcase.XFail
 Item = svntest.wc.StateItem
-
+Wimp = svntest.testcase.Wimp
 
 ######################################################################
 # Helper routines
@@ -791,8 +791,9 @@ test_list = [ None,
               detect_meddling,
               Skip(basic_authz, svntest.main.is_ra_type_file),
               Skip(copy_from_unreadable_dir, svntest.main.is_ra_type_file),
-              Skip(copy_with_mod_from_unreadable_dir,
-                   svntest.main.is_ra_type_file),
+              Wimp("Needs local add below copy support in WC-NG",
+                   Skip(copy_with_mod_from_unreadable_dir,
+                        svntest.main.is_ra_type_file)),
               Skip(copy_with_mod_from_unreadable_dir_and_copy,
                    svntest.main.is_ra_type_file),
               url_encoding,

Modified: subversion/branches/svn-patch-improvements/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/tests/cmdline/svntest/main.py?rev=933863&r1=933862&r2=933863&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/svn-patch-improvements/subversion/tests/cmdline/svntest/main.py Wed Apr 14 06:51:00 2010
@@ -789,9 +789,12 @@ def create_repos(path):
 def copy_repos(src_path, dst_path, head_revision, ignore_uuid = 1):
   "Copy the repository SRC_PATH, with head revision HEAD_REVISION, to DST_PATH"
 
+  # Save any previous value of SVN_DBG_QUIET
+  saved_quiet = os.environ.get('SVN_DBG_QUIET')
+  os.environ['SVN_DBG_QUIET'] = 'y'
+
   # Do an svnadmin dump|svnadmin load cycle. Print a fake pipe command so that
   # the displayed CMDs can be run by hand
-  os.environ['SVN_DBG_QUIET'] = 'y'
   create_repos(dst_path)
   dump_args = ['dump', src_path]
   load_args = ['load', dst_path]
@@ -825,7 +828,10 @@ def copy_repos(src_path, dst_path, head_
   load_out.close()
   load_err.close()
 
-  del os.environ['SVN_DBG_QUIET']
+  if saved_quiet is None:
+    del os.environ['SVN_DBG_QUIET']
+  else:
+    os.environ['SVN_DBG_QUIET'] = saved_quiet
 
   dump_re = re.compile(r'^\* Dumped revision (\d+)\.\r?$')
   expect_revision = 0
@@ -981,6 +987,34 @@ def merge_notify_line(revstart=None, rev
              % (from_foreign_phrase, revstart, revend)
 
 
+def make_log_msg():
+  "Conjure up a log message based on the calling test."
+
+  for idx in range(1, 100):
+    frame = sys._getframe(idx)
+
+    # If this frame isn't from a function in *_tests.py, then skip it.
+    filename = frame.f_code.co_filename
+    if not filename.endswith('_tests.py'):
+      continue
+
+    # There should be a test_list in this module.
+    test_list = frame.f_globals.get('test_list')
+    if test_list is None:
+      continue
+
+    # If the function is not in the test_list, then skip it.
+    func_name = frame.f_code.co_name
+    func_ob = frame.f_globals.get(func_name)
+    if func_ob not in test_list:
+      continue
+
+    # Make the log message look like a line from a traceback.
+    # Well...close. We use single quotes to avoid interfering with the
+    # double-quote quoting performed on Windows
+    return "File '%s', line %d, in %s" % (filename, frame.f_lineno, func_name)
+
+
 ######################################################################
 # Functions which check the test configuration
 # (useful for conditional XFails)

Modified: subversion/branches/svn-patch-improvements/subversion/tests/cmdline/svntest/sandbox.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/tests/cmdline/svntest/sandbox.py?rev=933863&r1=933862&r2=933863&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/tests/cmdline/svntest/sandbox.py (original)
+++ subversion/branches/svn-patch-improvements/subversion/tests/cmdline/svntest/sandbox.py Wed Apr 14 06:51:00 2010
@@ -147,6 +147,53 @@ class Sandbox:
     "Returns True when build() has been called on this instance."
     return self._is_built
 
+  def ospath(self, relpath, wc_dir=None):
+    if wc_dir is None:
+      wc_dir = self.wc_dir
+    return os.path.join(wc_dir, svntest.wc.to_ospath(relpath))
+
+  def simple_commit(self, target_dir=None):
+    assert not self.read_only
+    if target_dir is None:
+      target_dir = self.wc_dir
+    svntest.main.run_svn(False, 'commit',
+                         '-m', svntest.main.make_log_msg(),
+                         target_dir)
+
+  def simple_rm(self, *targets):
+    assert len(targets) > 0
+    if len(targets) == 1 and is_url(targets[0]):
+      assert not self.read_only
+      targets = ('-m', svntests.main.make_log_msg(), targets[0])
+    svntest.main.run_svn(False, 'rm', *targets)
+
+  def simple_mkdir(self, *targets):
+    assert len(targets) > 0
+    if len(targets) == 1 and is_url(targets[0]):
+      assert not self.read_only
+      targets = ('-m', svntests.main.make_log_msg(), targets[0])
+    svntest.main.run_svn(False, 'mkdir', *targets)
+
+  def simple_add(self, *targets):
+    assert len(targets) > 0
+    if len(targets) == 1 and is_url(targets[0]):
+      assert not self.read_only
+      targets = ('-m', svntests.main.make_log_msg(), targets[0])
+    svntest.main.run_svn(False, 'add', *targets)
+
+  def simple_revert(self, *targets):
+    assert len(targets) > 0
+    svntest.main.run_svn(False, 'revert', *targets)
+
+
+def is_url(target):
+  return (target.startswith('^/')
+          or target.startswith('file://')
+          or target.startswith('http://')
+          or target.startswith('https://')
+          or target.startswith('svn://')
+          or target.startswith('svn+ssh://'))
+
 
 _deferred_test_paths = []
 

Modified: subversion/branches/svn-patch-improvements/subversion/tests/cmdline/trans_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/tests/cmdline/trans_tests.py?rev=933863&r1=933862&r2=933863&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/tests/cmdline/trans_tests.py (original)
+++ subversion/branches/svn-patch-improvements/subversion/tests/cmdline/trans_tests.py Wed Apr 14 06:51:00 2010
@@ -826,11 +826,7 @@ def props_only_file_update(sbox):
   # put the content back to its untranslated form
   open(iota_path, 'w').writelines(content)
 
-  svntest.main.run_svn(None, 'propset', 'svn:keywords', 'Id', iota_path)
-
-#  expected_output = wc.State(wc_dir, {
-#    'iota' : Item(verb='Sending'),
-#    })
+  svntest.main.run_svn(None, 'propdel', 'svn:keywords', iota_path)
 
   expected_status.tweak('iota', wc_rev=3)
 
@@ -853,6 +849,9 @@ def props_only_file_update(sbox):
                                         False,
                                         wc_dir, '-r', '2')
 
+  if open(iota_path).read() != ''.join(content_expanded):
+    raise svntest.Failure("$Author$ is not expanded in 'iota'")
+
   # Update to r3. this should retranslate iota, dropping the keyword expansion
   expected_disk = svntest.main.greek_state.copy()
   expected_disk.tweak('iota', contents=''.join(content))
@@ -866,6 +865,9 @@ def props_only_file_update(sbox):
                                         False,
                                         wc_dir)
 
+  if open(iota_path).read() != ''.join(content):
+    raise svntest.Failure("$Author$ is not contracted in 'iota'")
+
   # We used to leave some temporary files around. Make sure that we don't.
   temps = os.listdir(os.path.join(wc_dir, '.svn', 'tmp'))
   temps.remove('prop-base')

Modified: subversion/branches/svn-patch-improvements/subversion/tests/libsvn_wc/db-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/tests/libsvn_wc/db-test.c?rev=933863&r1=933862&r2=933863&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/tests/libsvn_wc/db-test.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/tests/libsvn_wc/db-test.c Wed Apr 14 06:51:00 2010
@@ -681,6 +681,7 @@ test_inserting_nodes(apr_pool_t *pool)
             props,
             1, TIME_1a, AUTHOR_1,
             children, svn_depth_infinity,
+            NULL, NULL,
             pool));
 
   /* Replace an incomplete node with a file node. */
@@ -691,6 +692,7 @@ test_inserting_nodes(apr_pool_t *pool)
             props,
             1, TIME_1a, AUTHOR_1,
             checksum, 10,
+            NULL, NULL,
             pool));
 
   /* Create a new symlink node. */
@@ -701,6 +703,7 @@ test_inserting_nodes(apr_pool_t *pool)
             props,
             1, TIME_1a, AUTHOR_1,
             "O-target",
+            NULL, NULL,
             pool));
 
   /* Replace an incomplete node with an absent file node. */
@@ -708,6 +711,7 @@ test_inserting_nodes(apr_pool_t *pool)
             db, svn_dirent_join(local_abspath, "N/N-b", pool),
             "N/N-b", ROOT_ONE, UUID_ONE, 3,
             svn_wc__db_kind_file, svn_wc__db_status_absent,
+            NULL, NULL,
             pool));
 
   /* Create a new excluded directory node. */
@@ -715,6 +719,7 @@ test_inserting_nodes(apr_pool_t *pool)
             db, svn_dirent_join(local_abspath, "P", pool),
             "P", ROOT_ONE, UUID_ONE, 3,
             svn_wc__db_kind_dir, svn_wc__db_status_excluded,
+            NULL, NULL,
             pool));
 
   /* Create a new not-present symlink node. */
@@ -722,6 +727,7 @@ test_inserting_nodes(apr_pool_t *pool)
             db, svn_dirent_join(local_abspath, "Q", pool),
             "Q", ROOT_ONE, UUID_ONE, 3,
             svn_wc__db_kind_symlink, svn_wc__db_status_not_present,
+            NULL, NULL,
             pool));
 
   /* Create a new absent unknown-kind node. */
@@ -729,6 +735,7 @@ test_inserting_nodes(apr_pool_t *pool)
             db, svn_dirent_join(local_abspath, "R", pool),
             "R", ROOT_ONE, UUID_ONE, 3,
             svn_wc__db_kind_unknown, svn_wc__db_status_absent,
+            NULL, NULL,
             pool));
 
 
@@ -905,12 +912,14 @@ test_pdh(apr_pool_t *pool)
             db, svn_dirent_join(local_abspath, "sub/A/B", pool),
             "sub/A/B", ROOT_ONE, UUID_ONE, 1,
             svn_wc__db_kind_file, svn_wc__db_status_absent,
+            NULL, NULL,
             pool));
 
   SVN_ERR(svn_wc__db_base_add_absent_node(
             db, svn_dirent_join(local_abspath, "sub/A/B/C/D", pool),
             "sub/A/B/C/D", ROOT_ONE, UUID_ONE, 1,
             svn_wc__db_kind_file, svn_wc__db_status_absent,
+            NULL, NULL,
             pool));
 
   return SVN_NO_ERROR;

Modified: subversion/branches/svn-patch-improvements/tools/dev/wc-ng/count-progress.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/tools/dev/wc-ng/count-progress.py?rev=933863&r1=933862&r2=933863&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/tools/dev/wc-ng/count-progress.py (original)
+++ subversion/branches/svn-patch-improvements/tools/dev/wc-ng/count-progress.py Wed Apr 14 06:51:00 2010
@@ -30,10 +30,9 @@ SKIP = ['deprecated.c',
 TERMS = ['svn_wc_adm_access_t',
          'svn_wc_entry_t',
          'svn_wc__node_',
-         'log_accum',
-         'svn_wc__wq_add_loggy',
          'svn_wc__db_temp_',
          'svn_wc__db_node_hidden',
+         'svn_wc__loggy',
          ]
 
 
@@ -53,8 +52,10 @@ def count_terms_in(path):
   counts = {}
   for term in TERMS:
     counts[term] = 0
-    for filepath in get_files_in(path):
-      counts[term] += open(filepath).read().count(term)
+  for filepath in get_files_in(path):
+    contents = open(filepath).read()
+    for term in TERMS:
+      counts[term] += contents.count(term)
   return counts
 
 
@@ -78,10 +79,8 @@ def print_report(wcroot):
   print(FMT % ('Total', client_total, wc_total, client_total + wc_total))
 
 
-if __name__ == '__main__':
-  if len(sys.argv) > 1:
-    if '--help' in sys.argv[1:]:
-      print("""\
+def usage():
+  print("""\
 Usage: %s [WCROOT]
        %s --help
 
@@ -90,7 +89,15 @@ items in working copy branch root WCROOT
 program will attempt to guess it using the assumption that it is being
 run from within the working copy of interest."""
 % (sys.argv[0], sys.argv[0]))
-      sys.exit(0)
+
+  sys.exit(0)
+
+
+if __name__ == '__main__':
+  if len(sys.argv) > 1:
+    if '--help' in sys.argv[1:]:
+      usage()
+
     print_report(sys.argv[1])
   else:
     cwd = os.path.abspath(os.getcwd())
@@ -101,6 +108,8 @@ run from within the working copy of inte
       idx = cwd.rfind(os.sep + 'tools')
       if idx > 0:
         wcroot = cwd[:idx]
+      elif os.path.exists(os.path.join(cwd, 'subversion')):
+        wcroot = cwd
       else:
         print("ERROR: the root of 'trunk' cannot be located -- please provide")
         sys.exit(1)