Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/deeptrees.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/deeptrees.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/deeptrees.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/deeptrees.py Sun Jun 14 20:58:10 2015 @@ -498,8 +498,13 @@ def deep_trees_run_tests_scheme_for_upda x_status.copy() x_status.wc_dir = base + if test_case.error_re_string == None: + expected_stderr = [] + else: + expected_stderr = test_case.error_re_string + run_and_verify_update(base, x_out, x_disk, None, - error_re_string = test_case.error_re_string) + expected_stderr = expected_stderr) if x_status: run_and_verify_unquiet_status(base, x_status) @@ -525,8 +530,7 @@ def deep_trees_run_tests_scheme_for_upda x_status.wc_dir = base run_and_verify_commit(base, None, x_status, - test_case.commit_block_string, - base) + test_case.commit_block_string) except: logger.warn("ERROR IN: Tests scheme for update: " + "while checking commit-blocking in '%s'", test_case.name) @@ -586,8 +590,13 @@ def deep_trees_skipping_on_update(sbox, # Account for nodes that were updated by further_action x_status.tweak('', 'D', 'F', 'DD', 'DF', 'DDD', 'DDF', wc_rev=4) + if test_case.error_re_string == None: + expected_stderr = [] + else: + expected_stderr = test_case.error_re_string + run_and_verify_update(base, x_out, x_disk, None, - error_re_string = test_case.error_re_string) + expected_stderr = expected_stderr) run_and_verify_unquiet_status(base, x_status) @@ -745,9 +754,14 @@ def deep_trees_run_tests_scheme_for_swit x_status.copy() x_status.wc_dir = local + if test_case.error_re_string == None: + expected_stderr = [] + else: + expected_stderr = test_case.error_re_string + run_and_verify_switch(local, local, incoming, x_out, x_disk, None, - test_case.error_re_string, None, None, None, - None, False, '--ignore-ancestry') + expected_stderr, False, + '--ignore-ancestry') run_and_verify_unquiet_status(local, x_status) x_info = test_case.expected_info or {} @@ -771,8 +785,7 @@ def deep_trees_run_tests_scheme_for_swit x_status.wc_dir = local run_and_verify_commit(local, None, x_status, - test_case.commit_block_string, - local) + test_case.commit_block_string) except: logger.warn("ERROR IN: Tests scheme for switch: " + "while checking commit-blocking in '%s'", test_case.name) @@ -959,10 +972,14 @@ def deep_trees_run_tests_scheme_for_merg if ignore_ancestry: varargs = varargs + ('--ignore-ancestry',) + if test_case.error_re_string == None: + expected_stderr = [] + else: + expected_stderr = test_case.error_re_string + run_and_verify_merge(local, '0', 'HEAD', incoming, None, x_out, None, None, x_disk, None, x_skip, - test_case.error_re_string, - None, None, None, None, + expected_stderr, False, False, *varargs) run_and_verify_unquiet_status(local, x_status) except: @@ -984,8 +1001,7 @@ def deep_trees_run_tests_scheme_for_merg x_status.wc_dir = local run_and_verify_commit(local, None, x_status, - test_case.commit_block_string, - local) + test_case.commit_block_string) except: logger.warn("ERROR IN: Tests scheme for merge: " + "while checking commit-blocking in '%s'", test_case.name) @@ -1080,7 +1096,7 @@ def do_routine_switching(wc_dir, repo_ur expected_output, expected_disk, expected_status, - None, None, None, None, None, + [], False, '--ignore-ancestry') else: svntest.main.run_svn(None, 'switch', '--ignore-ancestry', @@ -1116,7 +1132,7 @@ def do_routine_switching(wc_dir, repo_ur expected_output, expected_disk, expected_status, - None, None, None, None, None, + [], False, '--ignore-ancestry') else: svntest.main.run_svn(None, 'switch', '--ignore-ancestry', @@ -1147,8 +1163,7 @@ def commit_routine_switching(wc_dir, ver # same URL. We don't allow this. svntest.actions.run_and_verify_commit( wc_dir, None, None, - "svn: E195003: Cannot commit both .* as they refer to the same URL$", - wc_dir) + "svn: E195003: Cannot commit both .* as they refer to the same URL$") # Okay, that all taken care of, let's revert the A/D/G/pi path and # move along. Afterward, we should be okay to commit. (Sorry, @@ -1176,8 +1191,7 @@ def commit_routine_switching(wc_dir, ver if verify: svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) else: svntest.main.run_svn(None, 'ci', '-m', 'log msg', wc_dir)
Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/factory.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/factory.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/factory.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/factory.py Sun Jun 14 20:58:10 2015 @@ -634,13 +634,13 @@ class TestFactory: py += pychdir py += ("actions.run_and_verify_update(" + wc.py + ", " + "expected_output, expected_disk, expected_status, " + - "None, None, None, None, None, False") + "[], False") else: # write a test that expects error py = "expected_error = " + self.strlist2py(err) + "\n\n" py += pychdir py += ("actions.run_and_verify_update(" + wc.py + ", None, None, " + - "None, expected_error, None, None, None, None, False") + "None, expected_error") if len(pyargs) > 0: py += ', ' + ', '.join(pyargs) @@ -700,14 +700,14 @@ class TestFactory: py += ("actions.run_and_verify_switch(" + wc.py + ", " + wc_arg.pyarg + ", " + url_arg.pyarg + ", " + "expected_output, expected_disk, expected_status, " + - "None, None, None, None, None, False") + "[], False") else: # write a test that expects error py = "expected_error = " + self.strlist2py(err) + "\n\n" py += pychdir py += ("actions.run_and_verify_switch(" + wc.py + ", " + wc_arg.pyarg + ", " + url_arg.pyarg + ", " + - "None, None, None, expected_error, None, None, None, None, False") + "None, None, None, expected_error, False") if len(pyargs) > 0: py += ', ' + ', '.join(pyargs) @@ -765,7 +765,7 @@ class TestFactory: py += ("actions.run_and_verify_checkout(" + url_arg.pyarg + ", " + wc_arg.pyarg + - ", expected_output, expected_disk, None, None, None, None") + ", expected_output, expected_disk") else: # write a test that expects failure pylist = self.strlist2py(err) @@ -1035,7 +1035,7 @@ class TestFactory: make_py, prev_status = self.get_prev_status(wc) - actual_status = svntest.wc.State.from_status(output) + actual_status = svntest.wc.State.from_status(output, wc_dir=wc.realpath) # The tests currently compare SVNTreeNode trees, so let's do that too. prev_status_tree = prev_status.old_tree() Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/main.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/main.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/main.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/main.py Sun Jun 14 20:58:10 2015 @@ -54,7 +54,7 @@ import svntest from svntest import Failure from svntest import Skip -SVN_VER_MINOR = 9 +SVN_VER_MINOR = 10 ###################################################################### # @@ -112,7 +112,7 @@ class SVNRepositoryCreateFailure(Failure # Windows specifics if sys.platform == 'win32': windows = True - file_scheme_prefix = 'file:' + file_scheme_prefix = 'file:///' _exe = '.exe' _bat = '.bat' os.environ['SVN_DBG_STACKTRACES_TO_STDERR'] = 'y' @@ -151,7 +151,10 @@ os.environ['LC_ALL'] = 'C' def P(relpath, head=os.path.dirname(os.path.dirname(os.path.abspath('.'))) ): - return os.path.join(head, relpath) + if sys.platform=='win32': + return os.path.join(head, relpath + '.exe') + else: + return os.path.join(head, relpath) svn_binary = P('svn/svn') svnadmin_binary = P('svnadmin/svnadmin') svnlook_binary = P('svnlook/svnlook') @@ -1524,9 +1527,16 @@ def is_plaintext_password_storage_disabl # https://issues.apache.org/bugzilla/show_bug.cgi?id=56480 +# https://issues.apache.org/bugzilla/show_bug.cgi?id=55397 __mod_dav_url_quoting_broken_versions = frozenset([ + '2.2.27', '2.2.26', + '2.2.25', '2.4.9', + '2.4.8', + '2.4.7', + '2.4.6', + '2.4.5', ]) def is_mod_dav_url_quoting_broken(): if is_ra_type_dav(): @@ -1977,7 +1987,9 @@ def _create_parser(): parser.set_defaults( server_minor_version=SVN_VER_MINOR, url=file_scheme_prefix + \ - urllib.pathname2url(os.path.abspath(os.getcwd())), + svntest.wc.svn_uri_quote( + os.path.abspath( + os.getcwd()).replace(os.path.sep, '/')), http_library=_default_http_library) return parser @@ -2226,7 +2238,9 @@ def execute_tests(test_list, serial_only # Calculate pristine_greek_repos_url from test_area_url. pristine_greek_repos_url = options.test_area_url + '/' + \ - urllib.pathname2url(pristine_greek_repos_dir) + svntest.wc.svn_uri_quote( + pristine_greek_repos_dir.replace( + os.path.sep, '/')) if options.use_jsvn: if options.svn_bin is None: Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/mergetrees.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/mergetrees.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/mergetrees.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/mergetrees.py Sun Jun 14 20:58:10 2015 @@ -164,10 +164,7 @@ def set_up_dir_replace(sbox): 'A/B/F/foo/new file' : Item(status=' ', wc_rev=2), 'A/B/F/foo/new file 2' : Item(status=' ', wc_rev=2), }) - actions.run_and_verify_commit(wc_dir, - expected_output, - expected_status, - None, wc_dir) + actions.run_and_verify_commit(wc_dir, expected_output, expected_status) # Merge foo onto C expected_output = wc.State(C_path, { @@ -200,7 +197,7 @@ def set_up_dir_replace(sbox): expected_disk, expected_status, expected_skip, - None, None, None, None, None, 1) + check_props=True) # Commit merge of foo onto C, creating r3. expected_output = wc.State(wc_dir, { 'A/C' : Item(verb='Sending'), @@ -217,10 +214,7 @@ def set_up_dir_replace(sbox): 'A/C/foo/new file 2' : Item(status=' ', wc_rev=3), }) - actions.run_and_verify_commit(wc_dir, - expected_output, - expected_status, - None, wc_dir) + actions.run_and_verify_commit(wc_dir, expected_output, expected_status) # Delete foo on F, creating r4. actions.run_and_verify_svn(None, [], 'rm', foo_path) @@ -234,10 +228,7 @@ def set_up_dir_replace(sbox): 'A/C/foo/new file' : Item(status=' ', wc_rev=3), 'A/C/foo/new file 2' : Item(status=' ', wc_rev=3), }) - actions.run_and_verify_commit(wc_dir, - expected_output, - expected_status, - None, wc_dir) + actions.run_and_verify_commit(wc_dir, expected_output, expected_status) #---------------------------------------------------------------------- def set_up_branch(sbox, branch_only = False, nbr_of_branches = 1): @@ -333,11 +324,7 @@ def set_up_branch(sbox, branch_only = Fa dest_name)) expected_output = wc.State(wc_dir, {dest_name : Item(verb='Adding')}) - actions.run_and_verify_commit(wc_dir, - expected_output, - expected_status, - None, - wc_dir) + actions.run_and_verify_commit(wc_dir, expected_output, expected_status) for i in range(nbr_of_branches): if i == 0: copy_A('A_COPY', i + 2) @@ -354,8 +341,7 @@ def set_up_branch(sbox, branch_only = Fa "New content") expected_output = wc.State(wc_dir, {'A/D/H/psi' : Item(verb='Sending')}) expected_status.tweak('A/D/H/psi', wc_rev=nbr_of_branches + 2) - actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + actions.run_and_verify_commit(wc_dir, expected_output, expected_status) expected_disk.tweak('A/D/H/psi', contents="New content") # r(nbr_of_branches + 3) - modify and commit A/D/G/rho @@ -363,8 +349,7 @@ def set_up_branch(sbox, branch_only = Fa "New content") expected_output = wc.State(wc_dir, {'A/D/G/rho' : Item(verb='Sending')}) expected_status.tweak('A/D/G/rho', wc_rev=nbr_of_branches + 3) - actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + actions.run_and_verify_commit(wc_dir, expected_output, expected_status) expected_disk.tweak('A/D/G/rho', contents="New content") # r(nbr_of_branches + 4) - modify and commit A/B/E/beta @@ -372,8 +357,7 @@ def set_up_branch(sbox, branch_only = Fa "New content") expected_output = wc.State(wc_dir, {'A/B/E/beta' : Item(verb='Sending')}) expected_status.tweak('A/B/E/beta', wc_rev=nbr_of_branches + 4) - actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + actions.run_and_verify_commit(wc_dir, expected_output, expected_status) expected_disk.tweak('A/B/E/beta', contents="New content") # r(nbr_of_branches + 5) - modify and commit A/D/H/omega @@ -381,8 +365,7 @@ def set_up_branch(sbox, branch_only = Fa "New content") expected_output = wc.State(wc_dir, {'A/D/H/omega' : Item(verb='Sending')}) expected_status.tweak('A/D/H/omega', wc_rev=nbr_of_branches + 5) - actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + actions.run_and_verify_commit(wc_dir, expected_output, expected_status) expected_disk.tweak('A/D/H/omega', contents="New content") return expected_disk, expected_status Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/sandbox.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/sandbox.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/sandbox.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/sandbox.py Sun Jun 14 20:58:10 2015 @@ -24,7 +24,6 @@ import os import shutil import copy -import urllib import logging import re @@ -114,7 +113,8 @@ class Sandbox: if empty or not read_only: # use a local repo self.repo_dir = os.path.join(svntest.main.general_repo_dir, self.name) self.repo_url = (svntest.main.options.test_area_url + '/' - + urllib.pathname2url(self.repo_dir)) + + svntest.wc.svn_uri_quote( + self.repo_dir.replace(os.path.sep, '/'))) self.add_test_path(self.repo_dir) else: self.repo_dir = svntest.main.pristine_greek_repos_dir @@ -195,7 +195,8 @@ class Sandbox: path = (os.path.join(svntest.main.general_repo_dir, self.name) + '.' + suffix) url = svntest.main.options.test_area_url + \ - '/' + urllib.pathname2url(path) + '/' + svntest.wc.svn_uri_quote( + path.replace(os.path.sep, '/')) self.add_test_path(path, remove) return path, url @@ -276,6 +277,12 @@ class Sandbox: temporary and 'TEMP' or 'PERM', parts[1]) + def file_protocol_repo_url(self): + """get a file:// url pointing to the repository""" + return svntest.main.file_scheme_prefix + \ + svntest.wc.svn_uri_quote( + os.path.abspath(self.repo_dir).replace(os.path.sep, '/')) + def simple_update(self, target=None, revision='HEAD'): """Update the WC or TARGET. TARGET is a relpath relative to the WC.""" @@ -381,15 +388,18 @@ class Sandbox: raise Exception("Unexpected line '" + line + "' in proplist output" + str(out)) return props - def simple_add_symlink(self, dest, target): - """Create a symlink TARGET pointing to DEST and add it to subversion""" + def simple_symlink(self, dest, target): + """Create a symlink TARGET pointing to DEST""" if svntest.main.is_posix_os(): os.symlink(dest, self.ospath(target)) else: svntest.main.file_write(self.ospath(target), "link %s" % dest) + + def simple_add_symlink(self, dest, target, add=True): + """Create a symlink TARGET pointing to DEST and add it to subversion""" + self.simple_symlink(dest, target) self.simple_add(target) - if not svntest.main.is_posix_os(): - # '*' is evaluated on Windows + if not svntest.main.is_posix_os(): # '*' is evaluated on Windows self.simple_propset('svn:special', 'X', target) def simple_add_text(self, text, *targets): @@ -424,7 +434,7 @@ class Sandbox: def simple_append(self, dest, contents, truncate=False): """Append CONTENTS to file DEST, optionally truncating it first. DEST is a relpath relative to the WC.""" - open(self.ospath(dest), truncate and 'w' or 'a').write(contents) + open(self.ospath(dest), truncate and 'wb' or 'ab').write(contents) def simple_lock(self, *targets): """Lock TARGETS in the WC. Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/tree.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/tree.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/tree.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/tree.py Sun Jun 14 20:58:10 2015 @@ -610,6 +610,11 @@ def detect_conflict_files(node, extra_fi logger.warn(str(node)) raise SVNTreeUnequal(msg) +def detect_conflict_files_done(extra_files): + """Done handler for detect_conflict_files""" + if len(extra_files): + raise SVNTreeError("Not all extra reject files have been accounted for") + ########################################################################### ########################################################################### # EXPORTED ROUTINES ARE BELOW Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/wc.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/wc.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/wc.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/wc.py Sun Jun 14 20:58:10 2015 @@ -141,12 +141,14 @@ class State: self.desc.update(more_desc) - def add_state(self, parent, state): + def add_state(self, parent, state, strict=False): "Import state items from a State object, reparent the items to PARENT." assert isinstance(state, State) for path, item in state.desc.items(): - if path == '': + if strict: + path = parent + path + elif path == '': path = parent else: path = parent + '/' + path @@ -358,6 +360,11 @@ class State: for p, i in self.desc.copy().items(): if p.startswith(path + '/'): del self.desc[p] + elif item.entry_kind == 'file': + # A file has no descendants in svn_wc_entry_t + for p, i in self.desc.copy().items(): + if p.startswith(path + '/'): + del self.desc[p] else: # when reading the entry structures, we don't examine for text or # property mods, so clear those flags. we also do not examine the @@ -434,7 +441,7 @@ class State: return not self.__eq__(other) @classmethod - def from_status(cls, lines): + def from_status(cls, lines, wc_dir=None): """Create a State object from 'svn status' output.""" def not_space(value): @@ -442,6 +449,17 @@ class State: return value return None + def parse_move(path, wc_dir): + if path.startswith('../'): + # ../ style paths are relative from the status root + return to_relpath(os.path.normpath(repos_join(wc_dir, path))) + else: + # Other paths are just relative from cwd + return to_relpath(path) + + if not wc_dir: + wc_dir = '' + desc = { } last = None for line in lines: @@ -455,15 +473,15 @@ class State: if ex_match: if ex_match.group('moved_from'): - path = ex_match.group('moved_from') - last.tweak(moved_from = to_relpath(path)) + path = to_relpath(ex_match.group('moved_from')) + last.tweak(moved_from = parse_move(path, wc_dir)) elif ex_match.group('moved_to'): - path = ex_match.group('moved_to') - last.tweak(moved_to = to_relpath(path)) + path = to_relpath(ex_match.group('moved_to')) + last.tweak(moved_to = parse_move(path, wc_dir)) elif ex_match.group('swapped_with'): - path = ex_match.group('swapped_with') - last.tweak(moved_to = to_relpath(path)) - last.tweak(moved_from = to_relpath(path)) + path = to_relpath(ex_match.group('swapped_with')) + last.tweak(moved_to = parse_move(path, wc_dir)) + last.tweak(moved_from = parse_move(path, wc_dir)) # Parse TC description? @@ -669,8 +687,6 @@ class State: }) desc = { } - dot_svn = svntest.main.get_admin_name() - dump_data = svntest.main.run_entriesdump_tree(base) if not dump_data: @@ -678,6 +694,16 @@ class State: # ### Improve! return cls('', desc) + dirent_join = repos_join + if len(base) == 2 and base[1:]==':' and sys.platform=='win32': + # We have a win32 drive relative path... Auch. Fix joining + def drive_join(a, b): + if len(a) == 2: + return a+b + else: + return repos_join(a,b) + dirent_join = drive_join + for parent, entries in sorted(dump_data.items()): parent_url = entries[''].url @@ -699,11 +725,11 @@ class State: # that we can't put the status as "! " because that gets tweaked # out of our expected tree. item = StateItem(status=' ', wc_rev='?') - desc[repos_join(parent, name)] = item + desc[dirent_join(parent, name)] = item continue item = StateItem.from_entry(entry) if name: - desc[repos_join(parent, name)] = item + desc[dirent_join(parent, name)] = item implied_url = repos_join(parent_url, svn_uri_quote(name)) else: item._url = entry.url # attach URL to directory StateItems @@ -734,7 +760,7 @@ class StateItem: """ def __init__(self, contents=None, props=None, - status=None, verb=None, wc_rev=None, + status=None, verb=None, wc_rev=None, entry_kind=None, entry_rev=None, entry_status=None, entry_copied=None, locked=None, copied=None, switched=None, writelocked=None, treeconflict=None, moved_from=None, moved_to=None, @@ -761,6 +787,9 @@ class StateItem: self.prev_verb = prev_verb # The base revision number of the node in the WC, as a string. self.wc_rev = wc_rev + # If 'file' specifies that the node is a file, and as such has no svn_wc_entry_t + # descendants + self.entry_kind = None # These will be set when we expect the wc_rev/status to differ from those # found in the entries code. self.entry_rev = entry_rev @@ -951,6 +980,20 @@ def svn_uri_quote(url): # ------------ +def python_sqlite_can_read_wc(): + """Check if the Python builtin is capable enough to peek into wc.db""" + + try: + db = svntest.sqlite3.connect('') + + c = db.cursor() + c.execute('select sqlite_version()') + ver = tuple(map(int, c.fetchall()[0][0].split('.'))) + + return ver >= (3, 6, 18) # Currently enough (1.7-1.9) + except: + return False + def open_wc_db(local_path): """Open the SQLite DB for the WC path LOCAL_PATH. Return (DB object, WC root path, WC relpath of LOCAL_PATH).""" @@ -1006,6 +1049,16 @@ def sqlite_stmt(wc_root_path, stmt): c.execute(stmt) return c.fetchall() +def sqlite_exec(wc_root_path, stmt): + """Execute STMT on the SQLite wc.db in WC_ROOT_PATH and return the + results.""" + + db = open_wc_db(wc_root_path)[0] + c = db.cursor() + c.execute(stmt) + db.commit() + + # ------------ ### probably toss these at some point. or major rework. or something. ### just bootstrapping some changes for now. Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/svnversion_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/svnversion_tests.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/svnversion_tests.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/svnversion_tests.py Sun Jun 14 20:58:10 2015 @@ -72,8 +72,7 @@ def svnversion_test(sbox): expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('A/mu', wc_rev=2) if svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, wc_dir): + expected_output, expected_status): raise svntest.Failure # Unmodified, mixed @@ -103,7 +102,7 @@ def svnversion_test(sbox): expected_output, expected_disk, expected_status, - None, None, None, None, None, + [], False, '--ignore-ancestry'): raise svntest.Failure @@ -152,8 +151,7 @@ def svnversion_test(sbox): }) svntest.actions.run_and_verify_checkout(repo_url + "/A", A_A_path, expected_output, expected_disk, - None, None, None, None, - "--depth=files") + [], "--depth=files") # Partial (sparse) checkout svntest.actions.run_and_verify_svnversion(A_A_path, @@ -189,8 +187,7 @@ ext-file -r 1 %s/A/D/H/omega expected_status.tweak('A/C', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, wc_dir) + expected_status) # Update to get it on disk svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir) Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/switch_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/switch_tests.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/switch_tests.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/switch_tests.py Sun Jun 14 20:58:10 2015 @@ -189,8 +189,7 @@ def full_rev_update(sbox): expected_output, expected_disk, expected_status, - None, None, None, - None, None, 1, + [], True, '-r', '1', wc_dir) #---------------------------------------------------------------------- @@ -247,8 +246,7 @@ def update_switched_things(sbox): expected_output, expected_disk, expected_status, - None, None, None, - None, None, 0, + [], False, B_path, iota_path) @@ -305,8 +303,7 @@ def rev_update_switched_things(sbox): expected_output, expected_disk, expected_status, - None, None, None, - None, None, 1, + [], True, '-r', '1', B_path, iota_path) @@ -374,8 +371,8 @@ def delete_subdir(sbox): expected_output, expected_disk, expected_status, - None, None, None, None, None, - False, '--ignore-ancestry') + [], False, + '--ignore-ancestry') #---------------------------------------------------------------------- # Issue 1532: Switch a file to a dir: can't switch it back to the file @@ -589,8 +586,9 @@ def bad_intermediate_urls(sbox): }) actions.run_and_verify_switch(wc_dir, wc_dir, url_A_C, expected_output, - expected_disk, expected_status, None, None, - None, None, None, False, '--ignore-ancestry') + expected_disk, expected_status, + [], False, + '--ignore-ancestry') # However, the URL for wc/A should now reflect ^/A/C/A, not something else. expected_infos = [ @@ -614,7 +612,7 @@ def bad_intermediate_urls(sbox): expected_status.tweak('A/Z', treeconflict=None) actions.run_and_verify_update(wc_dir, expected_output, expected_disk, - expected_status, None, None, None, None, None, False, wc_dir) + expected_status) @@ -664,8 +662,7 @@ def obstructed_switch(sbox): expected_status = actions.get_virginal_state(wc_dir, 1) expected_status.remove('A/B/E/alpha') - actions.run_and_verify_commit(wc_dir, expected_output, expected_status, - None, wc_dir) + actions.run_and_verify_commit(wc_dir, expected_output, expected_status) # echo "hello" >> A/B/E/alpha main.file_append(A_B_E_alpha, 'hello') @@ -686,8 +683,8 @@ def obstructed_switch(sbox): actions.run_and_verify_switch(wc_dir, A_B_E, url_A_B_Esave, expected_output, expected_disk, - expected_status, None, None, None, None, - None, False, '--ignore-ancestry') + expected_status, + [], False, '--ignore-ancestry') # svn status expected_status.add({ @@ -743,7 +740,7 @@ def commit_mods_below_switch(sbox): expected_output, expected_disk, expected_status, - None, None, None, None, None, + [], False, '--ignore-ancestry') D_path = sbox.ospath('A/D') @@ -763,7 +760,7 @@ def commit_mods_below_switch(sbox): # with "'A/C/E' is missing or not locked" svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, - None, C_path, D_path) + [], C_path, D_path) #---------------------------------------------------------------------- # Issue 2306. @@ -774,7 +771,7 @@ def refresh_read_only_attribute(sbox): # behavior, just skip the test. if os.name == 'posix': if os.geteuid() == 0: - raise svntest.Skip + raise svntest.Skip('Test doesn\'t work as uid 0') sbox.build() wc_dir = sbox.wc_dir @@ -801,7 +798,7 @@ def refresh_read_only_attribute(sbox): expected_status.tweak('A/mu', wc_rev=3) svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, - None, mu_path) + [], mu_path) # The file on which svn:needs-lock was set is now expected to be read-only. if os.access(mu_path, os.W_OK): @@ -822,7 +819,7 @@ def refresh_read_only_attribute(sbox): expected_output, expected_disk, expected_status, - None, None, None, None, None, + [], False, '--ignore-ancestry') # The file with we set svn:needs-lock on should now be writable, but @@ -945,8 +942,7 @@ def forced_switch(sbox): svntest.actions.run_and_verify_switch(sbox.wc_dir, F_path, AD_url, expected_output, expected_disk, - expected_status, None, - None, None, None, None, False, + expected_status, [], False, '--force', '--ignore-ancestry') #---------------------------------------------------------------------- @@ -1061,8 +1057,8 @@ def forced_switch_failures(sbox): expected_status.tweak('A/C', switched='S') actions.run_and_verify_switch(wc_dir, A_C, url_A_D, expected_output, - expected_disk, expected_status, None, None, - None, None, None, False, '--force', + expected_disk, expected_status, [], False, + '--force', '--ignore-ancestry') @@ -1088,8 +1084,8 @@ def forced_switch_failures(sbox): expected_status.tweak('A/B/F', switched='S') actions.run_and_verify_switch(wc_dir, A_B_F, url_A_D_G, expected_output, - expected_disk, expected_status, None, None, - None, None, None, False, '--force', + expected_disk, expected_status, [], False, + '--force', '--ignore-ancestry') # svn info A/B/F/pi @@ -1142,9 +1138,8 @@ def forced_switch_failures(sbox): }) actions.run_and_verify_switch(wc_dir, A_D_G, url_A_D_H, expected_output, - None, None, None, - None, None, None, None, - False, '--force', '--ignore-ancestry') + None, None, [], False, + '--force', '--ignore-ancestry') # Delete all three obstructions and finish the update. # rm -rf A/D/G/I @@ -1203,7 +1198,7 @@ def forced_switch_failures(sbox): svntest.main.run_svn(None, 'revert', '-R', sbox.ospath('A/C/H')) actions.run_and_verify_update(wc_dir, expected_output, expected_disk, - expected_status, None, None, None, None, None, False, wc_dir) + expected_status) def switch_with_obstructing_local_adds(sbox): @@ -1282,9 +1277,6 @@ def switch_with_obstructing_local_adds(s 'A/B/F/I' : Item(status='A ', wc_rev='-', entry_rev='0'), }) - # "Extra" files that we expect to result from the conflicts. - extra_files = ['pi\.r0', 'pi\.r1', 'pi\.mine'] - # Do the switch and check the results in three ways. F_path = sbox.ospath('A/B/F') D_url = sbox.repo_url + '/A/D' @@ -1293,9 +1285,7 @@ def switch_with_obstructing_local_adds(s expected_output, expected_disk, expected_status, - None, - svntest.tree.detect_conflict_files, - extra_files, None, None, False, + [], False, '--ignore-ancestry') #---------------------------------------------------------------------- @@ -1391,9 +1381,7 @@ def mergeinfo_switch_elision(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Make some changes under A/B @@ -1403,7 +1391,7 @@ def mergeinfo_switch_elision(sbox): {'A/B/E/beta' : Item(verb='Sending')}) expected_status.tweak('A/B/E/beta', wc_rev=3) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # r4 - modify and commit A/B/E/alpha svntest.main.file_write(alpha_path, "New content") @@ -1411,7 +1399,7 @@ def mergeinfo_switch_elision(sbox): {'A/B/E/alpha' : Item(verb='Sending')}) expected_status.tweak('A/B/E/alpha', wc_rev=4) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Merge r2:4 into A/B_COPY_1 expected_output = svntest.wc.State(B_COPY_1_path, { @@ -1448,8 +1436,7 @@ def mergeinfo_switch_elision(sbox): expected_merge_disk, expected_merge_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # r5 - Commit the merge into A/B_COPY_1/E expected_output = svntest.wc.State( @@ -1463,7 +1450,7 @@ def mergeinfo_switch_elision(sbox): expected_status.tweak('A/B_COPY_1/E/beta', wc_rev=5) expected_status.tweak('A/B_COPY_1/lambda', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, None, wc_dir) + expected_status) # Merge r2:4 into A/B_COPY_2/E expected_output = svntest.wc.State(E_COPY_2_path, { @@ -1494,8 +1481,7 @@ def mergeinfo_switch_elision(sbox): expected_merge_disk, expected_merge_status, expected_skip, - None, None, None, None, - None, 1) + check_props=True) # Switch A/B_COPY_2 to URL of A/B_COPY_1. The local mergeinfo for r1,3-4 # on A/B_COPY_2/E is identical to the mergeinfo added to A/B_COPY_2 as a @@ -1549,7 +1535,7 @@ def mergeinfo_switch_elision(sbox): expected_output, expected_disk, expected_status, - None, None, None, None, None, True, + [], True, '--ignore-ancestry') # Now check a switch which reverses and earlier switch and leaves @@ -1571,7 +1557,7 @@ def mergeinfo_switch_elision(sbox): expected_output, expected_disk, expected_status, - None, None, None, None, None, True, + [], True, '--ignore-ancestry') svntest.actions.run_and_verify_svn(["property '" + SVN_PROP_MERGEINFO + @@ -1592,7 +1578,7 @@ def mergeinfo_switch_elision(sbox): expected_output, expected_disk, expected_status, - None, None, None, None, None, True, + [], True, '--ignore-ancestry') #---------------------------------------------------------------------- @@ -1622,8 +1608,8 @@ def switch_with_depth(sbox): svntest.actions.run_and_verify_switch(wc_dir, AB_path, AD_url, expected_output, expected_disk, - expected_status, None, - None, None, None, None, False, + expected_status, + [], False, '--depth', 'empty', '--ignore-ancestry') # Set up expected results for reverting 'switch --depth=empty' @@ -1634,8 +1620,8 @@ def switch_with_depth(sbox): svntest.actions.run_and_verify_switch(wc_dir, AB_path, AB_url, expected_output, expected_disk, - expected_status, None, - None, None, None, None, False, + expected_status, + [], False, '--depth', 'empty', '--ignore-ancestry') # Set up expected results of 'switch --depth=files' @@ -1661,8 +1647,8 @@ def switch_with_depth(sbox): svntest.actions.run_and_verify_switch(wc_dir, AB_path, AD_url, expected_output, expected_disk, - expected_status, None, - None, None, None, None, False, + expected_status, + [], False, '--depth', 'files', '--ignore-ancestry') # Set up expected results for reverting 'switch --depth=files' @@ -1676,8 +1662,8 @@ def switch_with_depth(sbox): svntest.actions.run_and_verify_switch(wc_dir, AB_path, AB_url, expected_output, expected_disk, - expected_status, None, - None, None, None, None, False, + expected_status, + [], False, '--depth', 'files', '--ignore-ancestry') # Putting the depth=immediates stuff in a subroutine, because we're @@ -1714,8 +1700,8 @@ def switch_with_depth(sbox): svntest.actions.run_and_verify_switch(wc_dir, AB_path, AD_url, expected_output, expected_disk, - expected_status, None, - None, None, None, None, False, + expected_status, + [], False, '--depth', 'immediates', '--ignore-ancestry') @@ -1739,8 +1725,8 @@ def switch_with_depth(sbox): svntest.actions.run_and_verify_switch(wc_dir, AB_path, AB_url, expected_output, expected_disk, - expected_status, None, - None, None, None, None, False, + expected_status, + [], False, '--ignore-ancestry') # Okay, repeat 'switch --depth=immediates'. (Afterwards we'll @@ -1765,8 +1751,8 @@ def switch_with_depth(sbox): svntest.actions.run_and_verify_switch(wc_dir, AB_path, AB_url, expected_output, expected_disk, - expected_status, None, - None, None, None, None, False, + expected_status, + [], False, '--depth', 'infinity', '--ignore-ancestry') @@ -1826,8 +1812,8 @@ def switch_to_dir_with_peg_rev(sbox): svntest.actions.run_and_verify_switch(wc_dir, X_path, ADG_url + '@3', expected_output, expected_disk, - expected_status, None, - None, None, None, None, False, + expected_status, + [], False, '-r', '2', '--ignore-ancestry') def switch_urls_with_spaces(sbox): @@ -1873,7 +1859,7 @@ def switch_urls_with_spaces(sbox): expected_output, expected_disk, expected_status, - None, None, None, None, None, + [], False, '--ignore-ancestry') # Test 2: switch file 'bar baz bal' to 'tau pau mau' @@ -1900,7 +1886,7 @@ def switch_urls_with_spaces(sbox): expected_output, expected_disk, expected_status, - None, None, None, None, None, + [], False, '--ignore-ancestry') def switch_to_dir_with_peg_rev2(sbox): @@ -1963,8 +1949,7 @@ def switch_to_dir_with_peg_rev2(sbox): svntest.actions.run_and_verify_switch(wc_dir, X_path, ADY_url + '@HEAD', expected_output, expected_disk, - expected_status, None, - None, None, None, None, False, + expected_status, [], False, '-r', '2', '--ignore-ancestry') def switch_to_root(sbox): @@ -2016,7 +2001,7 @@ def switch_to_root(sbox): expected_output, expected_disk, expected_status, - None, None, None, None, None, + [], False, '--ignore-ancestry') #---------------------------------------------------------------------- @@ -2048,7 +2033,7 @@ def tolerate_local_mods(sbox): svntest.main.file_write(LM_path, 'Locally modified file.\n', 'w+') expected_output = svntest.wc.State(wc_dir, { - 'A/L' : Item(status='D '), + 'A/L' : Item(status=' ', treeconflict='C'), }) expected_disk = svntest.main.greek_state.copy() @@ -2060,13 +2045,16 @@ def tolerate_local_mods(sbox): expected_status = svntest.actions.get_virginal_state(wc_dir, 3) expected_status.tweak('', 'iota', wc_rev=1) expected_status.tweak('A', switched='S') + expected_status.add({ + 'A/L' : Item(status='A ', copied='+', treeconflict='C', wc_rev='-') + }) # Used to fail with locally modified or unversioned files svntest.actions.run_and_verify_switch(wc_dir, A_path, A2_url, expected_output, expected_disk, expected_status, - None, None, None, None, None, + [], False, '--ignore-ancestry') #---------------------------------------------------------------------- @@ -2121,7 +2109,7 @@ def tree_conflicts_on_switch_1_1(sbox): 'DDF/D1/D2' : Item(status=' ', treeconflict='U'), 'DDF/D1/D2/gamma' : Item(status=' ', treeconflict='U') }) - + expected_disk = svntest.wc.State('', { 'F' : Item(), 'D' : Item(), @@ -2391,12 +2379,12 @@ def tree_conflicts_on_switch_2_2(sbox): expected_output = deep_trees_conflict_output expected_disk = svntest.wc.State('', { + 'DDF/D1/D2' : Item(), 'F' : Item(), 'D' : Item(), - 'DF' : Item(), - 'DD' : Item(), - 'DDF' : Item(), - 'DDD' : Item(), + 'DF/D1' : Item(), + 'DD/D1' : Item(), + 'DDD/D1/D2' : Item(), }) expected_status = svntest.deeptrees.deep_trees_virginal_state.copy() @@ -2408,20 +2396,16 @@ def tree_conflicts_on_switch_2_2(sbox): # Expect the incoming tree deletes and the local leaf deletes to mean # that all deleted paths are *really* gone, not simply scheduled for # deletion. - expected_status.tweak('F/alpha', - 'D/D1', - 'DD/D1', - 'DF/D1', - 'DDD/D1', - 'DDF/D1', + expected_status.tweak('DD/D1', 'DF/D1', 'DDF/D1', 'DDD/D1', + status='A ', copied='+', treeconflict='C', + wc_rev='-') + expected_status.tweak('DDF/D1/D2', 'DDD/D1/D2', + copied='+', wc_rev='-') + expected_status.tweak('DD/D1/D2', 'DF/D1/beta', 'DDD/D1/D2/D3', + 'DDF/D1/D2/gamma', + status='D ', copied='+', wc_rev='-') + expected_status.tweak('F/alpha', 'D/D1', status='! ', treeconflict='C', wc_rev=None) - # Remove from expected status and disk everything below the deleted paths. - expected_status.remove('DD/D1/D2', - 'DF/D1/beta', - 'DDD/D1/D2', - 'DDD/D1/D2/D3', - 'DDF/D1/D2', - 'DDF/D1/D2/gamma',) expected_info = { 'F/alpha' : { @@ -2432,13 +2416,13 @@ def tree_conflicts_on_switch_2_2(sbox): }, 'DF/D1' : { 'Tree conflict' : - '^local dir delete, incoming dir delete or move upon switch' + '^local dir edit, incoming dir delete or move upon switch' + ' Source left: .dir.*/DF/D1@2' + ' Source right: .none.*(/DF/D1@3)?$', }, 'DDF/D1' : { 'Tree conflict' : - '^local dir delete, incoming dir delete or move upon switch' + '^local dir edit, incoming dir delete or move upon switch' + ' Source left: .dir.*/DDF/D1@2' + ' Source right: .none.*(/DDF/D1@3)?$', }, @@ -2450,13 +2434,13 @@ def tree_conflicts_on_switch_2_2(sbox): }, 'DD/D1' : { 'Tree conflict' : - '^local dir delete, incoming dir delete or move upon switch' + '^local dir edit, incoming dir delete or move upon switch' + ' Source left: .dir.*/DD/D1@2' + ' Source right: .none.*(/DD/D1@3)?$', }, 'DDD/D1' : { 'Tree conflict' : - '^local dir delete, incoming dir delete or move upon switch' + '^local dir edit, incoming dir delete or move upon switch' + ' Source left: .dir.*/DDD/D1@2' + ' Source right: .none.*(/DDD/D1@3)?$', }, @@ -2671,7 +2655,7 @@ def different_node_kind(sbox): expected_status.add_state(rel_path, pristine_status.subtree(rel_url)) svntest.actions.run_and_verify_switch(sbox.wc_dir, full_path, full_url, None, expected_disk, expected_status, - None, None, None, None, None, False, + [], False, '--ignore-ancestry') svntest.actions.run_and_verify_svn(None, [], 'info', full_path) if not os.path.isdir(full_path): @@ -2687,7 +2671,7 @@ def different_node_kind(sbox): expected_status.tweak(rel_path, switched='S') svntest.actions.run_and_verify_switch(sbox.wc_dir, full_path, full_url, None, expected_disk, expected_status, - None, None, None, None, None, False, + [], False, '--ignore-ancestry') svntest.actions.run_and_verify_svn(None, [], 'info', full_path) if not os.path.isfile(full_path): @@ -2752,15 +2736,15 @@ def switch_across_replacement(sbox): }) svntest.actions.run_and_verify_update(sbox.wc_dir, expected_output, None, None, - None, None, None, None, None, False, + [], False, '-r1') svntest.actions.run_and_verify_update(sbox.wc_dir, expected_output, None, None, - None, None, None, None, None, False, + [], False, '-r2') svntest.actions.run_and_verify_switch(sbox.wc_dir, sbox.ospath('A'), '^/A', expected_output, None, None, - None, None, None, None, None, False, + [], False, '-r1') @Issue(1975) @@ -2783,8 +2767,7 @@ def switch_keywords(sbox): contents="$URL: %s/A/D/H/psi $\n" % sbox.repo_url) svntest.actions.run_and_verify_update(sbox.wc_dir, - None, expected_disk, - None, None, None, None, None, None) + None, expected_disk, None) sbox.simple_copy('A', 'A_copy') sbox.simple_commit() sbox.simple_update() @@ -2848,8 +2831,7 @@ def switch_keywords(sbox): # both gamma and psi should have update URLs after the switch svntest.actions.run_and_verify_switch(sbox.wc_dir, sbox.ospath('A'), '^/A_copy', - None, expected_disk, expected_status, - None, None, None, None, None) + None, expected_disk, expected_status) @Issue(4524) def switch_moves(sbox): @@ -2890,8 +2872,7 @@ def switch_moves(sbox): # It would be nice if we could handle the tree conflict more intelligent, as # the working copy matches the incomming change. svntest.actions.run_and_verify_switch(sbox.wc_dir, sbox.ospath(''), branch_url, - None, expected_disk, expected_status, - None, None, None, None, None) + None, expected_disk, expected_status) ######################################################################## Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/trans_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/trans_tests.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/trans_tests.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/trans_tests.py Sun Jun 14 20:58:10 2015 @@ -298,7 +298,7 @@ def keywords_from_birth(sbox): }) svntest.actions.run_and_verify_commit(wc_dir, expected_output, - None, None, wc_dir) + None) # Make sure the unexpanded URL keyword got expanded correctly. fp = open(url_unexp_path, 'r') @@ -449,9 +449,6 @@ def keywords_from_birth(sbox): # This is a slight rewrite of his test, to use the run_and_verify_* API. # This is for issue #631. -def do_nothing(x, y): - return 0 - @Issue(631) def update_modified_with_translation(sbox): "update modified file with eol-style 'native'" @@ -479,7 +476,7 @@ def update_modified_with_translation(sbo svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, - None, rho_path) + [], rho_path) # Change rho again svntest.main.file_write(rho_path, "1\n2\n3\n4\n4.5\n5\n6\n7\n8\n9\n") @@ -491,7 +488,7 @@ def update_modified_with_translation(sbo svntest.actions.run_and_verify_commit(wc_dir, expected_output, expected_status, - None, rho_path) + [], rho_path) # Locally modify rho again. svntest.main.file_write(rho_path, "1\n2\n3\n4\n4.5\n5\n6\n7\n8\n9\n10\n") @@ -533,13 +530,14 @@ def update_modified_with_translation(sbo # Updating back to revision 1 should not error; the merge should # work, with eol-translation turned on. + extra_files = ['rho.r1', 'rho.r3', 'rho.mine'] svntest.actions.run_and_verify_update(wc_dir, expected_output, expected_disk, - None, None, - do_nothing, None, - None, None, - 0, '-r', '1', wc_dir) + None, + [], False, + '-r', '1', wc_dir, + extra_files=extra_files) #---------------------------------------------------------------------- @@ -667,8 +665,7 @@ def cat_keyword_expansion(sbox): expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('A/mu', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, wc_dir) + expected_output, expected_status) # Change the author to value which will get truncated on expansion full_author = "x" * 400 @@ -680,7 +677,7 @@ def cat_keyword_expansion(sbox): sbox.wc_dir) svntest.actions.run_and_verify_svn([ full_author ], [], 'propget', '--revprop', '-r2', - 'svn:author', '--strict', + 'svn:author', '--no-newline', sbox.wc_dir) # Make another commit so that the last changed revision for A/mu is @@ -692,8 +689,7 @@ def cat_keyword_expansion(sbox): }) expected_status.tweak('A/B/lambda', wc_rev=3) svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, wc_dir) + expected_output, expected_status) # At one stage the keywords were expanded to values for the requested # revision, not to those committed revision @@ -729,8 +725,7 @@ def copy_propset_commit(sbox): }) expected_status.tweak('A/mu2', status=' ', wc_rev=2, copied=None) svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, wc_dir) + expected_output, expected_status) #---------------------------------------------------------------------- # Create a greek tree, commit a keyword into one file, @@ -752,8 +747,7 @@ def propset_commit_checkout_nocrash(sbox expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('A/mu', wc_rev=2) svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, wc_dir) + expected_output, expected_status) # Set property to do keyword expansion on A/mu, commit. svntest.actions.run_and_verify_svn(None, [], @@ -764,8 +758,7 @@ def propset_commit_checkout_nocrash(sbox expected_status = svntest.actions.get_virginal_state(wc_dir, 1) expected_status.tweak('A/mu', wc_rev=3) svntest.actions.run_and_verify_commit(wc_dir, - expected_output, expected_status, - None, wc_dir) + expected_output, expected_status) # Check out into another wc dir other_wc_dir = sbox.add_wc_path('other') @@ -833,9 +826,7 @@ def props_only_file_update(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Create r3 that drops svn:keywords @@ -848,9 +839,7 @@ def props_only_file_update(sbox): svntest.actions.run_and_verify_commit(wc_dir, expected_output, - expected_status, - None, - wc_dir) + expected_status) # Now, go back to r2. iota should have the Author keyword expanded. expected_disk = svntest.main.greek_state.copy() @@ -860,9 +849,7 @@ def props_only_file_update(sbox): svntest.actions.run_and_verify_update(wc_dir, None, None, expected_status, - None, - None, None, None, None, - False, + [], False, wc_dir, '-r', '2') if open(iota_path).read() != ''.join(content_expanded): @@ -875,11 +862,7 @@ def props_only_file_update(sbox): expected_status = svntest.actions.get_virginal_state(wc_dir, 3) svntest.actions.run_and_verify_update(wc_dir, - None, expected_disk, expected_status, - None, - None, None, None, None, - False, - wc_dir) + None, expected_disk, expected_status) if open(iota_path).read() != ''.join(content): raise svntest.Failure("$Author$ is not contracted in 'iota'") Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/tree_conflict_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/tree_conflict_tests.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/tree_conflict_tests.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/tree_conflict_tests.py Sun Jun 14 20:58:10 2015 @@ -444,7 +444,7 @@ def ensure_tree_conflict(sbox, operation # For switch/merge, there is no such precondition. if operation == 'update': logger.debug("--- Trying to commit (expecting 'out-of-date' error)") - run_and_verify_commit(".", None, None, "Commit failed", + run_and_verify_commit(".", None, None, ".*Commit failed.*", target_path) if modaction.startswith('f'): @@ -802,8 +802,7 @@ def force_del_tc_inside(sbox): }) run_and_verify_update(wc_dir, expected_output, expected_disk, expected_status, - None, None, None, None, None, 1, - wc_dir) + check_props=True) # Delete A/C with --force, in effect disarming the tree-conflicts. run_and_verify_svn(verify.UnorderedOutput(['D ' + C + '\n', @@ -824,8 +823,7 @@ def force_del_tc_inside(sbox): expected_status.remove('A/C') run_and_verify_commit(wc_dir, - expected_output, expected_status, None, - wc_dir) + expected_output, expected_status) #---------------------------------------------------------------------- @@ -887,8 +885,7 @@ def force_del_tc_is_target(sbox): }) run_and_verify_update(wc_dir, expected_output, expected_disk, expected_status, - None, None, None, None, None, 1, - wc_dir) + check_props=True) # Delete nodes with --force, in effect disarming the tree-conflicts. run_and_verify_svn(['D ' + dir + '\n', @@ -904,8 +901,7 @@ def force_del_tc_is_target(sbox): expected_output = wc.State(wc_dir, {}) run_and_verify_commit(wc_dir, - expected_output, expected_status, None, - wc_dir) + expected_output, expected_status) #---------------------------------------------------------------------- @@ -956,8 +952,7 @@ def query_absent_tree_conflicted_dir(sbo treeconflict='C')}) run_and_verify_update(wc_dir, expected_output, expected_disk, expected_status, - None, None, None, None, None, 1, - wc_dir) + check_props=True) # Delete A/C with --keep-local. run_and_verify_svn(verify.UnorderedOutput(['D ' + C_C_path + '\n', @@ -1030,8 +1025,7 @@ def up_add_onto_add_revert(sbox): run_and_verify_update(wc2_dir, None, expected_disk, expected_status, - None, None, None, None, None, 1, - wc2_dir) + check_props=True) # Currently (r927086), this removes dir2 and file2 in a way that # they don't reappear after update. @@ -1048,8 +1042,7 @@ def up_add_onto_add_revert(sbox): # the repository run_and_verify_update(wc2_dir, None, expected_disk, expected_status, - None, None, None, None, None, 1, - wc2_dir) + check_props=True) #---------------------------------------------------------------------- @@ -1086,8 +1079,7 @@ def lock_update_only(sbox): expected_status.tweak('iota', status='D ', writelocked='K') run_and_verify_update(wc_dir, None, expected_disk, expected_status, - None, None, None, None, None, 1, - wc_dir) + check_props=True) #---------------------------------------------------------------------- @@ -1449,7 +1441,6 @@ def update_dir_with_not_present(sbox): run_and_verify_svn(None, [], 'ci', '-m', '', wc_dir) -@XFail() def update_delete_mixed_rev(sbox): "update that deletes mixed-rev" @@ -1484,10 +1475,13 @@ def update_delete_mixed_rev(sbox): status='A ', copied='+', treeconflict='C', wc_rev='-') expected_status.tweak('A/B/F', 'A/B/E', 'A/B/E/beta', 'A/B/lambda', copied='+', wc_rev='-') + + # The entries world doesn't see a changed revision as another add + # while the WC-NG world does... + expected_status.tweak('A/B/E', status='A ', entry_status=' ') run_and_verify_update(wc_dir, expected_output, expected_disk, expected_status, - None, None, None, None, None, 1, - wc_dir) + check_props=True) # Resolving to working state should give a mixed-revision copy that # gets committed as multiple copies @@ -1501,8 +1495,7 @@ def update_delete_mixed_rev(sbox): 'A/B/E/beta', 'A/B/lambda', status=' ', wc_rev=4, copied=None, treeconflict=None) run_and_verify_commit(wc_dir, - expected_output, expected_status, None, - wc_dir) + expected_output, expected_status) expected_info = { 'Name': 'alpha2',
