You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by vm...@apache.org on 2012/12/24 23:47:16 UTC

svn commit: r1425690 [5/6] - in /subversion/branches/javahl-ra: ./ contrib/server-side/fsfsfixer/ notes/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_delta/ subversion/libsvn_fs_fs/ subversion/libsvn_ra/ s...

Modified: subversion/branches/javahl-ra/subversion/svnserve/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svnserve/main.c?rev=1425690&r1=1425689&r2=1425690&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svnserve/main.c (original)
+++ subversion/branches/javahl-ra/subversion/svnserve/main.c Mon Dec 24 22:47:14 2012
@@ -150,6 +150,7 @@ void winservice_notify_stop(void)
 #define SVNSERVE_OPT_CACHE_REVPROPS  267
 #define SVNSERVE_OPT_SINGLE_CONN     268
 #define SVNSERVE_OPT_CLIENT_SPEED    269
+#define SVNSERVE_OPT_VIRTUAL_HOST    270
 
 static const apr_getopt_option_t svnserve__options[] =
   {
@@ -277,6 +278,10 @@ static const apr_getopt_option_t svnserv
         "                             "
         "[mode: tunnel]")},
     {"help",             'h', 0, N_("display this help")},
+    {"virtual-host",     SVNSERVE_OPT_VIRTUAL_HOST, 0,
+     N_("virtual host mode (look for repo in directory\n"
+        "                             "
+        "of provided hostname)")},
     {"version",           SVNSERVE_OPT_VERSION, 0,
      N_("show program version information")},
     {"quiet",            'q', 0,
@@ -503,6 +508,7 @@ int main(int argc, const char *argv[])
   params.authzdb = NULL;
   params.compression_level = SVN_DELTA_COMPRESSION_LEVEL_DEFAULT;
   params.log_file = NULL;
+  params.vhost = FALSE;
   params.username_case = CASE_ASIS;
   params.memory_cache_size = (apr_uint64_t)-1;
   params.cache_fulltexts = TRUE;
@@ -694,7 +700,11 @@ int main(int argc, const char *argv[])
                                               pool));
           break;
 
-        case SVNSERVE_OPT_LOG_FILE:
+         case SVNSERVE_OPT_VIRTUAL_HOST:
+           params.vhost = TRUE;
+           break;
+
+         case SVNSERVE_OPT_LOG_FILE:
           SVN_INT_ERR(svn_utf_cstring_to_utf8(&log_filename, arg, pool));
           log_filename = svn_dirent_internal_style(log_filename, pool);
           SVN_INT_ERR(svn_dirent_get_absolute(&log_filename, log_filename,

Modified: subversion/branches/javahl-ra/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svnserve/serve.c?rev=1425690&r1=1425689&r2=1425690&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svnserve/serve.c (original)
+++ subversion/branches/javahl-ra/subversion/svnserve/serve.c Mon Dec 24 22:47:14 2012
@@ -2841,7 +2841,8 @@ static svn_error_t *replay_one_revision(
     svn_error_clear(editor->abort_edit(edit_baton, pool));
   SVN_CMD_ERR(err);
 
-  return svn_ra_svn_write_cmd(conn, pool, "finish-replay", "");
+  return svn_ra_svn_write_templated_cmd(conn, pool,
+                                        svn_ra_svn_cmd_finish_replay);
 }
 
 static svn_error_t *replay(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
@@ -3095,9 +3096,13 @@ static svn_error_t *find_repos(const cha
     return svn_error_createf(SVN_ERR_BAD_URL, NULL,
                              "Non-svn URL passed to svn server: '%s'", url);
 
-
-  path = strchr(path, '/');
-  path = (path == NULL) ? "" : svn_relpath_canonicalize(path, pool);
+  if (! b->vhost)
+    {
+      path = strchr(path, '/');
+      if (path == NULL)
+        path = "";
+    }
+  path = svn_relpath_canonicalize(path, pool);
   path = svn_path_uri_decode(path, pool);
 
   /* Ensure that it isn't possible to escape the root by disallowing
@@ -3351,6 +3356,7 @@ svn_error_t *serve(svn_ra_svn_conn_t *co
   b.log_file = params->log_file;
   b.pool = pool;
   b.use_sasl = FALSE;
+  b.vhost = params->vhost;
 
   /* construct FS configuration parameters */
   b.fs_config = apr_hash_make(pool);

Modified: subversion/branches/javahl-ra/subversion/svnserve/server.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svnserve/server.h?rev=1425690&r1=1425689&r2=1425690&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svnserve/server.h (original)
+++ subversion/branches/javahl-ra/subversion/svnserve/server.h Mon Dec 24 22:47:14 2012
@@ -59,6 +59,7 @@ typedef struct server_baton_t {
   svn_boolean_t use_sasl;  /* Use Cyrus SASL for authentication;
                               always false if SVN_HAVE_SASL not defined */
   apr_file_t *log_file;    /* Log filehandle. */
+  svn_boolean_t vhost;     /* Use virtual-host-based path to repo. */
   apr_pool_t *pool;
 } server_baton_t;
 
@@ -135,6 +136,9 @@ typedef struct serve_params_t {
   /* Amount of data to send between checks for cancellation requests
      coming in from the client. */
   apr_size_t error_check_interval;
+
+  /* Use virtual-host-based path to repo. */
+  svn_boolean_t vhost;
 } serve_params_t;
 
 /* Serve the connection CONN according to the parameters PARAMS. */

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/autoprop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/autoprop_tests.py?rev=1425690&r1=1425689&r2=1425690&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/autoprop_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/autoprop_tests.py Mon Dec 24 22:47:14 2012
@@ -42,6 +42,7 @@ Issue = svntest.testcase.Issue_deco
 Wimp = svntest.testcase.Wimp_deco
 Item = svntest.wc.StateItem
 
+from svntest.main import SVN_PROP_INHERITABLE_AUTOPROPS
 
 # Helper function
 def check_proplist(path, exp_out):
@@ -324,6 +325,348 @@ def fail_add_mixed_eol_style(sbox):
     {filename : Item(status='? ')})
   run_and_verify_unquiet_status(filepath, expected_status)
 
+#----------------------------------------------------------------------
+
+def create_inherited_autoprops_config(config_dir, enable_flag):
+  "create config stuffs for inherited autoprops tests"
+
+  # contents of the file 'config'
+  config_contents = '''\
+[auth]
+password-stores =
+
+[miscellany]
+enable-auto-props = %s
+
+[auto-props]
+*.c = svn:keywords=Author Date Id Rev URL;svn:eol-style=native;
+''' % (enable_flag and 'yes' or 'no')
+
+  svntest.main.create_config_dir(config_dir, config_contents)
+
+#----------------------------------------------------------------------
+def check_inheritable_autoprops(sbox, auto_props_enabled):
+  """Check that the autoprops added or imported by inheritable_autoprops_test
+     are as expected based on whether traditional auto props are active or
+     not, as indicated by AUTO_PROPS_ENABLED."""
+
+  foo_path = sbox.ospath('foo.c')
+  bar_path = sbox.ospath('B/bar.c')
+  baf_path = sbox.ospath('C/baf.c')
+  qux_path = sbox.ospath('D/qux.c')
+  rip_path = sbox.ospath('D/rip.bat')
+  snk_path = sbox.ospath('D/H/snk.py')
+  sir_path = sbox.ospath('D/H/sir.c')
+
+  if auto_props_enabled:
+    check_proplist(foo_path, {'svn:eol-style':'CRLF',
+                              'svn:keywords':'Author Date Id Rev URL'})
+    check_proplist(bar_path, {'svn:eol-style':'CR',
+                              'svn:keywords':'Date'})
+    check_proplist(baf_path, {'svn:eol-style':'LF',
+                              'svn:keywords':'Rev'})
+    check_proplist(qux_path, {'svn:eol-style':'CRLF',
+                              'svn:keywords':'Author Date Id Rev URL'})
+    check_proplist(rip_path, {'svn:executable':'*'})
+    check_proplist(snk_path, {'svn:mime-type':'text/x-python'})
+    check_proplist(sir_path, {'svn:eol-style':'CRLF',
+                              'svn:keywords':'Author Date Id Rev URL'})
+  else:
+    check_proplist(foo_path, {'svn:eol-style':'CRLF'})
+    check_proplist(bar_path, {'svn:eol-style':'CR',
+                              'svn:keywords':'Date'})
+    check_proplist(baf_path, {'svn:eol-style':'LF',
+                              'svn:keywords':'Rev'})
+    check_proplist(qux_path, {'svn:eol-style':'CRLF'})
+    check_proplist(rip_path, {'svn:executable':'*'})
+    check_proplist(snk_path, {'svn:mime-type':'text/x-python'})
+    check_proplist(sir_path, {'svn:eol-style':'CRLF'})
+
+#----------------------------------------------------------------------
+def inheritable_autoprops_test(sbox, cmd, cfgenable, clienable, subdir,
+                               do_import_or_add=True):
+  """configurable autoprops and svn:inheritable-auto-props test.
+
+     CMD is the subcommand to test: 'import' or 'add'
+     if CFGENABLE is true, enable autoprops in the config file, else disable
+     if CLIENABLE == 1: --auto-props is added to the command line
+                     0: nothing is added
+                    -1: --no-auto-props is added to command line
+     if string SUBDIR is not empty files are created in that subdir and the
+       directory is added/imported
+     if DO_IMPORT_OR_ADD is false, setup the test, but don't perform
+       the actual import or add.
+
+     Return the directory where the config dir (if any) is located."""
+
+  # Bootstrap
+  sbox.build()
+
+  # some directories
+  wc_dir = sbox.wc_dir
+  tmp_dir = os.path.abspath(svntest.main.temp_dir)
+  config_dir = os.path.join(tmp_dir, 'autoprops_config_' + sbox.name)
+  repos_url = sbox.repo_url
+
+  # initialize parameters
+  if cmd == 'import':
+    parameters = ['import', '-m', 'importing']
+    files_dir = tmp_dir
+  else:
+    parameters = ['add']
+    files_dir = wc_dir
+
+  parameters = parameters + ['--config-dir', config_dir]
+
+  create_inherited_autoprops_config(config_dir, cfgenable)
+
+  # add comandline flags
+  if clienable == 1:
+    parameters = parameters + ['--auto-props']
+    enable_flag = 1
+  elif clienable == -1:
+    parameters = parameters + ['--no-auto-props']
+    enable_flag = 0
+  else:
+    enable_flag = cfgenable
+
+  # setup subdirectory if needed
+  if len(subdir) > 0:
+    files_dir = os.path.join(files_dir, subdir)
+    files_wc_dir = os.path.join(wc_dir, subdir)
+    os.makedirs(files_dir)
+  else:
+    files_wc_dir = wc_dir
+
+  # Set differing svn:inheritable-auto-props properties on various
+  # directories.
+  sbox.simple_propset(SVN_PROP_INHERITABLE_AUTOPROPS,
+                      '*.c = svn:eol-style=CRLF\n'
+                      '*.bat = svn:executable',
+                      '.')
+  sbox.simple_propset(SVN_PROP_INHERITABLE_AUTOPROPS,
+                      '*.c = svn:eol-style=CR;svn:keywords=Date',
+                      'A/B')
+  sbox.simple_propset(SVN_PROP_INHERITABLE_AUTOPROPS,
+                      '*.c = svn:eol-style=LF;svn:keywords=Rev',
+                      'A/C')
+  sbox.simple_propset(SVN_PROP_INHERITABLE_AUTOPROPS,
+                      '*.py = svn:mime-type=text/x-python',
+                      'A/D')
+  svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m',
+                                     'Add some ' + SVN_PROP_INHERITABLE_AUTOPROPS +
+                                     ' properties', wc_dir)
+
+  # Switch the root of the WC to ^/A.
+  svntest.main.run_svn(None, 'switch', '--ignore-ancestry',
+                       sbox.repo_url + '/A', wc_dir)
+
+  # Array of file names to add or import, their WC locations (relative to the
+  # WC root) if being added, and their repository locations if being imported.
+  filenames = [['foo.c',  'foo.c',                           'A/foo.c'],
+               ['bar.c',   os.path.join('B', 'bar.c'),       'A/B/bar.c'],
+               ['baf.c',   os.path.join('C', 'baf.c'),       'A/C/baf.c'],
+               ['qux.c',   os.path.join('D', 'qux.c'),       'A/D/qux.c'],
+               ['rip.bat', os.path.join('D', 'rip.bat'),     'A/D/rip.bat'],
+               ['snk.py',  os.path.join('D', 'H', 'snk.py'), 'A/D/H/snk.py'],
+               ['ric.c',   os.path.join('D', 'H', 'sir.c'),  'A/D/H/sir.c']]
+
+  for filename in filenames:
+    if cmd == 'import':
+      svntest.main.file_write(os.path.join(files_dir, filename[0]),
+                              'foo\nbar\nbaz\n')
+    else:
+      svntest.main.file_write(os.path.join(files_dir, filename[1]),
+                              'foo\nbar\nbaz\n')
+
+  if do_import_or_add:
+    if len(subdir) == 0:
+      # add/import the files
+      for filename in filenames:
+        if cmd == 'import':
+          path = os.path.join(files_dir, filename[0])
+          tmp_params = parameters + [path, repos_url + '/' + filename[2]]
+        else:
+          path = os.path.join(files_dir, filename[1])
+          tmp_params = parameters + [path]
+        svntest.main.run_svn(None, *tmp_params)
+    else:
+      # add/import subdirectory
+      if cmd == 'import':
+        parameters = parameters + [files_dir, repos_url]
+      else:
+        parameters = parameters + [files_wc_dir]
+      svntest.main.run_svn(None, *parameters)
+
+    # do an svn co if needed
+    if cmd == 'import':
+      svntest.main.run_svn(None, 'checkout', repos_url + '/A', files_wc_dir,
+                          '--config-dir', config_dir)
+
+    check_inheritable_autoprops(sbox, enable_flag)
+
+  return config_dir
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_add_no_none(sbox):
+  "inherit add: config=no, commandline=none"
+  inheritable_autoprops_test(sbox, 'add', False, 0, '')
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_add_yes_none(sbox):
+  "inherit add: config=yes,  commandline=none"
+  inheritable_autoprops_test(sbox, 'add', True, 0, '')
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_add_no_yes(sbox):
+  "inherit add: config=no,  commandline=yes"
+
+  inheritable_autoprops_test(sbox, 'add', 0, 1, '')
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_add_yes_yes(sbox):
+  "inherit add: config=yes, commandline=yes"
+
+  inheritable_autoprops_test(sbox, 'add', 1, 1, '')
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_add_no_no(sbox):
+  "inherit add: config=no,  commandline=no"
+
+  inheritable_autoprops_test(sbox, 'add', 0, -1, '')
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_add_yes_no(sbox):
+  "inherit add: config=yes, commandline=no"
+
+  inheritable_autoprops_test(sbox, 'add', 1, -1, '')
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_import_no_none(sbox):
+  "inherit import: config=no, commandline=none"
+
+  inheritable_autoprops_test(sbox, 'import', False, 0, '')
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_imp_yes_none(sbox):
+  "inherit import: config=yes, commandline=none"
+
+  inheritable_autoprops_test(sbox, 'import', 1, 0, '')
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_imp_no_yes(sbox):
+  "inherit import: config=no,  commandline=yes"
+
+  inheritable_autoprops_test(sbox, 'import', 0, 1, '')
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_imp_yes_yes(sbox):
+  "inherit import: config=yes, commandline=yes"
+
+  inheritable_autoprops_test(sbox, 'import', 1, 1, '')
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_imp_no_no(sbox):
+  "inherit import: config=no,  commandline=no"
+
+  inheritable_autoprops_test(sbox, 'import', 0, -1, '')
+
+#----------------------------------------------------------------------
+
+def svn_prop_inheritable_autoprops_imp_yes_no(sbox):
+  "inherit import: config=yes, commandline=no"
+
+  inheritable_autoprops_test(sbox, 'import', 1, -1, '')
+
+#----------------------------------------------------------------------
+# Test svn:inheritable-auto-props when 'svn add' targets an already versioned
+# target.
+def svn_prop_inheritable_autoprops_add_versioned_target(sbox):
+  "svn:inheritable-auto-props and versioned target"
+
+  config_dir = inheritable_autoprops_test(sbox, 'add', 1, 0, '', False)
+
+  # Perform the add with the --force flag, and check the status.
+  ### Note: You have to be inside the working copy or else Subversion
+  ### will think you're trying to add the working copy to its parent
+  ### directory, and will (possibly, if the parent directory isn't
+  ### versioned) fail -- see also schedule_tests.py 11 "'svn add'
+  ### should traverse already-versioned dirs"
+  saved_wd = os.getcwd()
+  os.chdir(sbox.wc_dir)
+  svntest.main.run_svn(None, 'add', '.', '--force', '--config-dir',
+                       config_dir)
+  os.chdir(saved_wd)
+
+  check_inheritable_autoprops(sbox, True)
+
+#----------------------------------------------------------------------
+# Can't set svn:inheritable-auto-props on files.
+def svn_prop_inheritable_autoprops_propset_file_target(sbox):
+  "svn:inheritable-auto-props can't be set on files"
+
+  sbox.build()
+  svntest.actions.run_and_verify_svn(
+    None, None,
+    ".*Cannot set '" + SVN_PROP_INHERITABLE_AUTOPROPS + "' on a file.*",
+    'ps', SVN_PROP_INHERITABLE_AUTOPROPS, '*.c=svn:eol-style=native',
+    sbox.ospath('iota'))
+
+#----------------------------------------------------------------------
+# Multiple unversioned subtrees under a versioned target shouldn't segfault.
+def svn_prop_inheritable_autoprops_unversioned_subtrees_versioned_target(sbox):
+  "versioned target and unversioned subtrees"
+
+  sbox.build()
+  Z_path = sbox.ospath('A/D/Z')
+  Y_path = sbox.ospath('A/B/Y')
+  foo_path = sbox.ospath('A/D/Z/foo.c')
+  bar_path = sbox.ospath('A/B/Y/bar.c')
+
+  # Set svn:inheritable-auto-props properties on two directories.
+  svntest.main.run_svn(None, 'ps', SVN_PROP_INHERITABLE_AUTOPROPS,
+                       '*.c=svn:eol-style=CR', sbox.ospath('A/B'))
+  svntest.main.run_svn(None, 'ps', SVN_PROP_INHERITABLE_AUTOPROPS,
+                       '*.c=svn:eol-style=native', sbox.ospath('A/D'))
+  svntest.main.run_svn(None, 'ci', '-m', 'Add inheritable autoprops',
+                       sbox.wc_dir)
+
+  # Create two subtrees, each with one new file.
+  os.mkdir(Z_path)
+  os.mkdir(Y_path)
+  svntest.main.file_write(foo_path,
+                          '/* Someday there will be code here. */\n')
+  svntest.main.file_write(bar_path,
+                          '/* Someday there will be code here. */\n')
+
+  # Perform the add with the --force flag, targeting the root of the WC.
+  ### Note: You have to be inside the working copy or else Subversion
+  ### will think you're trying to add the working copy to its parent
+  ### directory, and will (possibly, if the parent directory isn't
+  ### versioned) fail -- see also schedule_tests.py 11 "'svn add'
+  ### should traverse already-versioned dirs"
+  saved_wd = os.getcwd()
+  os.chdir(sbox.wc_dir)
+  # This was causing a segfault at one point.
+  svntest.main.run_svn(None, 'add', '.', '--force')
+  os.chdir(saved_wd)
+
+  # Check the resulting autoprops.
+  svntest.actions.run_and_verify_svn(None, 'native\n', [],
+                                     'pg', 'svn:eol-style', foo_path)
+  svntest.actions.run_and_verify_svn(None, 'CR\n', [],
+                                     'pg', 'svn:eol-style', bar_path)
 
 ########################################################################
 # Run the tests
@@ -346,6 +689,21 @@ test_list = [ None,
               autoprops_add_dir,
               autoprops_imp_dir,
               fail_add_mixed_eol_style,
+              svn_prop_inheritable_autoprops_add_no_none,
+              svn_prop_inheritable_autoprops_add_yes_none,
+              svn_prop_inheritable_autoprops_add_no_yes,
+              svn_prop_inheritable_autoprops_add_yes_yes,
+              svn_prop_inheritable_autoprops_add_no_no,
+              svn_prop_inheritable_autoprops_add_yes_no,
+              svn_prop_inheritable_autoprops_import_no_none,
+              svn_prop_inheritable_autoprops_imp_yes_none,
+              svn_prop_inheritable_autoprops_imp_no_yes,
+              svn_prop_inheritable_autoprops_imp_yes_yes,
+              svn_prop_inheritable_autoprops_imp_no_no,
+              svn_prop_inheritable_autoprops_imp_yes_no,
+              svn_prop_inheritable_autoprops_add_versioned_target,
+              svn_prop_inheritable_autoprops_propset_file_target,
+              svn_prop_inheritable_autoprops_unversioned_subtrees_versioned_target,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/export_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/export_tests.py?rev=1425690&r1=1425689&r2=1425690&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/export_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/export_tests.py Mon Dec 24 22:47:14 2012
@@ -356,6 +356,7 @@ def export_working_copy_with_property_mo
                                         expected_disk)
 
 @XFail()
+@Issue(3798)
 def export_working_copy_at_base_revision(sbox):
   "export working copy at base revision"
   sbox.build(read_only = True)

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/externals_tests.py?rev=1425690&r1=1425689&r2=1425690&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/externals_tests.py Mon Dec 24 22:47:14 2012
@@ -2554,10 +2554,12 @@ def include_externals(sbox):
   actions.run_and_verify_unquiet_status(wc_dir, expected_status)
 
 
+@Issue(4252)
 @XFail()
 def include_immediate_dir_externals(sbox):
   "commit --include-externals --depth=immediates"
-  # See also comment inside svn_client_commit6().
+  # See also comment in append_externals_as_explicit_targets() in
+  # libsvn_client/commit.c, from r1198765.
 
   #   svntest.factory.make(sbox,"""
   #     svn mkdir X

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/import_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/import_tests.py?rev=1425690&r1=1425689&r2=1425690&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/import_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/import_tests.py Mon Dec 24 22:47:14 2012
@@ -25,11 +25,13 @@
 ######################################################################
 
 # General modules
-import re, os.path
+import re, os.path, sys
 
 # Our testing module
 import svntest
 from svntest import wc
+from prop_tests import create_inherited_ignores_config
+from svntest.main import SVN_PROP_INHERITABLE_IGNORES
 
 # (abbreviation)
 Skip = svntest.testcase.Skip_deco
@@ -407,6 +409,163 @@ def import_into_foreign_repo(sbox):
                                      sbox.ospath('A/mu'), other_repo_url + '/f')
 
 #----------------------------------------------------------------------
+def import_inherited_ignores(sbox):
+  'import and inherited ignores'
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Create this config file:
+  #
+  #   [miscellany]
+  #   global-ignores = *.boo *.goo
+  tmp_dir = os.path.abspath(svntest.main.temp_dir)
+  config_dir = os.path.join(tmp_dir, 'autoprops_config_' + sbox.name)
+  create_inherited_ignores_config(config_dir)
+
+  # Set some ignore properties.
+  sbox.simple_propset(SVN_PROP_INHERITABLE_IGNORES, '*.voo *.noo *.loo', '.')
+  sbox.simple_propset(SVN_PROP_INHERITABLE_IGNORES, '*.yoo\t*.doo', 'A/B')
+  sbox.simple_propset(SVN_PROP_INHERITABLE_IGNORES, '*.moo', 'A/D')
+  sbox.simple_propset('svn:ignore', '*.zoo\n*.foo\n*.poo', 'A/B/E')
+  sbox.simple_commit()
+
+  # Use this tree for importing:
+  #
+  # DIR1.noo
+  # DIR2.doo
+  #   file1.txt
+  # DIR3.foo
+  #   file2.txt
+  # DIR4.goo
+  #   file3.txt
+  #   file4.noo
+  # DIR5.moo
+  #   file5.txt
+  # DIR6
+  #   file6.foo
+  #   DIR7
+  #     file7.foo
+  #     DIR8.noo
+  import_tree_dir = os.path.join(os.path.dirname(sys.argv[0]),
+                                 'import_tests_data', 'import_tree')
+
+  # Relative WC paths of the imported tree.
+  dir1_path  = os.path.join('DIR1.noo')
+  dir2_path  = os.path.join('DIR2.doo')
+  file1_path = os.path.join('DIR2.doo', 'file1.txt')
+  dir3_path  = os.path.join('DIR3.foo')
+  file2_path = os.path.join('DIR3.foo', 'file2.txt')
+  dir4_path  = os.path.join('DIR4.goo')
+  file3_path = os.path.join('DIR4.goo', 'file3.txt')
+  file4_path = os.path.join('DIR4.goo', 'file4.txt')
+  dir5_path  = os.path.join('DIR5.moo')
+  file5_path = os.path.join('DIR5.moo', 'file5.txt')
+  dir6_path  = os.path.join('DIR6')
+  file6_path = os.path.join('DIR6', 'file6.foo')
+  dir7_path  = os.path.join('DIR6', 'DIR7')
+  file7_path = os.path.join('DIR6', 'DIR7', 'file7.foo')
+  dir8_path  = os.path.join('DIR6', 'DIR7', 'DIR8.noo')
+
+  # Import the tree to ^/A/B/E.
+  # We should never see any *.noo paths because those are blocked at the
+  # root of the repository by the svn:inheritable-ignores property.  Likewise
+  # *.doo paths are blocked by the svn:inheritable-ignores on ^/A/B.  Nor
+  # should we see and *.boo or *.goo paths, as those are blocked by the
+  # global-ignores config. Lastly, ^/A/B/E should not get any *.foo paths
+  # because of the svn:ignore property on ^/A/B/E, but non-immediate children
+  # of ^/A/B/E are permitted *.foo paths.
+  svntest.actions.run_and_verify_svn(None, None, [], 'import',
+                                     '--config-dir', config_dir,
+                                     import_tree_dir,
+                                     sbox.repo_url + '/A/B/E',
+                                     '-m', 'import')
+  E_path = os.path.join(wc_dir, 'A', 'B', 'E')
+  expected_output = svntest.verify.UnorderedOutput(
+    ["Updating '" + wc_dir + "':\n",
+     'A    ' + os.path.join(E_path, dir5_path)  + '\n',
+     'A    ' + os.path.join(E_path, file5_path) + '\n',
+     'A    ' + os.path.join(E_path, dir6_path)  + '\n',
+     'A    ' + os.path.join(E_path, file6_path) + '\n',
+     'A    ' + os.path.join(E_path, dir7_path)  + '\n',
+     'A    ' + os.path.join(E_path, file7_path) + '\n',
+     'Updated to revision 3.\n'])
+  svntest.actions.run_and_verify_svn(None, expected_output, [], 'up', wc_dir)
+
+  # Import the tree to ^/A/B/E/Z.  The only difference from above is that
+  # DIR3.foo and its child file2.txt are also imported.  Why? Because now
+  # we are creating a new directory in ^/A/B/E, so the svn:ignore property
+  # set on ^/A/B/E doesn't apply.
+  svntest.actions.run_and_verify_svn(None, None, [], 'import',
+                                     '--config-dir', config_dir,
+                                     import_tree_dir,
+                                     sbox.repo_url + '/A/B/E/Z',
+                                     '-m', 'import')
+  Z_path = os.path.join(wc_dir, 'A', 'B', 'E', 'Z')
+  expected_output = svntest.verify.UnorderedOutput(
+    ["Updating '" + wc_dir + "':\n",
+     'A    ' + os.path.join(Z_path)             + '\n',
+     'A    ' + os.path.join(Z_path, dir5_path)  + '\n',
+     'A    ' + os.path.join(Z_path, file5_path) + '\n',
+     'A    ' + os.path.join(Z_path, dir6_path)  + '\n',
+     'A    ' + os.path.join(Z_path, file6_path) + '\n',
+     'A    ' + os.path.join(Z_path, dir7_path)  + '\n',
+     'A    ' + os.path.join(Z_path, file7_path) + '\n',
+     'A    ' + os.path.join(Z_path, dir3_path)  + '\n',
+     'A    ' + os.path.join(Z_path, file2_path) + '\n',
+     'Updated to revision 4.\n'])
+  svntest.actions.run_and_verify_svn(None, expected_output, [], 'up', wc_dir)
+
+  # Import the tree to ^/A/B/F with the --no-ignore option.
+  # Now only the ignores present in the svn:inheritable-ignores property
+  # should be considered.
+  svntest.actions.run_and_verify_svn(None, None, [], 'import',
+                                     '--config-dir', config_dir,
+                                     '--no-ignore', import_tree_dir,
+                                     sbox.repo_url + '/A/B/F',
+                                     '-m', 'import')
+  F_path = os.path.join(wc_dir, 'A', 'B', 'F')
+  expected_output = svntest.verify.UnorderedOutput(
+    ["Updating '" + wc_dir + "':\n",
+     'A    ' + os.path.join(F_path, dir3_path)  + '\n',
+     'A    ' + os.path.join(F_path, file2_path) + '\n',
+     'A    ' + os.path.join(F_path, dir4_path)  + '\n',
+     'A    ' + os.path.join(F_path, file3_path) + '\n',
+     'A    ' + os.path.join(F_path, dir5_path)  + '\n',
+     'A    ' + os.path.join(F_path, file5_path) + '\n',
+     'A    ' + os.path.join(F_path, dir6_path)  + '\n',
+     'A    ' + os.path.join(F_path, file6_path) + '\n',
+     'A    ' + os.path.join(F_path, dir7_path)  + '\n',
+     'A    ' + os.path.join(F_path, file7_path) + '\n',
+     'Updated to revision 5.\n'])
+  svntest.actions.run_and_verify_svn(None, expected_output, [], 'up', wc_dir)
+
+  # Try importing a single file into a directory which has svn:ignore set
+  # on it with a matching pattern of the imported file.  The import should
+  # be a no-op.
+  svntest.actions.run_and_verify_svn(None, [], [], 'import',
+                                     '--config-dir', config_dir,
+                                     os.path.join(import_tree_dir,
+                                                  'DIR6', 'file6.foo'), 
+                                     sbox.repo_url + '/A/B/E/file6.foo',
+                                     '-m', 'This import should fail!')
+
+  # Try the above, but this time with --no-ignore, this time the import
+  # should succeed.
+  svntest.actions.run_and_verify_svn(None, None, [], 'import', '--no-ignore',
+                                     '--config-dir', config_dir,
+                                     os.path.join(import_tree_dir,
+                                                  'DIR6', 'file6.foo'), 
+                                     sbox.repo_url + '/A/B/E/file6.foo',
+                                     '-m', 'import')
+  expected_output = svntest.verify.UnorderedOutput(
+    ["Updating '" + wc_dir + "':\n",
+     'A    ' + os.path.join(E_path, 'file6.foo') + '\n',
+     'Updated to revision 6.\n'])
+  svntest.actions.run_and_verify_svn(None, expected_output, [], 'up', wc_dir)
+
+#----------------------------------------------------------------------
+
 ########################################################################
 # Run the tests
 
@@ -419,6 +578,7 @@ test_list = [ None,
               import_no_ignores,
               import_eol_style,
               import_into_foreign_repo,
+              import_inherited_ignores,
              ]
 
 if __name__ == '__main__':

Propchange: subversion/branches/javahl-ra/subversion/tests/cmdline/import_tests_data/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Mon Dec 24 22:47:14 2012
@@ -0,0 +1,2 @@
+[Ii]ssues?:?(\s*(,|and)?\s*#\d+)+
+(\d+)

Propchange: subversion/branches/javahl-ra/subversion/tests/cmdline/import_tests_data/
------------------------------------------------------------------------------
    bugtraq:url = http://subversion.tigris.org/issues/show_bug.cgi?id=%BUGID%

Propchange: subversion/branches/javahl-ra/subversion/tests/cmdline/import_tests_data/
------------------------------------------------------------------------------
    tsvn:logwidthmarker = 78

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tests.py?rev=1425690&r1=1425689&r2=1425690&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tests.py Mon Dec 24 22:47:14 2012
@@ -17826,6 +17826,60 @@ def merge_with_added_subtrees_with_merge
                                        None, None, None, None,
                                        None, 1, 0)
 
+#----------------------------------------------------------------------
+@SkipUnless(server_has_mergeinfo)
+def merge_with_externals_with_mergeinfo(sbox):
+  "merge with externals with mergeinfo"
+
+  # Some paths we'll care about.
+  A_path = sbox.ospath('A')
+  A_COPY_path = sbox.ospath('A_COPY')
+  file_external_path = sbox.ospath('A/file-external')
+  mu_COPY_path = sbox.ospath('A_COPY/mu')
+  mu_path = sbox.ospath('A/mu')
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Make a branch of ^/A and then make a few edits under A in r3-6:
+  wc_disk, wc_status = set_up_branch(sbox)
+
+  svntest.main.file_write(mu_COPY_path, "branch edit")
+  svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m',
+                                     'file edit on the branch', wc_dir)
+  svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+
+  # Create a file external under 'A' and set some bogus mergeinfo
+  # on it (the fact that this mergeinfo is bogus has no bearing on
+  # this test).
+  svntest.actions.run_and_verify_svn(None, None, [], 'propset',
+                                     'svn:externals',
+                                     '^/iota file-external', A_path)
+  svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m',
+                                     'set file external', wc_dir)
+  svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+  svntest.actions.run_and_verify_svn(None, None, [], 'ps', SVN_PROP_MERGEINFO,
+                                     "/bogus-mergeinfo:5", file_external_path)
+  svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m',
+                                     'set mergeinfo on file external',
+                                     file_external_path)
+
+  # Sync merge ^/A to A_COPY and then reintegrate A_COPY back to A.
+  svntest.actions.run_and_verify_svn(None, None, [], 'merge',
+                                     sbox.repo_url + '/A', A_COPY_path)
+  svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m',
+                                     'sync merge', wc_dir)
+  # This was segfaulting, see
+  # http://svn.haxx.se/dev/archive-2012-10/0364.shtml
+  svntest.actions.run_and_verify_svn(
+    None,
+    expected_merge_output(None,
+                          ['U    ' + mu_path + '\n',
+                           ' U   ' + A_path  + '\n'],
+                          two_url=True),
+    [], 'merge', '--reintegrate', sbox.repo_url + '/A_COPY',
+    A_path)
+
 ########################################################################
 # Run the tests
 
@@ -17961,6 +18015,7 @@ test_list = [ None,
               reverse_merge_with_rename,
               merge_adds_then_deletes_subtree,
               merge_with_added_subtrees_with_mergeinfo,
+              merge_with_externals_with_mergeinfo,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/prop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/prop_tests.py?rev=1425690&r1=1425689&r2=1425690&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/prop_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/prop_tests.py Mon Dec 24 22:47:14 2012
@@ -33,6 +33,8 @@ logger = logging.getLogger()
 import svntest
 
 from svntest.main import SVN_PROP_MERGEINFO
+from svntest.main import SVN_PROP_INHERITABLE_IGNORES
+from svntest import wc
 
 # (abbreviation)
 Skip = svntest.testcase.Skip_deco
@@ -2507,6 +2509,167 @@ def pristine_props_listed(sbox):
   svntest.actions.run_and_verify_svn(None, expected_output, [],
                                      'proplist', '-R', wc_dir, '-r', 'BASE')
 
+def create_inherited_ignores_config(config_dir):
+  "create config stuffs for inherited ignores tests"
+
+  # contents of the file 'config'
+  config_contents = '''\
+[miscellany]
+global-ignores = *.boo *.goo
+'''
+
+  svntest.main.create_config_dir(config_dir, config_contents)
+
+def inheritable_ignores(sbox):
+  "inheritable ignores with svn:ignores and config"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  tmp_dir = os.path.abspath(svntest.main.temp_dir)
+  config_dir = os.path.join(tmp_dir, 'autoprops_config_' + sbox.name)
+  create_inherited_ignores_config(config_dir)
+
+  sbox.simple_propset(SVN_PROP_INHERITABLE_IGNORES, '*.doo', 'A/B')
+  sbox.simple_propset(SVN_PROP_INHERITABLE_IGNORES, '*.moo', 'A/D')
+  sbox.simple_propset('svn:ignore', '*.foo', 'A/B/E')
+  sbox.simple_commit()
+
+  # Some directories and files that should be added because they don't
+  # match any applicable ignores.
+  X_dir_path = os.path.join(wc_dir, 'ADD-ME-DIR-X')
+  Y_dir_path = os.path.join(wc_dir, 'A', 'ADD-ME-DIR-Y.doo')
+  Z_dir_path = os.path.join(wc_dir, 'A', 'D', 'G', 'ADD-ME-DIR-Z.doo')
+  os.mkdir(X_dir_path)
+  os.mkdir(Y_dir_path)
+  os.mkdir(Z_dir_path)
+
+  # Some directories and files that should be ignored when adding
+  # because they match an ignore pattern (unless of course they are
+  # the direct target of an add, which we always add).
+  boo_dir_path = os.path.join(wc_dir, 'IGNORE-ME-DIR.boo')
+  goo_dir_path = os.path.join(wc_dir, 'IGNORE-ME-DIR.boo', 'IGNORE-ME-DIR.goo')
+  doo_dir_path = os.path.join(wc_dir, 'A', 'B', 'IGNORE-ME-DIR.doo')
+  moo_dir_path = os.path.join(wc_dir, 'A', 'D', 'IGNORE-ME-DIR.moo')
+  foo_dir_path = os.path.join(wc_dir, 'A', 'B', 'E', 'IGNORE-ME-DIR.foo')
+  os.mkdir(boo_dir_path)
+  os.mkdir(goo_dir_path)
+  os.mkdir(doo_dir_path)
+  os.mkdir(moo_dir_path)
+  os.mkdir(foo_dir_path)
+  boo_file_path = sbox.ospath('ADD-ME-DIR-X/ignore-me-file.boo')
+  goo_file_path = sbox.ospath('A/D/G/ignore-me-file.goo')
+  doo_file_path = sbox.ospath('A/B/IGNORE-ME-DIR.doo/ignore-me-file.doo')
+  doo_file2_path = sbox.ospath('A/B/E/ignore-me-file.doo')
+  moo_file_path = sbox.ospath('A/D/ignore-me-file.moo')
+  foo_file_path = sbox.ospath('A/B/E/ignore-me-file.foo')
+  svntest.main.file_write(boo_file_path, 'I should not be versioned!\n')
+  svntest.main.file_write(goo_file_path, 'I should not be versioned!\n')
+  svntest.main.file_write(doo_file_path, 'I should not be versioned!\n')
+  svntest.main.file_write(doo_file2_path, 'I should not be versioned!\n')
+  svntest.main.file_write(moo_file_path, 'I should not be versioned!\n')
+  svntest.main.file_write(foo_file_path, 'I should not be versioned!\n')
+
+  # Some directories and files that don't match any ignore pattern
+  # but are located within a subtree that does match and so shouldn't
+  # be added.
+  roo_file_path = sbox.ospath('A/B/IGNORE-ME-DIR.doo/ignore-me-file.roo')
+  svntest.main.file_write(roo_file_path, 'I should not be versioned!\n')
+
+  # Check (non-verbose) status with the custom config. We should only see
+  # the three unversioned directories which don't match any of the ignore
+  # patterns and aren't proper subtrees of an unversioned or ignored
+  # subtree.
+  expected_output = svntest.verify.UnorderedOutput(
+    ['?       ' + X_dir_path + '\n',
+     '?       ' + Y_dir_path + '\n',
+     '?       ' + Z_dir_path + '\n',])
+  svntest.actions.run_and_verify_svn(None, expected_output, [], 'st',
+                                     '--config-dir', config_dir, wc_dir)
+
+  # Check status without the custom config.
+  # Should be the same as above except the *.boo and *.goo paths
+  # now show up as unversioned '?'.
+  expected_output = svntest.verify.UnorderedOutput(
+    ['?       ' + X_dir_path    + '\n',
+     '?       ' + Y_dir_path    + '\n',
+     '?       ' + Z_dir_path    + '\n',
+     '?       ' + boo_dir_path  + '\n',
+     '?       ' + goo_file_path + '\n',])
+  svntest.actions.run_and_verify_svn(None, expected_output, [], 'st', wc_dir)
+
+  # Check status with the custom config and --no-ignore.
+  expected_output = svntest.verify.UnorderedOutput(
+    ['?       ' + X_dir_path     + '\n',
+     '?       ' + Y_dir_path     + '\n',
+     '?       ' + Z_dir_path     + '\n',
+     'I       ' + boo_dir_path   + '\n',
+     'I       ' + doo_dir_path   + '\n',
+     'I       ' + doo_file2_path + '\n',
+     'I       ' + moo_dir_path   + '\n',
+     'I       ' + foo_dir_path   + '\n',
+     'I       ' + goo_file_path  + '\n',
+     'I       ' + moo_file_path  + '\n',
+     'I       ' + foo_file_path  + '\n',])
+  svntest.actions.run_and_verify_svn(None, expected_output, [], 'st',
+                                     '--config-dir', config_dir,
+                                     '--no-ignore', wc_dir)
+
+  # Check status without the custom config and --no-ignore.
+  # Should be the same as above except the *.boo and *.goo paths
+  # are reported as unversioned '?' rather than ignored 'I'.
+  expected_output = svntest.verify.UnorderedOutput(
+    ['?       ' + X_dir_path     + '\n',
+     '?       ' + Y_dir_path     + '\n',
+     '?       ' + Z_dir_path     + '\n',
+     '?       ' + boo_dir_path   + '\n',
+     'I       ' + doo_dir_path   + '\n',
+     'I       ' + doo_file2_path + '\n',
+     'I       ' + moo_dir_path   + '\n',
+     'I       ' + foo_dir_path   + '\n',
+     '?       ' + goo_file_path  + '\n',
+     'I       ' + moo_file_path  + '\n',
+     'I       ' + foo_file_path  + '\n',])
+  svntest.actions.run_and_verify_svn(None, expected_output, [], 'st',
+                                     '--no-ignore', wc_dir)
+
+  # Perform the add with the --force flag, targeting the root of the WC.
+  ### Note: You have to be inside the working copy or else Subversion
+  ### will think you're trying to add the working copy to its parent
+  ### directory, and will (possibly, if the parent directory isn't
+  ### versioned) fail -- see also schedule_tests.py 11 "'svn add'
+  ### should traverse already-versioned dirs"
+  saved_wd = os.getcwd()
+  os.chdir(sbox.wc_dir)
+  expected = svntest.verify.UnorderedOutput(
+    ['A         ' + 'ADD-ME-DIR-X\n',
+     'A         ' + os.path.join('A', 'ADD-ME-DIR-Y.doo') + '\n',
+     'A         ' + os.path.join('A', 'D', 'G', 'ADD-ME-DIR-Z.doo') + '\n'])
+  svntest.actions.run_and_verify_svn("Adds in spite of ignores", expected,
+                                     [], 'add', '.', '--force',
+                                     '--config-dir', config_dir)
+  os.chdir(saved_wd)
+
+  # Now revert and try the add with the --no-ignore flag, only the
+  # svn:inheritable-ignores should be enforced.
+  svntest.actions.run_and_verify_svn(None, None, [], 'revert', wc_dir, '-R')
+  saved_wd = os.getcwd()
+  os.chdir(sbox.wc_dir)
+  expected = svntest.verify.UnorderedOutput(
+    ['A         ' + 'ADD-ME-DIR-X\n',
+     'A         ' + os.path.join('A', 'ADD-ME-DIR-Y.doo') + '\n',
+     'A         ' + os.path.join('A', 'D', 'G', 'ADD-ME-DIR-Z.doo') + '\n',
+     'A         ' + os.path.join('ADD-ME-DIR-X', 'ignore-me-file.boo') + '\n',
+     'A         ' + 'IGNORE-ME-DIR.boo' + '\n',
+     'A         ' + os.path.join('IGNORE-ME-DIR.boo',
+                                 'IGNORE-ME-DIR.goo') + '\n',
+     'A         ' + os.path.join('A', 'B', 'E', 'IGNORE-ME-DIR.foo') + '\n',
+     'A         ' + os.path.join('A', 'B', 'E', 'ignore-me-file.foo') + '\n',
+     'A         ' + os.path.join('A', 'D', 'G', 'ignore-me-file.goo') + '\n'])
+  svntest.actions.run_and_verify_svn("Adds in spite of ignores", expected,
+                                     [], 'add', '.', '--force','--no-ignore',
+                                     '--config-dir', config_dir)
+
 ########################################################################
 # Run the tests
 
@@ -2549,6 +2712,7 @@ test_list = [ None,
               propget_redirection,
               file_matching_dir_prop_reject,
               pristine_props_listed,
+              inheritable_ignores,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/svnadmin_tests.py?rev=1425690&r1=1425689&r2=1425690&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/svnadmin_tests.py Mon Dec 24 22:47:14 2012
@@ -78,6 +78,12 @@ def check_hotcopy_fsfs(src, dst):
                                 "source" % src_dirent)
       # Compare all files in this directory
       for src_file in src_files:
+        # Exclude temporary files
+        if src_file == 'rev-prop-atomicsShm':
+          continue
+        if src_file == 'rev-prop-atomicsMutex':
+          continue
+
         src_path = os.path.join(src_dirpath, src_file)
         dst_path = os.path.join(dst_dirpath, src_file)
         if not os.path.isfile(dst_path):

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/main.py?rev=1425690&r1=1425689&r2=1425690&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/main.py Mon Dec 24 22:47:14 2012
@@ -174,6 +174,12 @@ work_dir = "svn-test-work"
 # Constant for the merge info property.
 SVN_PROP_MERGEINFO = "svn:mergeinfo"
 
+# Constant for the inheritabled auto-props property.
+SVN_PROP_INHERITABLE_AUTOPROPS = "svn:inheritable-auto-props"
+
+# Constant for the inheritabled ignores property.
+SVN_PROP_INHERITABLE_IGNORES = "svn:inheritable-ignores"
+
 # Where we want all the repositories and working copies to live.
 # Each test will have its own!
 general_repo_dir = os.path.join(work_dir, "repositories")
@@ -952,12 +958,16 @@ def copy_repos(src_path, dst_path, head_
 
   dump_re = re.compile(r'^\* Dumped revision (\d+)\.\r?$')
   expect_revision = 0
+  dump_failed = False
   for dump_line in dump_stderr:
     match = dump_re.match(dump_line)
     if not match or match.group(1) != str(expect_revision):
       logger.warn('ERROR:  dump failed: %s', dump_line.strip())
-      raise SVNRepositoryCopyFailure
-    expect_revision += 1
+      dump_failed = True
+    else:
+      expect_revision += 1
+  if dump_failed:
+    raise SVNRepositoryCopyFailure
   if expect_revision != head_revision + 1:
     logger.warn('ERROR:  dump failed; did not see revision %s', head_revision)
     raise SVNRepositoryCopyFailure
@@ -1299,7 +1309,8 @@ class TestRunner:
 
   def list(self, milestones_dict=None):
     """Print test doc strings.  MILESTONES_DICT is an optional mapping
-    of issue numbers to target milestones."""
+    of issue numbers to an list containing target milestones and who
+    the issue is assigned to."""
     if options.mode_filter.upper() == 'ALL' \
        or options.mode_filter.upper() == self.pred.list_mode().upper() \
        or (options.mode_filter.upper() == 'PASS' \
@@ -1309,6 +1320,7 @@ class TestRunner:
       if self.pred.issues:
         if not options.milestone_filter or milestones_dict is None:
           issues = self.pred.issues
+          tail += " [%s]" % ','.join(['#%s' % str(i) for i in issues])
         else: # Limit listing by requested target milestone(s).
           filter_issues = []
           matches_filter = False
@@ -1317,13 +1329,16 @@ class TestRunner:
           # If any one of them matches the MILESTONE_FILTER then we'll print
           # them all.
           for issue in self.pred.issues:
-            # A safe starting assumption.
+            # Some safe starting assumptions.
             milestone = 'unknown'
+            assigned_to = 'unknown'
             if milestones_dict:
               if milestones_dict.has_key(str(issue)):
-                milestone = milestones_dict[str(issue)]
+                milestone = milestones_dict[str(issue)][0]
+                assigned_to = milestones_dict[str(issue)][1]
 
-            filter_issues.append(str(issue) + '(' + milestone + ')')
+            filter_issues.append(
+              str(issue) + '(' + milestone + '/' + assigned_to + ')')
             pattern = re.compile(options.milestone_filter)
             if pattern.match(milestone):
               matches_filter = True
@@ -1331,9 +1346,12 @@ class TestRunner:
           # Did at least one of the associated issues meet our filter?
           if matches_filter:
             issues = filter_issues
-
-        tail += " [%s]" % ','.join(['#%s' % str(i) for i in issues])
-
+          # Wrap the issue#/target-milestone/assigned-to string
+          # to the next line and add a line break to enhance
+          # readability.
+          tail += "\n               %s" % '\n               '.join(
+            ['#%s' % str(i) for i in issues])
+          tail += '\n'
       # If there is no filter or this test made if through
       # the filter then print it!
       if options.milestone_filter is None or len(issues):
@@ -1670,7 +1688,12 @@ def run_tests(test_list, serial_only = F
 
   sys.exit(execute_tests(test_list, serial_only))
 
-def get_target_milestones_for_issues(issue_numbers):
+def get_issue_details(issue_numbers):
+  """For each issue number in ISSUE_NUMBERS query the issue
+     tracker and determine what the target milestone is and
+     who the issue is assigned to.  Return this information
+     as a dictionary mapping issue numbers to a list
+     [target_milestone, assigned_to]"""
   xml_url = "http://subversion.tigris.org/issues/xml.cgi?id="
   issue_dict = {}
 
@@ -1698,14 +1721,17 @@ def get_target_milestones_for_issues(iss
     xmldoc = xml.dom.minidom.parse(issue_xml_f)
     issue_xml_f.close()
 
-    # Get the target milestone for each issue.
+    # For each issue: Get the target milestone and who
+    #                 the issue is assigned to.
     issue_element = xmldoc.getElementsByTagName('issue')
     for i in issue_element:
       issue_id_element = i.getElementsByTagName('issue_id')
       issue_id = issue_id_element[0].childNodes[0].nodeValue
       milestone_element = i.getElementsByTagName('target_milestone')
       milestone = milestone_element[0].childNodes[0].nodeValue
-      issue_dict[issue_id] = milestone
+      assignment_element = i.getElementsByTagName('assigned_to')
+      assignment = assignment_element[0].childNodes[0].nodeValue
+      issue_dict[issue_id] = [milestone, assignment]
   except:
     print "ERROR: Unable to parse target milestones from issue tracker"
     raise
@@ -1898,10 +1924,13 @@ def execute_tests(test_list, serial_only
                 options.mode_filter.upper() == test_mode or
                 (options.mode_filter.upper() == 'PASS' and test_mode == '')):
               issues_dict[issue]=issue
-      milestones_dict = get_target_milestones_for_issues(issues_dict.keys())
+      milestones_dict = get_issue_details(issues_dict.keys())
+
+    header = "Test #  Mode   Test Description\n"
+    if options.milestone_filter:
+      header += "               Issue#(Target Mileston/Assigned To)\n"
+    header += "------  -----  ----------------"
 
-    header = "Test #  Mode   Test Description\n" \
-             "------  -----  ----------------"
     printed_header = False
     for testnum in testnums:
       test_mode = TestRunner(test_list[testnum], testnum).get_mode().upper()

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/update_tests.py?rev=1425690&r1=1425689&r2=1425690&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/update_tests.py Mon Dec 24 22:47:14 2012
@@ -5514,9 +5514,12 @@ def update_to_HEAD_plus_1(sbox):
   sbox.build(read_only = True)
   wc_dir = sbox.wc_dir
 
+  # Attempt the update, expecting an error.  (Sometimes the error
+  # strings says "No such revision", sometimes "No such target
+  # revision".)
   svntest.actions.run_and_verify_update(wc_dir,
                                         None, None, None,
-                                        ".*No such revision",
+                                        "E160006.*No such.*revision",
                                         None, None,
                                         None, None, None, wc_dir, '-r', '2')
 

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/upgrade_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/upgrade_tests.py?rev=1425690&r1=1425689&r2=1425690&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/upgrade_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/upgrade_tests.py Mon Dec 24 22:47:14 2012
@@ -50,7 +50,7 @@ Issues = svntest.testcase.Issues_deco
 Issue = svntest.testcase.Issue_deco
 Wimp = svntest.testcase.Wimp_deco
 
-wc_is_too_old_regex = (".*Working copy '.*' is too old \(format \d+.*\).*")
+wc_is_too_old_regex = (".*is too old \(format \d+.*\).*")
 
 
 def get_current_format():
@@ -258,28 +258,29 @@ def basic_upgrade(sbox):
   replace_sbox_with_tarfile(sbox, 'basic_upgrade.tar.bz2')
 
   # Attempt to use the working copy, this should give an error
-  expected_stderr = wc_is_too_old_regex
-  svntest.actions.run_and_verify_svn(None, None, expected_stderr,
+  svntest.actions.run_and_verify_svn(None, None, wc_is_too_old_regex,
                                      'info', sbox.wc_dir)
 
-
-  # Upgrade on something not a versioned dir gives a 'not directory' error.
-  not_dir = ".*E155019.*%s'.*directory"
+  # Upgrade on something anywhere within a versioned subdir gives a
+  # 'not a working copy root' error. Upgrade on something without any
+  # versioned parent gives a 'not a working copy' error.
+  # Both cases use the same error code.
+  not_wc = ".*(E155007|E155019).*%s'.*not a working copy.*"
   os.mkdir(sbox.ospath('X'))
-  svntest.actions.run_and_verify_svn(None, None, not_dir % 'X',
+  svntest.actions.run_and_verify_svn(None, None, not_wc % 'X',
                                      'upgrade', sbox.ospath('X'))
 
-  svntest.actions.run_and_verify_svn(None, None, not_dir % 'Y',
+  # Upgrade on a non-existent subdir within an old WC gives a
+  # 'not a working copy' error.
+  svntest.actions.run_and_verify_svn(None, None, not_wc % 'Y',
                                      'upgrade', sbox.ospath('Y'))
-
-  svntest.actions.run_and_verify_svn(None, None, not_dir %
-                                        re.escape(sbox.ospath('A/mu')),
+  # Upgrade on a versioned file within an old WC gives a
+  # 'not a working copy' error.
+  svntest.actions.run_and_verify_svn(None, None, not_wc % 'mu',
                                      'upgrade', sbox.ospath('A/mu'))
-
-  # Upgrade on a versioned subdir gives a 'not root' error.
-  not_root = ".*E155019.*%s'.*root.*%s'"
-  svntest.actions.run_and_verify_svn(None, None, not_root %
-                                        ('A', re.escape(sbox.wc_dir)),
+  # Upgrade on a versioned dir within an old WC gives a
+  # 'not a working copy' error.
+  svntest.actions.run_and_verify_svn(None, None, not_wc % 'A',
                                      'upgrade', sbox.ospath('A'))
 
   # Now upgrade the working copy
@@ -794,10 +795,9 @@ def upgrade_tree_conflict_data(sbox):
   no_actual_node(sbox, 'A/D/G/tau')
 
   # While the upgrade from f20 to f21 will work the upgrade from f22
-  # to f23 will not, since working nodes are present, so the
-  # auto-upgrade will fail.  If this happens we cannot use the
-  # Subversion libraries to query the working copy.
-  exit_code, output, errput = svntest.main.run_svn('format 22', 'st', wc_dir)
+  # to f23 will not, since working nodes are present.
+  exit_code, output, errput = svntest.main.run_svn('format 22', 'upgrade',
+                                                    wc_dir)
 
   if not exit_code:
     run_and_verify_status_no_server(wc_dir, expected_status)
@@ -984,8 +984,8 @@ def upgrade_from_format_28(sbox):
   assert os.path.exists(old_pristine_path)
   assert not os.path.exists(new_pristine_path)
 
-  # Touch the WC to auto-upgrade it
-  svntest.actions.run_and_verify_svn(None, None, [], 'info', sbox.wc_dir)
+  # Upgrade the WC
+  svntest.actions.run_and_verify_svn(None, None, [], 'upgrade', sbox.wc_dir)
 
   assert not os.path.exists(old_pristine_path)
   assert os.path.exists(new_pristine_path)

Modified: subversion/branches/javahl-ra/subversion/tests/libsvn_subr/named_atomic-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/libsvn_subr/named_atomic-test.c?rev=1425690&r1=1425689&r2=1425690&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/libsvn_subr/named_atomic-test.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/libsvn_subr/named_atomic-test.c Mon Dec 24 22:47:14 2012
@@ -112,6 +112,20 @@ proc_found(const char *proc, apr_pool_t 
   return result == svn_tristate_true;
 }
 
+/* Remove temporary files from disk.
+ */
+static apr_status_t
+cleanup_test_shm(void *arg)
+{
+  apr_pool_t *pool = arg;
+  
+  svn_error_clear(svn_atomic_namespace__cleanup(name_namespace, pool));
+  svn_error_clear(svn_atomic_namespace__cleanup(name_namespace1, pool));
+  svn_error_clear(svn_atomic_namespace__cleanup(name_namespace2, pool));
+
+  return 0;
+}
+
 /* Bring shared memory to a defined state. This is very useful in case of
  * lingering problems from previous tests or test runs.
  */
@@ -150,6 +164,11 @@ init_test_shm(apr_pool_t *pool)
     return svn_error_wrap_apr(SVN_ERR_TEST_SKIPPED,
                               "user has insufficient privileges");
 
+  /* destroy temp files after usage */
+
+  apr_pool_cleanup_register(pool, pool,
+                            cleanup_test_shm, apr_pool_cleanup_null);
+
   /* get the two I/O atomics for this thread */
   SVN_ERR(svn_atomic_namespace__create(&ns, name_namespace, scratch));
   SVN_ERR(svn_named_atomic__get(&atomic, ns, ATOMIC_NAME, TRUE));

Modified: subversion/branches/javahl-ra/subversion/tests/libsvn_wc/conflict-data-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/libsvn_wc/conflict-data-test.c?rev=1425690&r1=1425689&r2=1425690&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/libsvn_wc/conflict-data-test.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/libsvn_wc/conflict-data-test.c Mon Dec 24 22:47:14 2012
@@ -113,10 +113,11 @@ tree_conflict_create(const char *local_a
   svn_wc_conflict_version_t *left, *right;
   svn_wc_conflict_description2_t *conflict;
 
-  left = svn_wc_conflict_version_create(left_repo, left_path, left_revnum,
-                                        left_kind, result_pool);
-  right = svn_wc_conflict_version_create(right_repo, right_path, right_revnum,
-                                         right_kind, result_pool);
+  left = svn_wc_conflict_version_create2(left_repo, NULL, left_path,
+                                         left_revnum, left_kind, result_pool);
+  right = svn_wc_conflict_version_create2(right_repo, NULL, right_path,
+                                          right_revnum, right_kind,
+                                          result_pool);
   conflict = svn_wc_conflict_description_create_tree2(
                     local_abspath, node_kind, operation,
                     left, right, result_pool);

Modified: subversion/branches/javahl-ra/subversion/tests/libsvn_wc/db-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/libsvn_wc/db-test.c?rev=1425690&r1=1425689&r2=1425690&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/libsvn_wc/db-test.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/libsvn_wc/db-test.c Mon Dec 24 22:47:14 2012
@@ -340,7 +340,7 @@ create_open(svn_wc__db_t **db,
   SVN_ERR(svn_dirent_get_absolute(local_abspath,
                                   svn_dirent_join("fake-wc", subdir, pool),
                                   pool));
-  SVN_ERR(svn_wc__db_open(db, NULL, TRUE, TRUE, pool, pool));
+  SVN_ERR(svn_wc__db_open(db, NULL, FALSE, TRUE, pool, pool));
   SVN_ERR(svn_test__create_fake_wc(*local_abspath, TESTING_DATA, pool, pool));
 
   return SVN_NO_ERROR;

Modified: subversion/branches/javahl-ra/subversion/tests/libsvn_wc/entries-compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/libsvn_wc/entries-compat.c?rev=1425690&r1=1425689&r2=1425690&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/libsvn_wc/entries-compat.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/libsvn_wc/entries-compat.c Mon Dec 24 22:47:14 2012
@@ -332,7 +332,7 @@ create_open(svn_wc__db_t **db,
                                   pool));
   SVN_ERR(svn_wc__db_open(db,
                           NULL /* config */,
-                          TRUE /* auto_upgrade */,
+                          FALSE /* auto_upgrade */,
                           TRUE /* enforce_empty_wq */,
                           pool, pool));
 

Modified: subversion/branches/javahl-ra/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/libsvn_wc/op-depth-test.c?rev=1425690&r1=1425689&r2=1425690&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/libsvn_wc/op-depth-test.c Mon Dec 24 22:47:14 2012
@@ -262,6 +262,17 @@ wc_resolved(svn_test__sandbox_t *b, cons
 }
 
 static svn_error_t *
+wc_resolve(svn_test__sandbox_t *b, const char *path)
+{
+  svn_client_ctx_t *ctx;
+
+  SVN_ERR(svn_client_create_context(&ctx, b->pool));
+  return svn_client_resolve(wc_path(b, path), svn_depth_infinity,
+                            svn_wc_conflict_choose_mine_conflict,
+                            ctx, b->pool);
+}
+
+static svn_error_t *
 wc_move(svn_test__sandbox_t *b, const char *src, const char *dst)
 {
   svn_client_ctx_t *ctx;
@@ -4528,8 +4539,13 @@ move_update(const svn_test_opts_t *opts,
 
   SVN_ERR(wc_mkdir(&b, "A"));
   SVN_ERR(wc_mkdir(&b, "A/B"));
+  file_write(&b, "A/B/f", "r1 content\n");
+  SVN_ERR(wc_add(&b, "A/B/f"));
   SVN_ERR(wc_commit(&b, ""));
-  SVN_ERR(wc_mkdir(&b, "A/B/C"));
+  file_write(&b, "A/B/f", "r1 content\nr2 content\n");
+  SVN_ERR(wc_commit(&b, ""));
+  file_write(&b, "A/B/g", "r3 content\n");
+  SVN_ERR(wc_add(&b, "A/B/g"));
   SVN_ERR(wc_commit(&b, ""));
   SVN_ERR(wc_update(&b, "", 1));
 
@@ -4540,49 +4556,94 @@ move_update(const svn_test_opts_t *opts,
       {0, "",         "normal",       1, ""},
       {0, "A",        "normal",       1, "A"},
       {0, "A/B",      "normal",       1, "A/B"},
+      {0, "A/B/f",    "normal",       1, "A/B/f"},
       {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
       {1, "A/B",      "base-deleted", NO_COPY_FROM},
+      {1, "A/B/f",    "base-deleted", NO_COPY_FROM},
       {1, "A2",       "normal",       1, "A", MOVED_HERE},
       {1, "A2/B",     "normal",       1, "A/B", MOVED_HERE},
+      {1, "A2/B/f",   "normal",       1, "A/B/f", MOVED_HERE},
       {0}
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
 
-  /* Update A/B makes A2 a mixed-revision copy */
-  SVN_ERR(wc_update(&b, "A/B", 2));
+  /* Update causes a tree-conflict on A due to incoming text-change. */
+  SVN_ERR(wc_update(&b, "", 2));
   {
     nodes_row_t nodes[] = {
-      {0, "",         "normal",       1, ""},
-      {0, "A",        "normal",       1, "A"},
+      {0, "",         "normal",       2, ""},
+      {0, "A",        "normal",       2, "A"},
       {0, "A/B",      "normal",       2, "A/B"},
-      {0, "A/B/C",    "normal",       2, "A/B/C"},
+      {0, "A/B/f",    "normal",       2, "A/B/f"},
       {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
       {1, "A/B",      "base-deleted", NO_COPY_FROM},
-      {1, "A/B/C",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/f",    "base-deleted", NO_COPY_FROM},
       {1, "A2",       "normal",       1, "A", MOVED_HERE},
-      {1, "A2/B",     "not-present",  2, "A/B"},                 /* XFAIL */
-      {2, "A2/B",     "normal",       2, "A/B", MOVED_HERE},
-      {2, "A2/B/C",   "normal",       2, "A/B/C", MOVED_HERE},
+      {1, "A2/B",     "normal",       1, "A/B", MOVED_HERE},
+      {1, "A2/B/f",   "normal",       1, "A/B/f", MOVED_HERE},
       {0}
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
 
-  /* Update A makes A2 back into a single-revision copy */
-  SVN_ERR(wc_update(&b, "A", 2));
+  /* Resolve should update the move. */
+  SVN_ERR(wc_resolve(&b, "A"));
   {
     nodes_row_t nodes[] = {
-      {0, "",         "normal",       1, ""},
+      {0, "",         "normal",       2, ""},
       {0, "A",        "normal",       2, "A"},
       {0, "A/B",      "normal",       2, "A/B"},
-      {0, "A/B/C",    "normal",       2, "A/B/C"},
+      {0, "A/B/f",    "normal",       2, "A/B/f"},
+      {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",      "base-deleted", NO_COPY_FROM},
+      {1, "A/B/f",    "base-deleted", NO_COPY_FROM},
+      {1, "A2",       "normal",       2, "A", MOVED_HERE},
+      {1, "A2/B",     "normal",       2, "A/B", MOVED_HERE},
+      {1, "A2/B/f",   "normal",       2, "A/B/f", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Update causes a tree-conflict on due to incoming add. */
+  SVN_ERR(wc_update(&b, "", 3));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       3, ""},
+      {0, "A",        "normal",       3, "A"},
+      {0, "A/B",      "normal",       3, "A/B"},
+      {0, "A/B/f",    "normal",       3, "A/B/f"},
+      {0, "A/B/g",    "normal",       3, "A/B/g"},
       {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
       {1, "A/B",      "base-deleted", NO_COPY_FROM},
-      {1, "A/B/C",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/f",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/g",    "base-deleted", NO_COPY_FROM},
       {1, "A2",       "normal",       2, "A", MOVED_HERE},
       {1, "A2/B",     "normal",       2, "A/B", MOVED_HERE},
-      {1, "A2/B/C",   "normal",       2, "A/B/C", MOVED_HERE},
+      {1, "A2/B/f",   "normal",       2, "A/B/f", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Are we going to handle this case? */
+  SVN_ERR(wc_resolve(&b, "A"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       3, ""},
+      {0, "A",        "normal",       3, "A"},
+      {0, "A/B",      "normal",       3, "A/B"},
+      {0, "A/B/f",    "normal",       3, "A/B/f"},
+      {0, "A/B/g",    "normal",       3, "A/B/g"},
+      {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",      "base-deleted", NO_COPY_FROM},
+      {1, "A/B/f",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/g",    "base-deleted", NO_COPY_FROM},
+      {1, "A2",       "normal",       3, "A", MOVED_HERE},
+      {1, "A2/B",     "normal",       3, "A/B", MOVED_HERE},
+      {1, "A2/B/f",   "normal",       3, "A/B/f", MOVED_HERE},
+      {1, "A2/B/g",   "normal",       3, "A/B/g", MOVED_HERE},
       {0}
     };
     SVN_ERR(check_db_rows(&b, "", nodes));

Modified: subversion/branches/javahl-ra/subversion/tests/libsvn_wc/utils.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/libsvn_wc/utils.c?rev=1425690&r1=1425689&r2=1425690&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/libsvn_wc/utils.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/libsvn_wc/utils.c Mon Dec 24 22:47:14 2012
@@ -85,7 +85,7 @@ create_repos_and_wc(const char **repos_u
     svn_client_ctx_t *ctx;
     svn_opt_revision_t head_rev = { svn_opt_revision_head, {0} };
 
-    SVN_ERR(svn_client_create_context(&ctx, subpool));
+    SVN_ERR(svn_client_create_context2(&ctx, NULL, subpool));
     SVN_ERR(svn_dirent_get_absolute(wc_abspath, wc_path, pool));
     SVN_ERR(svn_client_checkout3(NULL, *repos_url, *wc_abspath,
                                  &head_rev, &head_rev, svn_depth_infinity,

Modified: subversion/branches/javahl-ra/tools/client-side/svn-bench/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/tools/client-side/svn-bench/main.c?rev=1425690&r1=1425689&r2=1425690&view=diff
==============================================================================
--- subversion/branches/javahl-ra/tools/client-side/svn-bench/main.c (original)
+++ subversion/branches/javahl-ra/tools/client-side/svn-bench/main.c Mon Dec 24 22:47:14 2012
@@ -783,7 +783,7 @@ sub_main(int argc, const char *argv[], a
 
   /* Create a client context object. */
   command_baton.opt_state = &opt_state;
-  SVN_INT_ERR(svn_client_create_context(&ctx, pool));
+  SVN_INT_ERR(svn_client_create_context2(&ctx, NULL, pool));
   command_baton.ctx = ctx;
 
   /* Only a few commands can accept a revision range; the rest can take at

Modified: subversion/branches/javahl-ra/tools/client-side/svn-bench/null-log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/tools/client-side/svn-bench/null-log-cmd.c?rev=1425690&r1=1425689&r2=1425690&view=diff
==============================================================================
--- subversion/branches/javahl-ra/tools/client-side/svn-bench/null-log-cmd.c (original)
+++ subversion/branches/javahl-ra/tools/client-side/svn-bench/null-log-cmd.c Mon Dec 24 22:47:14 2012
@@ -215,26 +215,28 @@ svn_cl__null_log(apr_getopt_t *os,
                           pool));
 
   if (!opt_state->quiet)
-    if (opt_state->use_merge_history)
-      SVN_ERR(svn_cmdline_printf(pool,
-                                _("%15s revisions, %15s merged in %s merges\n"
-                                  "%15s msg lines, %15s in merged revisions\n"
-                                  "%15s changes,   %15s in merged revisions\n"),
-                                svn__ui64toa_sep(lb.revisions, ',', pool),
-                                svn__ui64toa_sep(lb.merged_revs, ',', pool),
-                                svn__ui64toa_sep(lb.merges, ',', pool),
-                                svn__ui64toa_sep(lb.message_lines, ',', pool),
-                                svn__ui64toa_sep(lb.merged_message_lines, ',', pool),
-                                svn__ui64toa_sep(lb.changes, ',', pool),
-                                svn__ui64toa_sep(lb.merged_changes, ',', pool)));
-    else
-      SVN_ERR(svn_cmdline_printf(pool,
-                                _("%15s revisions\n"
-                                  "%15s msg lines\n"
-                                  "%15s changes\n"),
-                                svn__ui64toa_sep(lb.revisions, ',', pool),
-                                svn__ui64toa_sep(lb.message_lines, ',', pool),
-                                svn__ui64toa_sep(lb.changes, ',', pool)));
+    {
+      if (opt_state->use_merge_history)
+        SVN_ERR(svn_cmdline_printf(pool,
+                      _("%15s revisions, %15s merged in %s merges\n"
+                        "%15s msg lines, %15s in merged revisions\n"
+                        "%15s changes,   %15s in merged revisions\n"),
+                      svn__ui64toa_sep(lb.revisions, ',', pool),
+                      svn__ui64toa_sep(lb.merged_revs, ',', pool),
+                      svn__ui64toa_sep(lb.merges, ',', pool),
+                      svn__ui64toa_sep(lb.message_lines, ',', pool),
+                      svn__ui64toa_sep(lb.merged_message_lines, ',', pool),
+                      svn__ui64toa_sep(lb.changes, ',', pool),
+                      svn__ui64toa_sep(lb.merged_changes, ',', pool)));
+      else
+        SVN_ERR(svn_cmdline_printf(pool,
+                      _("%15s revisions\n"
+                        "%15s msg lines\n"
+                        "%15s changes\n"),
+                      svn__ui64toa_sep(lb.revisions, ',', pool),
+                      svn__ui64toa_sep(lb.message_lines, ',', pool),
+                      svn__ui64toa_sep(lb.changes, ',', pool)));
+    }
 
   return SVN_NO_ERROR;
 }