subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1636532 - in /subversion/branches/move-tracking-2/subversion/tests/cmdline: svnmover_tests.py svntest/actions.py svntest/main.py
Date Tue, 04 Nov 2014 09:54:03 GMT
Author: julianfoad
Date: Tue Nov  4 09:54:02 2014
New Revision: 1636532

URL: http://svn.apache.org/r1636532
Log:
On the 'move-tracking-2' branch: Add the beginnings of some tests.

* subversion/tests/cmdline/svnmover_tests.py
  New file, copied from 'svnmucc_tests.py'. Both tests fail.

Added:
    subversion/branches/move-tracking-2/subversion/tests/cmdline/svnmover_tests.py
      - copied, changed from r1636526, subversion/branches/move-tracking-2/subversion/tests/cmdline/svnmucc_tests.py
Modified:
    subversion/branches/move-tracking-2/subversion/tests/cmdline/svntest/actions.py
    subversion/branches/move-tracking-2/subversion/tests/cmdline/svntest/main.py

Copied: subversion/branches/move-tracking-2/subversion/tests/cmdline/svnmover_tests.py (from
r1636526, subversion/branches/move-tracking-2/subversion/tests/cmdline/svnmucc_tests.py)
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/svnmover_tests.py?p2=subversion/branches/move-tracking-2/subversion/tests/cmdline/svnmover_tests.py&p1=subversion/branches/move-tracking-2/subversion/tests/cmdline/svnmucc_tests.py&r1=1636526&r2=1636532&rev=1636532&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/cmdline/svnmucc_tests.py (original)
+++ subversion/branches/move-tracking-2/subversion/tests/cmdline/svnmover_tests.py Tue Nov
 4 09:54:02 2014
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-#  svnmucc_tests.py: tests of svnmucc
+#  svnmover_tests.py: tests of svnmover
 #
 #  Subversion is a tool for revision control.
 #  See http://subversion.apache.org for more information.
@@ -25,7 +25,7 @@
 ######################################################################
 
 import svntest
-import re
+import os, re
 
 XFail = svntest.testcase.XFail_deco
 Issues = svntest.testcase.Issues_deco
@@ -33,36 +33,39 @@ Issue = svntest.testcase.Issue_deco
 
 ######################################################################
 
-@Issues(3895,3953)
-def reject_bogus_mergeinfo(sbox):
-  "reject bogus mergeinfo"
-
-  sbox.build(create_wc=False)
-
-  expected_error = ".*(E200020.*Invalid revision|E175002.*PROPPATCH)"
-
-  # At present this tests the server, but if we ever make svnmucc
-  # validate the mergeinfo up front then it will only test the client
-  svntest.actions.run_and_verify_svnmucc(None, [], expected_error,
-                                         'propset', 'svn:mergeinfo', '/B:0',
-                                         '-m', 'log msg',
-                                         sbox.repo_url + '/A')
-
-_svnmucc_re = re.compile('^(r[0-9]+) committed by jrandom at (.*)$')
+_commit_re = re.compile('^(r[0-9]+) committed by jrandom at (.*)$')
 _log_re = re.compile('^   ([ADRM] /[^\(]+($| \(from .*:[0-9]+\)$))')
-_err_re = re.compile('^svnmucc: (.*)$')
+_err_re = re.compile('^svnmover: (.*)$')
+
+def sbox_build_svnmover(sbox):
+  """Create a sandbox (without a WC), similar to 'sbox.build(create_wc=False)'
+     but currently without the Greek tree.
+
+     Use svnmover for every commit so as to get the branching/moving
+     metadata. This will no longer be necessary if we make 'svnmover'
+     fill in missing metadata automatically.
+  """
+  svntest.main.create_repos(sbox.repo_dir)
+  svntest.actions.enable_revprop_changes(sbox.repo_dir)
+
+  # commit something in place of a greek tree for revision 1
+  iota_file = os.path.join(sbox.repo_dir, 'iota')
+  svntest.main.file_append(iota_file, "This is the file 'iota'.")
+  svntest.main.run_svnmover('-U', sbox.repo_url,
+                            'mkdir', 'A',
+                            'put', iota_file, 'iota')
 
-def test_svnmucc(repo_url, expected_path_changes, *varargs):
-  """Run svnmucc with the list of SVNMUCC_ARGS arguments.  Verify that
+def test_svnmover(repo_url, expected_path_changes, *varargs):
+  """Run svnmover with the list of SVNMOVER_ARGS arguments.  Verify that
   its run results in a new commit with 'svn log -rHEAD' changed paths
   that match the list of EXPECTED_PATH_CHANGES."""
 
-  # First, run svnmucc.
-  exit_code, outlines, errlines = svntest.main.run_svnmucc('-U', repo_url,
-                                                           *varargs)
+  # First, run svnmover.
+  exit_code, outlines, errlines = svntest.main.run_svnmover('-U', repo_url,
+                                                            *varargs)
   if errlines:
     raise svntest.main.SVNCommitFailure(str(errlines))
-  if len(outlines) != 1 or not _svnmucc_re.match(outlines[0]):
+  if len(outlines) != 1 or not _commit_re.match(outlines[0]):
     raise svntest.main.SVNLineUnequal(str(outlines))
 
   # Now, run 'svn log -vq -rHEAD'
@@ -85,13 +88,13 @@ def test_svnmucc(repo_url, expected_path
                           "     actual: %s" % (str(expected_path_changes),
                                                str(changed_paths)))
 
-def xtest_svnmucc(repo_url, expected_errors, *varargs):
-  """Run svnmucc with the list of SVNMUCC_ARGS arguments.  Verify that
+def xtest_svnmover(repo_url, expected_errors, *varargs):
+  """Run svnmover with the list of VARARGS arguments.  Verify that
   its run results match the list of EXPECTED_ERRORS."""
 
-  # First, run svnmucc.
-  exit_code, outlines, errlines = svntest.main.run_svnmucc('-U', repo_url,
-                                                           *varargs)
+  # First, run svnmover.
+  exit_code, outlines, errlines = svntest.main.run_svnmover('-U', repo_url,
+                                                            *varargs)
   errors = []
   for line in errlines:
     match = _err_re.match(line)
@@ -100,330 +103,258 @@ def xtest_svnmucc(repo_url, expected_err
   if errors != expected_errors:
     raise svntest.main.SVNUnmatchedError(str(errors))
 
+######################################################################
+
+def basic_svnmover(sbox):
+  "basic svnmover tests"
 
-def basic_svnmucc(sbox):
-  "basic svnmucc tests"
+  sbox_build_svnmover(sbox)
 
-  sbox.build()
-  empty_file = sbox.ospath('empty')
+  empty_file = os.path.join(sbox.repo_dir, 'empty')
   svntest.main.file_append(empty_file, '')
 
   # revision 2
-  test_svnmucc(sbox.repo_url,
-               ['A /foo'
-                ], # ---------
-               '-m', 'log msg',
-               'mkdir', 'foo')
+  test_svnmover(sbox.repo_url,
+                ['A /foo'
+                 ], # ---------
+                '-m', 'log msg',
+                'mkdir', 'foo')
 
   # revision 3
-  test_svnmucc(sbox.repo_url,
-               ['A /z.c',
-                ], # ---------
-               '-m', 'log msg',
-               'put', empty_file, 'z.c')
+  test_svnmover(sbox.repo_url,
+                ['A /z.c',
+                 ], # ---------
+                '-m', 'log msg',
+                'put', empty_file, 'z.c')
 
   # revision 4
-  test_svnmucc(sbox.repo_url,
-               ['A /foo/z.c (from /z.c:3)',
-                'A /foo/bar (from /foo:3)',
-                ], # ---------
-               '-m', 'log msg',
-               'cp', '3', 'z.c', 'foo/z.c',
-               'cp', '3', 'foo', 'foo/bar')
+  test_svnmover(sbox.repo_url,
+                ['A /foo/z.c (from /z.c:3)',
+                 'A /foo/bar (from /foo:3)',
+                 ], # ---------
+                '-m', 'log msg',
+                'cp', '3', 'z.c', 'foo/z.c',
+                'cp', '3', 'foo', 'foo/bar')
 
   # revision 5
-  test_svnmucc(sbox.repo_url,
-               ['A /zig (from /foo:4)',
-                'D /zig/bar',
-                'D /foo',
-                'A /zig/zag (from /foo:4)',
-                ], # ---------
-               '-m', 'log msg',
-               'cp', '4', 'foo', 'zig',
-               'rm',             'zig/bar',
-               'mv',      'foo', 'zig/zag')
+  test_svnmover(sbox.repo_url,
+                ['A /zig (from /foo:4)',
+                 'D /zig/bar',
+                 'D /foo',
+                 'A /zig/zag (from /foo:4)',
+                 ], # ---------
+                '-m', 'log msg',
+                'cp', '4', 'foo', 'zig',
+                'rm',             'zig/bar',
+                'mv',      'foo', 'zig/zag')
 
   # revision 6
-  test_svnmucc(sbox.repo_url,
-               ['D /z.c',
-                'A /zig/zag/bar/y.c (from /z.c:5)',
-                'A /zig/zag/bar/x.c (from /z.c:3)',
-                ], # ---------
-               '-m', 'log msg',
-               'mv',      'z.c', 'zig/zag/bar/y.c',
-               'cp', '3', 'z.c', 'zig/zag/bar/x.c')
+  test_svnmover(sbox.repo_url,
+                ['D /z.c',
+                 'A /zig/zag/bar/y.c (from /z.c:5)',
+                 'A /zig/zag/bar/x.c (from /z.c:3)',
+                 ], # ---------
+                '-m', 'log msg',
+                'mv',      'z.c', 'zig/zag/bar/y.c',
+                'cp', '3', 'z.c', 'zig/zag/bar/x.c')
 
   # revision 7
-  test_svnmucc(sbox.repo_url,
-               ['D /zig/zag/bar/y.c',
-                'A /zig/zag/bar/y y.c (from /zig/zag/bar/y.c:6)',
-                'A /zig/zag/bar/y%20y.c (from /zig/zag/bar/y.c:6)',
-                ], # ---------
-               '-m', 'log msg',
-               'mv',         'zig/zag/bar/y.c', 'zig/zag/bar/y%20y.c',
-               'cp', 'HEAD', 'zig/zag/bar/y.c', 'zig/zag/bar/y%2520y.c')
+  test_svnmover(sbox.repo_url,
+                ['D /zig/zag/bar/y.c',
+                 'A /zig/zag/bar/y y.c (from /zig/zag/bar/y.c:6)',
+                 'A /zig/zag/bar/y%20y.c (from /zig/zag/bar/y.c:6)',
+                 ], # ---------
+                '-m', 'log msg',
+                'mv',         'zig/zag/bar/y.c', 'zig/zag/bar/y%20y.c',
+                'cp', 'HEAD', 'zig/zag/bar/y.c', 'zig/zag/bar/y%2520y.c')
 
   # revision 8
-  test_svnmucc(sbox.repo_url,
-               ['D /zig/zag/bar/y y.c',
-                'A /zig/zag/bar/z z1.c (from /zig/zag/bar/y y.c:7)',
-                'A /zig/zag/bar/z%20z.c (from /zig/zag/bar/y%20y.c:7)',
-                'A /zig/zag/bar/z z2.c (from /zig/zag/bar/y y.c:7)',
-                ], #---------
-               '-m', 'log msg',
-               'mv',         'zig/zag/bar/y%20y.c',   'zig/zag/bar/z z1.c',
-               'cp', 'HEAD', 'zig/zag/bar/y%2520y.c', 'zig/zag/bar/z%2520z.c',
-               'cp', 'HEAD', 'zig/zag/bar/y y.c',     'zig/zag/bar/z z2.c')
+  test_svnmover(sbox.repo_url,
+                ['D /zig/zag/bar/y y.c',
+                 'A /zig/zag/bar/z z1.c (from /zig/zag/bar/y y.c:7)',
+                 'A /zig/zag/bar/z%20z.c (from /zig/zag/bar/y%20y.c:7)',
+                 'A /zig/zag/bar/z z2.c (from /zig/zag/bar/y y.c:7)',
+                 ], #---------
+                '-m', 'log msg',
+                'mv',         'zig/zag/bar/y%20y.c',   'zig/zag/bar/z z1.c',
+                'cp', 'HEAD', 'zig/zag/bar/y%2520y.c', 'zig/zag/bar/z%2520z.c',
+                'cp', 'HEAD', 'zig/zag/bar/y y.c',     'zig/zag/bar/z z2.c')
 
 
   # revision 9
-  test_svnmucc(sbox.repo_url,
-               ['D /zig/zag',
-                'A /zig/foo (from /zig/zag:8)',
-                'D /zig/foo/bar/z%20z.c',
-                'D /zig/foo/bar/z z2.c',
-                'R /zig/foo/bar/z z1.c (from /zig/zag/bar/x.c:6)',
-                ], #---------
-               '-m', 'log msg',
-               'mv',      'zig/zag',         'zig/foo',
-               'rm',                         'zig/foo/bar/z z1.c',
-               'rm',                         'zig/foo/bar/z%20z2.c',
-               'rm',                         'zig/foo/bar/z%2520z.c',
-               'cp', '6', 'zig/zag/bar/x.c', 'zig/foo/bar/z%20z1.c')
+  test_svnmover(sbox.repo_url,
+                ['D /zig/zag',
+                 'A /zig/foo (from /zig/zag:8)',
+                 'D /zig/foo/bar/z%20z.c',
+                 'D /zig/foo/bar/z z2.c',
+                 'R /zig/foo/bar/z z1.c (from /zig/zag/bar/x.c:6)',
+                 ], #---------
+                '-m', 'log msg',
+                'mv',      'zig/zag',         'zig/foo',
+                'rm',                         'zig/foo/bar/z z1.c',
+                'rm',                         'zig/foo/bar/z%20z2.c',
+                'rm',                         'zig/foo/bar/z%2520z.c',
+                'cp', '6', 'zig/zag/bar/x.c', 'zig/foo/bar/z%20z1.c')
 
   # revision 10
-  test_svnmucc(sbox.repo_url,
-               ['R /zig/foo/bar (from /zig/z.c:9)',
-                ], #---------
-               '-m', 'log msg',
-               'rm',                 'zig/foo/bar',
-               'cp', '9', 'zig/z.c', 'zig/foo/bar')
+  test_svnmover(sbox.repo_url,
+                ['R /zig/foo/bar (from /zig/z.c:9)',
+                 ], #---------
+                '-m', 'log msg',
+                'rm',                 'zig/foo/bar',
+                'cp', '9', 'zig/z.c', 'zig/foo/bar')
 
   # revision 11
-  test_svnmucc(sbox.repo_url,
-               ['R /zig/foo/bar (from /zig/foo/bar:9)',
-                'D /zig/foo/bar/z z1.c',
-                ], #---------
-               '-m', 'log msg',
-               'rm',                     'zig/foo/bar',
-               'cp', '9', 'zig/foo/bar', 'zig/foo/bar',
-               'rm',                     'zig/foo/bar/z%20z1.c')
+  test_svnmover(sbox.repo_url,
+                ['R /zig/foo/bar (from /zig/foo/bar:9)',
+                 'D /zig/foo/bar/z z1.c',
+                 ], #---------
+                '-m', 'log msg',
+                'rm',                     'zig/foo/bar',
+                'cp', '9', 'zig/foo/bar', 'zig/foo/bar',
+                'rm',                     'zig/foo/bar/z%20z1.c')
 
   # revision 12
-  test_svnmucc(sbox.repo_url,
-               ['R /zig/foo (from /zig/foo/bar:11)',
-                ], #---------
-               '-m', 'log msg',
-               'rm',                        'zig/foo',
-               'cp', 'head', 'zig/foo/bar', 'zig/foo')
+  test_svnmover(sbox.repo_url,
+                ['R /zig/foo (from /zig/foo/bar:11)',
+                 ], #---------
+                '-m', 'log msg',
+                'rm',                        'zig/foo',
+                'cp', 'head', 'zig/foo/bar', 'zig/foo')
 
   # revision 13
-  test_svnmucc(sbox.repo_url,
-               ['D /zig',
-                'A /foo (from /foo:4)',
-                'A /foo/foo (from /foo:4)',
-                'A /foo/foo/foo (from /foo:4)',
-                'D /foo/foo/bar',
-                'R /foo/foo/foo/bar (from /foo:4)',
-                ], #---------
-               '-m', 'log msg',
-               'rm',             'zig',
-               'cp', '4', 'foo', 'foo',
-               'cp', '4', 'foo', 'foo/foo',
-               'cp', '4', 'foo', 'foo/foo/foo',
-               'rm',             'foo/foo/bar',
-               'rm',             'foo/foo/foo/bar',
-               'cp', '4', 'foo', 'foo/foo/foo/bar')
+  test_svnmover(sbox.repo_url,
+                ['D /zig',
+                 'A /foo (from /foo:4)',
+                 'A /foo/foo (from /foo:4)',
+                 'A /foo/foo/foo (from /foo:4)',
+                 'D /foo/foo/bar',
+                 'R /foo/foo/foo/bar (from /foo:4)',
+                 ], #---------
+                '-m', 'log msg',
+                'rm',             'zig',
+                'cp', '4', 'foo', 'foo',
+                'cp', '4', 'foo', 'foo/foo',
+                'cp', '4', 'foo', 'foo/foo/foo',
+                'rm',             'foo/foo/bar',
+                'rm',             'foo/foo/foo/bar',
+                'cp', '4', 'foo', 'foo/foo/foo/bar')
 
   # revision 14
-  test_svnmucc(sbox.repo_url,
-               ['A /boozle (from /foo:4)',
-                'A /boozle/buz',
-                'A /boozle/buz/nuz',
-                ], #---------
-               '-m', 'log msg',
-               'cp',    '4', 'foo', 'boozle',
-               'mkdir',             'boozle/buz',
-               'mkdir',             'boozle/buz/nuz')
+  test_svnmover(sbox.repo_url,
+                ['A /boozle (from /foo:4)',
+                 'A /boozle/buz',
+                 'A /boozle/buz/nuz',
+                 ], #---------
+                '-m', 'log msg',
+                'cp',    '4', 'foo', 'boozle',
+                'mkdir',             'boozle/buz',
+                'mkdir',             'boozle/buz/nuz')
 
   # revision 15
-  test_svnmucc(sbox.repo_url,
-               ['A /boozle/buz/svnmucc-test.py',
-                'A /boozle/guz (from /boozle/buz:14)',
-                'A /boozle/guz/svnmucc-test.py',
-                ], #---------
-               '-m', 'log msg',
-               'put',      empty_file,   'boozle/buz/svnmucc-test.py',
-               'cp', '14', 'boozle/buz', 'boozle/guz',
-               'put',      empty_file,   'boozle/guz/svnmucc-test.py')
+  test_svnmover(sbox.repo_url,
+                ['A /boozle/buz/svnmover-test.py',
+                 'A /boozle/guz (from /boozle/buz:14)',
+                 'A /boozle/guz/svnmover-test.py',
+                 ], #---------
+                '-m', 'log msg',
+                'put',      empty_file,   'boozle/buz/svnmover-test.py',
+                'cp', '14', 'boozle/buz', 'boozle/guz',
+                'put',      empty_file,   'boozle/guz/svnmover-test.py')
 
   # revision 16
-  test_svnmucc(sbox.repo_url,
-               ['M /boozle/buz/svnmucc-test.py',
-                'R /boozle/guz/svnmucc-test.py',
-                ], #---------
-               '-m', 'log msg',
-               'put', empty_file, 'boozle/buz/svnmucc-test.py',
-               'rm',              'boozle/guz/svnmucc-test.py',
-               'put', empty_file, 'boozle/guz/svnmucc-test.py')
+  test_svnmover(sbox.repo_url,
+                ['R /boozle/guz/svnmover-test.py',
+                 ], #---------
+                '-m', 'log msg',
+                'put', empty_file, 'boozle/buz/svnmover-test.py',
+                'rm',              'boozle/guz/svnmover-test.py',
+                'put', empty_file, 'boozle/guz/svnmover-test.py')
 
   # revision 17
-  test_svnmucc(sbox.repo_url,
-               ['R /foo/bar (from /foo/foo:16)'
-                ], #---------
-               '-m', 'log msg',
-               'rm',                            'foo/bar',
-               'cp', '16', 'foo/foo',           'foo/bar',
-               'propset',  'testprop',  'true', 'foo/bar')
+  test_svnmover(sbox.repo_url,
+                ['R /foo/bar (from /foo/foo:16)'
+                 ], #---------
+                '-m', 'log msg',
+                'rm',                            'foo/bar',
+                'cp', '16', 'foo/foo',           'foo/bar',
+                'propset',  'testprop',  'true', 'foo/bar')
 
   # revision 18
-  test_svnmucc(sbox.repo_url,
-               ['M /foo/bar'
-                ], #---------
-               '-m', 'log msg',
-               'propdel', 'testprop', 'foo/bar')
+  test_svnmover(sbox.repo_url,
+                ['M /foo/bar'
+                 ], #---------
+                '-m', 'log msg',
+                'propdel', 'testprop', 'foo/bar')
 
   # revision 19
-  test_svnmucc(sbox.repo_url,
-               ['M /foo/z.c',
-                'M /foo/foo',
-                ], #---------
-               '-m', 'log msg',
-               'propset', 'testprop', 'true', 'foo/z.c',
-               'propset', 'testprop', 'true', 'foo/foo')
+  test_svnmover(sbox.repo_url,
+                ['M /foo/z.c',
+                 'M /foo/foo',
+                 ], #---------
+                '-m', 'log msg',
+                'propset', 'testprop', 'true', 'foo/z.c',
+                'propset', 'testprop', 'true', 'foo/foo')
 
   # revision 20
-  test_svnmucc(sbox.repo_url,
-               ['M /foo/z.c',
-                'M /foo/foo',
-                ], #---------
-               '-m', 'log msg',
-               'propsetf', 'testprop', empty_file, 'foo/z.c',
-               'propsetf', 'testprop', empty_file, 'foo/foo')
-
-  # Expected missing revision error
-  xtest_svnmucc(sbox.repo_url,
-                ["svnmucc: E200004: 'a' is not a revision"
+  test_svnmover(sbox.repo_url,
+                ['M /foo/z.c',
+                 'M /foo/foo',
                  ], #---------
                 '-m', 'log msg',
-                'cp', 'a', 'b')
+                'propsetf', 'testprop', empty_file, 'foo/z.c',
+                'propsetf', 'testprop', empty_file, 'foo/foo')
+
+  # Expected missing revision error
+  xtest_svnmover(sbox.repo_url,
+                 ["svnmover: E200004: 'a' is not a revision"
+                  ], #---------
+                 '-m', 'log msg',
+                 'cp', 'a', 'b')
 
   # Expected cannot be younger error
-  xtest_svnmucc(sbox.repo_url,
-                ['svnmucc: E160006: No such revision 42',
-                 ], #---------
-                '-m', 'log msg',
-                'cp', '42', 'a', 'b')
+  xtest_svnmover(sbox.repo_url,
+                 ['svnmover: E160006: No such revision 42',
+                  ], #---------
+                 '-m', 'log msg',
+                 'cp', '42', 'a', 'b')
 
   # Expected already exists error
-  xtest_svnmucc(sbox.repo_url,
-                ["svnmucc: E160020: Path 'foo' already exists",
-                 ], #---------
-                '-m', 'log msg',
-                'cp', '17', 'a', 'foo')
+  xtest_svnmover(sbox.repo_url,
+                 ["svnmover: E160020: Path 'foo' already exists",
+                  ], #---------
+                 '-m', 'log msg',
+                 'cp', '17', 'a', 'foo')
 
   # Expected copy_src already exists error
-  xtest_svnmucc(sbox.repo_url,
-                ["svnmucc: E160020: Path 'a/bar' already exists",
-                 ], #---------
-                '-m', 'log msg',
-                'cp', '17', 'foo', 'a',
-                'cp', '17', 'foo/foo', 'a/bar')
+  xtest_svnmover(sbox.repo_url,
+                 ["svnmover: E160020: Path 'a/bar' already exists",
+                  ], #---------
+                 '-m', 'log msg',
+                 'cp', '17', 'foo', 'a',
+                 'cp', '17', 'foo/foo', 'a/bar')
 
   # Expected not found error
-  xtest_svnmucc(sbox.repo_url,
-                ["svnmucc: E160013: Path 'a' not found in revision 17",
-                 ], #---------
-                '-m', 'log msg',
-                'cp', '17', 'a', 'b')
-
-
-def propset_root_internal(sbox, target):
-  ## propset on ^/
-  svntest.actions.run_and_verify_svnmucc(None, None, [],
-                                         '-m', 'log msg',
-                                         'propset', 'foo', 'bar',
-                                         target)
-  svntest.actions.run_and_verify_svn(None, 'bar', [],
-                                     'propget', '--strict', 'foo',
-                                     target)
-
-  ## propdel on ^/
-  svntest.actions.run_and_verify_svnmucc(None, None, [],
-                                         '-m', 'log msg',
-                                         'propdel', 'foo',
-                                         target)
-  svntest.actions.run_and_verify_svn(None, [],
-                                     '.*W200017: Property.*not found',
-                                     'propget', '--strict', 'foo',
-                                     target)
-
-@Issues(3663)
-def propset_root(sbox):
-  "propset/propdel on repos root"
-
-  sbox.build(create_wc=False)
-  propset_root_internal(sbox, sbox.repo_url)
-  propset_root_internal(sbox, sbox.repo_url + '/iota')
-
-
-def too_many_log_messages(sbox):
-  "test log message mutual exclusivity checks"
-
-  sbox.build() # would use read-only=True, but need a place to stuff msg_file
-  msg_file = sbox.ospath('svnmucc_msg')
-  svntest.main.file_append(msg_file, 'some log message')
-  err_msg = ["svnmucc: E205000: --message (-m), --file (-F), and "
-             "--with-revprop=svn:log are mutually exclusive"]
-
-  xtest_svnmucc(sbox.repo_url, err_msg,
-                '--non-interactive',
-                '-m', 'log msg',
-                '-F', msg_file,
-                'mkdir', 'A/subdir')
-  xtest_svnmucc(sbox.repo_url, err_msg,
-                '--non-interactive',
-                '-m', 'log msg',
-                '--with-revprop', 'svn:log=proppy log message',
-                'mkdir', 'A/subdir')
-  xtest_svnmucc(sbox.repo_url, err_msg,
-                '--non-interactive',
-                '-F', msg_file,
-                '--with-revprop', 'svn:log=proppy log message',
-                'mkdir', 'A/subdir')
-  xtest_svnmucc(sbox.repo_url, err_msg,
-                '--non-interactive',
-                '-m', 'log msg',
-                '-F', msg_file,
-                '--with-revprop', 'svn:log=proppy log message',
-                'mkdir', 'A/subdir')
-
-@Issues(3418)
-def no_log_msg_non_interactive(sbox):
-  "test non-interactive without a log message"
-
-  sbox.build(create_wc=False)
-  xtest_svnmucc(sbox.repo_url,
-                ["svnmucc: E205001: Cannot invoke editor to get log message "
-                 "when non-interactive"
-                 ], #---------
-                '--non-interactive',
-                'mkdir', 'A/subdir')
+  xtest_svnmover(sbox.repo_url,
+                 ["svnmover: E160013: Path 'a' not found in revision 17",
+                  ], #---------
+                 '-m', 'log msg',
+                 'cp', '17', 'a', 'b')
 
 
 def nested_replaces(sbox):
   "nested replaces"
 
-  sbox.build(create_wc=False)
+  sbox_build_svnmover(sbox)
   repo_url = sbox.repo_url
-  svntest.actions.run_and_verify_svnmucc(None, None, [],
+  svntest.actions.run_and_verify_svnmover(None, None, [],
                            '-U', repo_url, '-m', 'r2: create tree',
                            'rm', 'A',
                            'rm', 'iota',
                            'mkdir', 'A', 'mkdir', 'A/B', 'mkdir', 'A/B/C',
                            'mkdir', 'M', 'mkdir', 'M/N', 'mkdir', 'M/N/O',
                            'mkdir', 'X', 'mkdir', 'X/Y', 'mkdir', 'X/Y/Z')
-  svntest.actions.run_and_verify_svnmucc(None, None, [],
+  svntest.actions.run_and_verify_svnmover(None, None, [],
                            '-U', repo_url, '-m', 'r3: nested replaces',
                            *("""
 rm A rm M rm X
@@ -456,11 +387,7 @@ rm A/B/C/Y
 ######################################################################
 
 test_list = [ None,
-              reject_bogus_mergeinfo,
-              basic_svnmucc,
-              propset_root,
-              too_many_log_messages,
-              no_log_msg_non_interactive,
+              basic_svnmover,
               nested_replaces,
             ]
 

Modified: subversion/branches/move-tracking-2/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/svntest/actions.py?rev=1636532&r1=1636531&r2=1636532&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/move-tracking-2/subversion/tests/cmdline/svntest/actions.py Tue Nov
 4 09:54:02 2014
@@ -384,6 +384,27 @@ def run_and_verify_svnrdump(dumpfile_con
   return output
 
 
+def run_and_verify_svnmover(message, expected_stdout, expected_stderr,
+                            *varargs):
+  """Run svnmover command and check its output"""
+
+  expected_exit = 0
+  if expected_stderr is not None and expected_stderr != []:
+    expected_exit = 1
+  return run_and_verify_svnmover2(message, expected_stdout, expected_stderr,
+                                  expected_exit, *varargs)
+
+def run_and_verify_svnmover2(message, expected_stdout, expected_stderr,
+                             expected_exit, *varargs):
+  """Run svnmover command and check its output and exit code."""
+
+  exit_code, out, err = main.run_svnmover(*varargs)
+  verify.verify_outputs("Unexpected output", out, err,
+                        expected_stdout, expected_stderr)
+  verify.verify_exit_code(message, exit_code, expected_exit)
+  return exit_code, out, err
+
+
 def run_and_verify_svnmucc(message, expected_stdout, expected_stderr,
                            *varargs):
   """Run svnmucc command and check its output"""

Modified: subversion/branches/move-tracking-2/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/svntest/main.py?rev=1636532&r1=1636531&r2=1636532&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/move-tracking-2/subversion/tests/cmdline/svntest/main.py Tue Nov 
4 09:54:02 2014
@@ -155,6 +155,7 @@ svnrdump_binary = P('svnrdump/svnrdump')
 svnsync_binary = P('svnsync/svnsync')
 svnversion_binary = P('svnversion/svnversion')
 svndumpfilter_binary = P('svndumpfilter/svndumpfilter')
+svnmover_binary = P('svnmover/svnmover')
 svnmucc_binary = P('svnmucc/svnmucc')
 svnfsfs_binary = P('svnfsfs/svnfsfs')
 entriesdump_binary = P('tests/cmdline/entries-dump')
@@ -745,6 +746,12 @@ def run_svnversion(*varargs):
   as list of lines (including line terminators)."""
   return run_command(svnversion_binary, 1, False, *varargs)
 
+def run_svnmover(*varargs):
+  """Run svnmover with VARARGS, returns exit code as int; stdout, stderr as
+  list of lines (including line terminators).  Use binary mode for output."""
+  return run_command(svnmover_binary, 1, True,
+                     *(_with_auth(_with_config_dir(varargs))))
+
 def run_svnmucc(*varargs):
   """Run svnmucc with VARARGS, returns exit code as int; stdout, stderr as
   list of lines (including line terminators).  Use binary mode for output."""
@@ -2052,6 +2059,7 @@ def execute_tests(test_list, serial_only
   global svnsync_binary
   global svndumpfilter_binary
   global svnversion_binary
+  global svnmover_binary
   global svnmucc_binary
   global svnauthz_binary
   global svnauthz_validate_binary
@@ -2160,6 +2168,7 @@ def execute_tests(test_list, serial_only
                                         'jsvndumpfilter' + _bat)
     svnversion_binary = os.path.join(options.svn_bin,
                                      'jsvnversion' + _bat)
+    svnmover_binary = os.path.join(options.svn_bin, 'jsvnmover' + _bat)
     svnmucc_binary = os.path.join(options.svn_bin, 'jsvnmucc' + _bat)
   else:
     if options.svn_bin:
@@ -2171,6 +2180,7 @@ def execute_tests(test_list, serial_only
       svndumpfilter_binary = os.path.join(options.svn_bin,
                                           'svndumpfilter' + _exe)
       svnversion_binary = os.path.join(options.svn_bin, 'svnversion' + _exe)
+      svnmover_binary = os.path.join(options.svn_bin, 'svnmover' + _exe)
       svnmucc_binary = os.path.join(options.svn_bin, 'svnmucc' + _exe)
 
   if options.tools_bin:



Mime
View raw message