Modified: 
subversion/branches/fsfs-format7/subversion/tests/cmdline/merge_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/merge_tests.py?rev=1483586&r1=1483585&r2=1483586&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/merge_tests.py 
(original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/merge_tests.py 
Thu May 16 22:03:58 2013
@@ -18194,7 +18194,7 @@ def merge_target_selection(sbox):
   svntest.actions.run_and_verify_svn(None, expected_output, [],
                                      'merge', '^/dir', '-c', '4', 
'binary-file')
 
-@Issue(3405)
+@Issue(3405) # seems to be the wrong issue number
 def merge_properties_on_adds(sbox):
   "merged directory properties are added"
 
@@ -19005,6 +19005,158 @@ def conflicted_split_merge_with_resolve(
                                   prop_resolved=1, expect_error=False)
     try_merge(target, 8,  ['-r6:3', '-r10:7'], expect, '7')
 
+#----------------------------------------------------------------------
+# Test for issue 4367 'merge to shallow WC, repeat merge to infinite
+# depth WC is broken'.
+@SkipUnless(server_has_mergeinfo)
+@Issues(4367)
+@XFail()
+def merge_to_empty_target_merge_to_infinite_target(sbox):
+  "repeat merge to infinite depth WC conflicts"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  wc_disk, wc_status = set_up_branch(sbox, branch_only=True)
+  A_COPY_path = sbox.ospath('A_COPY')
+  C_COPY_path = sbox.ospath('A_COPY/C')
+  E_path = sbox.ospath('A/B/E')
+  J_path = sbox.ospath('A/C/J')
+  K_path = sbox.ospath('A/C/J/K')
+  nu1_path = sbox.ospath('A/C/J/nu1')
+  nu2_path = sbox.ospath('A/C/J/K/nu2')
+  L_path = sbox.ospath('A/B/L')
+  nu3_path = sbox.ospath('A/B/L/nu3')
+
+  B1_path = sbox.ospath('A/B/B1')
+  B1a_path = sbox.ospath('A/B/B1/B1a')
+  test1_path = sbox.ospath('A/B/B1/test.txt')
+  test2_path = sbox.ospath('A/B/B1/B1a/test.txt')
+
+  C1_path = sbox.ospath('A/C/C1')
+  test3_path = sbox.ospath('A/C/C1/test.txt')
+  
+  # r3 - Add some subtrees:
+  #   A /A/B/B1
+  #   A /A/B/B1/B1a
+  #   A /A/B/B1/B1a/test.txt
+  #   A /A/B/B1/test.txt
+  svntest.main.run_svn(None, 'mkdir', B1_path)
+  svntest.main.run_svn(None, 'mkdir', B1a_path)
+  svntest.main.file_append(test1_path, "New file.\n")
+  svntest.main.file_append(test2_path, "New file.\n")
+  svntest.main.run_svn(None, 'add', test1_path, test2_path)
+  sbox.simple_commit()
+
+  # r4 - Add some another subtree.
+  #   A /A/C/C1
+  #   A /A/C/C1/test.txt
+  svntest.main.run_svn(None, 'mkdir', C1_path)
+  svntest.main.file_append(test3_path, "New file.\n")
+  svntest.main.run_svn(None, 'add', test3_path)
+  sbox.simple_commit()
+
+  # r5 - Delete part of the subtree added in r3.
+  #  D /A/B/B1/B1a
+  svntest.main.run_svn(None, 'del', B1a_path)
+  sbox.simple_commit()
+
+  # r6 - Set depth of A_COPY to empty, merge all available revs from ^/A.
+  svntest.actions.run_and_verify_svn(None, None, [], 'up',
+                                     '--set-depth=empty', A_COPY_path)
+  svntest.actions.run_and_verify_svn(None, None, [], 'up',
+                                     '--set-depth=infinity', C_COPY_path)
+  svntest.actions.run_and_verify_svn(None, None, [], 'merge', '^/A',
+                                     A_COPY_path)
+  sbox.simple_commit()
+
+  # Update A_COPY back to depth infinity and retry the prior merge.
+  svntest.actions.run_and_verify_svn(None, None, [], 'up',
+                                     '--set-depth=infinity', A_COPY_path)
+
+  expected_output = wc.State(A_COPY_path, {
+    'B/B1'              : Item(status='A '),
+    'B/B1/test.txt'     : Item(status='A '),
+    'B/B1/B1a'          : Item(status='A '),
+    'B/B1/B1a/test.txt' : Item(status='A '),
+    'B/B1/B1a'          : Item(status='D '),
+    })
+  expected_mergeinfo_output = wc.State(A_COPY_path, {
+    ''  : Item(status=' U'),
+    'B' : Item(status=' G'),
+    })
+  expected_elision_output = wc.State(A_COPY_path, {
+    'B' : Item(status=' U'),
+    })
+  expected_status = wc.State(A_COPY_path, {
+    ''                  : Item(status=' M'),
+    'B'                 : Item(status='  '),
+    'mu'                : Item(status='  '),
+    'B/B1'              : Item(status='A ', copied='+'),
+    'B/B1/test.txt'     : Item(status='  ', copied='+'),
+    'B/B1/B1a'          : Item(status='D ', copied='+'),
+    'B/B1/B1a/test.txt' : Item(status='D ', copied='+'),
+    'B/E'               : Item(status='  '),
+    'B/E/alpha'         : Item(status='  '),
+    'B/E/beta'          : Item(status='  '),
+    'B/lambda'          : Item(status='  '),
+    'B/F'               : Item(status='  '),
+    'C'                 : Item(status='  '),
+    'C/C1'              : Item(status='  '),
+    'C/C1/test.txt'     : Item(status='  '),
+    'D'                 : Item(status='  '),
+    'D/G'               : Item(status='  '),
+    'D/G/pi'            : Item(status='  '),
+    'D/G/rho'           : Item(status='  '),
+    'D/G/tau'           : Item(status='  '),
+    'D/gamma'           : Item(status='  '),
+    'D/H'               : Item(status='  '),
+    'D/H/chi'           : Item(status='  '),
+    'D/H/psi'           : Item(status='  '),
+    'D/H/omega'         : Item(status='  '),
+    })
+  expected_status.tweak(wc_rev=6)
+  expected_status.tweak('B/B1', 'B/B1/test.txt', 'B/B1/B1a',
+                        'B/B1/B1a/test.txt', wc_rev='-')
+  expected_disk = wc.State('', {
+    ''              : Item(props={SVN_PROP_MERGEINFO : '/A:2-6'}),
+    'B'             : Item(),
+    'mu'            : Item("This is the file 'mu'.\n"),
+    'B/B1'          : Item(),
+    'B/B1/test.txt' : Item("New file.\n"),
+    'B/E'           : Item(),
+    'B/E/alpha'     : Item("This is the file 'alpha'.\n"),
+    'B/E/beta'      : Item("This is the file 'beta'.\n"),
+    'B/lambda'      : Item("This is the file 'lambda'.\n"),
+    'B/F'           : Item(),
+    'C'             : Item(props={SVN_PROP_MERGEINFO : '/A/C:2-5'}),
+    'C/C1'          : Item(),
+    'C/C1/test.txt' : Item("New file.\n"),
+    'D'             : Item(),
+    'D/G'           : Item(),
+    'D/G/pi'        : Item("This is the file 'pi'.\n"),
+    'D/G/rho'       : Item("This is the file 'rho'.\n"),
+    'D/G/tau'       : Item("This is the file 'tau'.\n"),
+    'D/gamma'       : Item("This is the file 'gamma'.\n"),
+    'D/H'           : Item(),
+    'D/H/chi'       : Item("This is the file 'chi'.\n"),
+    'D/H/psi'       : Item("This is the file 'psi'.\n"),
+    'D/H/omega'     : Item("This is the file 'omega'.\n"),
+    })
+  expected_skip = wc.State(A_COPY_path, { })
+  svntest.actions.run_and_verify_merge(A_COPY_path, None, None,
+                                       sbox.repo_url + '/A', None,
+                                       expected_output,
+                                       expected_mergeinfo_output,
+                                       expected_elision_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, None, None, None,
+                                       None, 1, 0)
+
+  # Commit the merge.
+  sbox.simple_commit()
+
 ########################################################################
 # Run the tests
 
@@ -19149,6 +19301,7 @@ test_list = [ None,
               multiple_editor_drive_merge_notifications,
               single_editor_drive_merge_notifications,
               conflicted_split_merge_with_resolve,
+              merge_to_empty_target_merge_to_infinite_target,
              ]
 
 if __name__ == '__main__':

Modified: 
subversion/branches/fsfs-format7/subversion/tests/cmdline/svntest/sandbox.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/svntest/sandbox.py?rev=1483586&r1=1483585&r2=1483586&view=diff
==============================================================================
--- 
subversion/branches/fsfs-format7/subversion/tests/cmdline/svntest/sandbox.py 
(original)
+++ 
subversion/branches/fsfs-format7/subversion/tests/cmdline/svntest/sandbox.py 
Thu May 16 22:03:58 2013
@@ -389,7 +389,7 @@ def _cleanup_test_path(path, retrying=Fa
     logger.info("CLEANUP: %s", path)
 
   try:
-    svntest.main.safe_rmtree(path)
+    svntest.main.safe_rmtree(path, retrying)
   except:
     logger.info("WARNING: cleanup failed, will try again later")
     _deferred_test_paths.append(path)

Modified: 
subversion/branches/fsfs-format7/subversion/tests/cmdline/upgrade_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/upgrade_tests.py?rev=1483586&r1=1483585&r2=1483586&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/upgrade_tests.py 
(original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/upgrade_tests.py 
Thu May 16 22:03:58 2013
@@ -1408,6 +1408,23 @@ def iprops_upgrade1_6(sbox):
                     'iprops_upgrade_root1_6.tar.bz2',
                     sbox)
 
+def changelist_upgrade_1_6(sbox):
+  "upgrade from 1.6 with changelist"
+
+  sbox.build(create_wc = False)
+  svntest.main.run_svnadmin('setuuid', sbox.repo_dir,
+                            'aa4c97bd-2e1a-4e55-a1e5-3db22cff2673')
+  replace_sbox_with_tarfile(sbox, 'changelist_upgrade_1_6.tar.bz2')
+  svntest.actions.run_and_verify_svn(None, None, [], 'upgrade', sbox.wc_dir)
+
+  exit_code, output, errput = svntest.main.run_svn(None, 'info', sbox.wc_dir,
+                                                   '--depth', 'infinity',
+                                                   '--changelist', 'foo')
+  paths = [x for x in output if x[:6] == 'Path: ']
+  expected_paths = ['Path: %s\n' % sbox.ospath('A/D/gamma')]
+  if paths != expected_paths:
+    raise svntest.Failure("changelist not matched")
+
 ########################################################################
 # Run the tests
 
@@ -1462,6 +1479,7 @@ test_list = [ None,
               upgrade_from_1_7_conflict,
               iprops_upgrade,
               iprops_upgrade1_6,
+              changelist_upgrade_1_6,
              ]
 
 

Modified: 
subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/revision-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/revision-test.c?rev=1483586&r1=1483585&r2=1483586&view=diff
==============================================================================
--- 
subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/revision-test.c 
(original)
+++ 
subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/revision-test.c 
Thu May 16 22:03:58 2013
@@ -34,6 +34,12 @@ test_revnum_parse(apr_pool_t *pool)
     "",
     "abc",
     "-456",
+    "2147483648",
+    "4294967295",
+    "4300000000",
+    "00000000001",
+    "21474836470",
+    "999999999999999999999999",
     NULL
   };
 
@@ -41,6 +47,8 @@ test_revnum_parse(apr_pool_t *pool)
     "0",
     "12345",
     "12345ABC",
+    "0000000001",
+    "2147483647x",
     NULL
   };
 

Modified: 
subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/utf-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/utf-test.c?rev=1483586&r1=1483585&r2=1483586&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/utf-test.c 
(original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/utf-test.c 
Thu May 16 22:03:58 2013
@@ -495,6 +495,7 @@ test_utf_pattern_match(apr_pool_t *pool)
     {GLOB_MATCH, "te\xcc\xa7\xcc\x86st", "t\xe1\xb8\x9dst", NULL},
 
     {LIKE_FAIL,  "test", "test", "\xe1\xb8\x9d"}, /* escape char not ascii */
+    {LIKE_FAIL,  "test", "test", ""},             /* empty escape string */
 
     {LIKE_MATCH, "te#st",    "test",   "#"},
     {LIKE_FAIL,  "te#st",    "test",   NULL},

Modified: 
subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/conflict-data-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/conflict-data-test.c?rev=1483586&r1=1483585&r2=1483586&view=diff
==============================================================================
--- 
subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/conflict-data-test.c
 (original)
+++ 
subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/conflict-data-test.c
 Thu May 16 22:03:58 2013
@@ -740,7 +740,7 @@ test_prop_conflicts(const svn_test_opts_
   svn_error_t *err;
   const char *lock_abspath;
   test_prop_conflict_baton_t *b = apr_pcalloc(pool, sizeof(*b));
-  svn_wc_conflict_description2_t *desc = apr_pcalloc(pool, sizeof(*b));
+  svn_wc_conflict_description2_t *desc = apr_pcalloc(pool, sizeof(*desc));
 
   SVN_ERR(svn_test__sandbox_create(&sbox, "test_prop_conflicts", opts, pool));
 

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/db-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/db-test.c?rev=1483586&r1=1483585&r2=1483586&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/db-test.c 
(original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/db-test.c Thu 
May 16 22:03:58 2013
@@ -343,6 +343,8 @@ create_open(svn_wc__db_t **db,
   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));
 
+  svn_test_add_dir_cleanup(*local_abspath);
+
   return SVN_NO_ERROR;
 }
 

Modified: 
subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/entries-compat.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/entries-compat.c?rev=1483586&r1=1483585&r2=1483586&view=diff
==============================================================================
--- 
subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/entries-compat.c 
(original)
+++ 
subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/entries-compat.c 
Thu May 16 22:03:58 2013
@@ -336,6 +336,8 @@ create_open(svn_wc__db_t **db,
                           TRUE /* enforce_empty_wq */,
                           pool, pool));
 
+  svn_test_add_dir_cleanup(*local_abspath);
+
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/fsfs-format7/tools/dist/backport.pl
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/tools/dist/backport.pl?rev=1483586&r1=1483585&r2=1483586&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/tools/dist/backport.pl (original)
+++ subversion/branches/fsfs-format7/tools/dist/backport.pl Thu May 16 22:03:58 
2013
@@ -65,13 +65,17 @@ EOF
 
 sub prompt {
   local $\; # disable 'perl -l' effects
-  print "$_[0] ";
+  print "$_[0] "; shift;
+  my %args = @_;
 
+  die "$0: called prompt() in non-interactive mode!" if $YES;
   # TODO: this part was written by trial-and-error
   ReadMode 'cbreak';
   my $answer = (ReadKey 0);
   print $answer, "\n";
-  return ($answer =~ /^y/i) ? 1 : 0;
+  return $args{verbose}
+         ? $answer
+         : ($answer =~ /^y/i) ? 1 : 0;
 }
 
 sub merge {
@@ -243,9 +247,20 @@ sub handle_entry {
 
     if (prompt 'Go ahead?') {
       merge %entry;
-      system($ENV{SHELL} // "/bin/sh") == 0
-        or warn "Creating an interactive subshell failed ($?): $!"
-        if prompt "Shall I open a subshell?";
+      MAYBE_DIFF: while (1) { 
+        given (prompt "Shall I open a subshell? [ydN]", verbose => 1) {
+          when (/^y/i) {
+            system($ENV{SHELL} // "/bin/sh") == 0
+              or warn "Creating an interactive subshell failed ($?): $!"
+          }
+          when (/^d/) {
+            system($SVN, 'diff') == 0
+              or warn "diff failed ($?): $!";
+            next;
+          }
+        }
+      last;
+      }
       # Don't revert.  The next merge() call will do that anyway, or maybe the
       # user did in his interactive shell.
     }
@@ -307,6 +322,8 @@ sub main {
       }
     }
   }
+
+  system $SVN, qw/revert -R ./ if !$YES and prompt 'Revert? ';
 }
 
 &main


Reply via email to