@SkipUnless(svntest.main.is_fs_type_fsfs)
def verify_invalid_path_changes(sbox):
    'detect invalid changed path list entries'
    if svntest.main.options.fsfs_packing:
        raise svntest.Skip('fsfs packing set')
    sbox.build(create_wc=False)
    repo_url = sbox.repo_url
    for r in range(2, 20):
        svntest.actions.run_and_verify_svn(None, [], 'mkdir', '-m', 'log_msg', ((sbox.repo_url + '/B') + str(r)))
    set_changed_path_list(sbox, 2, b'_0.0.t1-1 add-dir false false /A\n\n')
    set_changed_path_list(sbox, 4, b'_0.0.t3-2 add-dir false false /C/X\n\n')
    set_changed_path_list(sbox, 6, b'_0.0.t5-2 delete-dir false false /C\n\n')
    set_changed_path_list(sbox, 8, b'_0.0.t7-2 delete-file false false /B3\n\n')
    set_changed_path_list(sbox, 10, b'_0.0.t9-2 add-dir false false /B10\n6 /B8\n')
    set_changed_path_list(sbox, 12, b'_0.0.t11-2 add-file false false /B12\n9 /B8\n')
    set_changed_path_list(sbox, 14, b'_0.0.t13-2 modify-file false false /A/D/H/foo\n\n')
    set_changed_path_list(sbox, 16, b'_0.0.t15-2 modify-file false false /B12\n\n')
    set_changed_path_list(sbox, 18, b'_0.0.t17-2 replace-file false false /A/D/H/foo\n\n')
    (exit_code, output, errput) = svntest.main.run_svnadmin('verify', '--keep-going', sbox.repo_dir)
    exp_out1 = svntest.verify.RegexListOutput(['.*Verified revision 0.', '.*Verified revision 1.', '.*Verified revision 3.', '.*Verified revision 5.', '.*Verified revision 7.', '.*Verified revision 8.', '.*Verified revision 9.', '.*Verified revision 11.', '.*Verified revision 13.', '.*Verified revision 15.', '.*Verified revision 17.', '.*Verified revision 19.', '.*', '.*Summary.*', '.*r2: E160020:.*', '.*r2: E160020:.*', '.*r4: E160013:.*', '.*r6: E160013:.*', '.*r6: E160013:.*', '.*r10: E160013:.*', '.*r10: E160013:.*', '.*r12: E145001:.*', '.*r12: E145001:.*', '.*r14: E160013:.*', '.*r14: E160013:.*', '.*r16: E145001:.*', '.*r16: E145001:.*', '.*r18: E160013:.*', '.*r18: E160013:.*'])
    exp_err1 = svntest.verify.RegexListOutput(['.*Error verifying revision 2.', 'svnadmin: E160020:.*', 'svnadmin: E160020:.*', '.*Error verifying revision 4.', 'svnadmin: E160013:.*', '.*Error verifying revision 6.', 'svnadmin: E160013:.*', 'svnadmin: E160013:.*', '.*Error verifying revision 10.', 'svnadmin: E160013:.*', 'svnadmin: E160013:.*', '.*Error verifying revision 12.', 'svnadmin: E145001:.*', 'svnadmin: E145001:.*', '.*Error verifying revision 14.', 'svnadmin: E160013:.*', 'svnadmin: E160013:.*', '.*Error verifying revision 16.', 'svnadmin: E145001:.*', 'svnadmin: E145001:.*', '.*Error verifying revision 18.', 'svnadmin: E160013:.*', 'svnadmin: E160013:.*', 'svnadmin: E205012:.*'], False)
    exp_out2 = svntest.verify.RegexListOutput(['.*Verified revision 0.', '.*Verified revision 1.', '.*Verified revision 3.', '.*Verified revision 5.', '.*Verified revision 7.', '.*Verified revision 8.', '.*Verified revision 9.', '.*Verified revision 11.', '.*Verified revision 13.', '.*Verified revision 15.', '.*Verified revision 17.', '.*Verified revision 19.', '.*', '.*Summary.*', '.*r2: E160020:.*', '.*r2: E160020:.*', '.*r4: E160013:.*', '.*r6: E160013:.*', '.*r10: E160013:.*', '.*r10: E160013:.*', '.*r12: E145001:.*', '.*r12: E145001:.*', '.*r14: E160013:.*', '.*r16: E145001:.*', '.*r16: E145001:.*', '.*r18: E160013:.*'])
    exp_err2 = svntest.verify.RegexListOutput(['.*Error verifying revision 2.', 'svnadmin: E160020:.*', 'svnadmin: E160020:.*', '.*Error verifying revision 4.', 'svnadmin: E160013:.*', '.*Error verifying revision 6.', 'svnadmin: E160013:.*', '.*Error verifying revision 10.', 'svnadmin: E160013:.*', 'svnadmin: E160013:.*', '.*Error verifying revision 12.', 'svnadmin: E145001:.*', 'svnadmin: E145001:.*', '.*Error verifying revision 14.', 'svnadmin: E160013:.*', '.*Error verifying revision 16.', 'svnadmin: E145001:.*', 'svnadmin: E145001:.*', '.*Error verifying revision 18.', 'svnadmin: E160013:.*', 'svnadmin: E205012:.*'], False)
    try:
        rev6_line = errput.index('* Error verifying revision 6.\n')
        rev10_line = errput.index('* Error verifying revision 10.\n')
        error_count = 0
        for line in errput[(rev6_line + 1):rev10_line]:
            if ('svnadmin: E' in line):
                error_count = (error_count + 1)
        if (error_count == 1):
            exp_out = exp_out2
            exp_err = exp_err2
        else:
            exp_out = exp_out1
            exp_err = exp_err1
    except ValueError:
        exp_out = exp_out1
        exp_err = exp_err1
    if svntest.main.fs_has_rep_sharing():
        exp_out.insert(0, '.*Verifying.*metadata.*')
    if (svntest.main.options.fsfs_sharding is not None):
        for x in range(0, (19 / svntest.main.options.fsfs_sharding)):
            exp_out.insert(0, '.*Verifying.*metadata.*')
    if svntest.main.is_fs_log_addressing():
        exp_out.insert(0, '.*Verifying.*metadata.*')
    if svntest.verify.verify_outputs("Unexpected error while running 'svnadmin verify'.", output, errput, exp_out, exp_err):
        raise svntest.Failure
    (exit_code, output, errput) = svntest.main.run_svnadmin('verify', sbox.repo_dir)
    exp_out = svntest.verify.RegexListOutput(['.*Verified revision 0.', '.*Verified revision 1.'])
    exp_err = svntest.verify.RegexListOutput(['.*Error verifying revision 2.', 'svnadmin: E160020:.*', 'svnadmin: E160020:.*'], False)
    if svntest.main.fs_has_rep_sharing():
        exp_out.insert(0, '.*Verifying.*metadata.*')
    if (svntest.main.options.fsfs_sharding is not None):
        for x in range(0, (19 / svntest.main.options.fsfs_sharding)):
            exp_out.insert(0, '.*Verifying.*metadata.*')
    if svntest.main.is_fs_log_addressing():
        exp_out.insert(0, '.*Verifying.*metadata.*')
    if svntest.verify.verify_outputs("Unexpected error while running 'svnadmin verify'.", output, errput, exp_out, exp_err):
        raise svntest.Failure
    (exit_code, output, errput) = svntest.main.run_svnadmin('verify', '--quiet', sbox.repo_dir)
    exp_out = []
    exp_err = svntest.verify.RegexListOutput(['.*Error verifying revision 2.', 'svnadmin: E160020:.*', 'svnadmin: E160020:.*'], False)
    if svntest.verify.verify_outputs("Output of 'svnadmin verify' is unexpected.", output, errput, exp_out, exp_err):
        raise svntest.Failure
    svntest.main.safe_rmtree(sbox.repo_dir, True)
detect invalid changed path list entries
@SkipUnless(svntest.main.is_fs_type_fsfs)
def verify_invalid_path_changes(sbox):
    
    if svntest.main.options.fsfs_packing:
        raise svntest.Skip('fsfs packing set')
    sbox.build(create_wc=False)
    repo_url = sbox.repo_url
    for r in range(2, 20):
        svntest.actions.run_and_verify_svn(None, [], 'mkdir', '-m', 'log_msg', ((sbox.repo_url + '/B') + str(r)))
    set_changed_path_list(sbox, 2, b'_0.0.t1-1 add-dir false false /A\n\n')
    set_changed_path_list(sbox, 4, b'_0.0.t3-2 add-dir false false /C/X\n\n')
    set_changed_path_list(sbox, 6, b'_0.0.t5-2 delete-dir false false /C\n\n')
    set_changed_path_list(sbox, 8, b'_0.0.t7-2 delete-file false false /B3\n\n')
    set_changed_path_list(sbox, 10, b'_0.0.t9-2 add-dir false false /B10\n6 /B8\n')
    set_changed_path_list(sbox, 12, b'_0.0.t11-2 add-file false false /B12\n9 /B8\n')
    set_changed_path_list(sbox, 14, b'_0.0.t13-2 modify-file false false /A/D/H/foo\n\n')
    set_changed_path_list(sbox, 16, b'_0.0.t15-2 modify-file false false /B12\n\n')
    set_changed_path_list(sbox, 18, b'_0.0.t17-2 replace-file false false /A/D/H/foo\n\n')
    (exit_code, output, errput) = svntest.main.run_svnadmin('verify', '--keep-going', sbox.repo_dir)
    exp_out1 = svntest.verify.RegexListOutput(['.*Verified revision 0.', '.*Verified revision 1.', '.*Verified revision 3.', '.*Verified revision 5.', '.*Verified revision 7.', '.*Verified revision 8.', '.*Verified revision 9.', '.*Verified revision 11.', '.*Verified revision 13.', '.*Verified revision 15.', '.*Verified revision 17.', '.*Verified revision 19.', '.*', '.*Summary.*', '.*r2: E160020:.*', '.*r2: E160020:.*', '.*r4: E160013:.*', '.*r6: E160013:.*', '.*r6: E160013:.*', '.*r10: E160013:.*', '.*r10: E160013:.*', '.*r12: E145001:.*', '.*r12: E145001:.*', '.*r14: E160013:.*', '.*r14: E160013:.*', '.*r16: E145001:.*', '.*r16: E145001:.*', '.*r18: E160013:.*', '.*r18: E160013:.*'])
    exp_err1 = svntest.verify.RegexListOutput(['.*Error verifying revision 2.', 'svnadmin: E160020:.*', 'svnadmin: E160020:.*', '.*Error verifying revision 4.', 'svnadmin: E160013:.*', '.*Error verifying revision 6.', 'svnadmin: E160013:.*', 'svnadmin: E160013:.*', '.*Error verifying revision 10.', 'svnadmin: E160013:.*', 'svnadmin: E160013:.*', '.*Error verifying revision 12.', 'svnadmin: E145001:.*', 'svnadmin: E145001:.*', '.*Error verifying revision 14.', 'svnadmin: E160013:.*', 'svnadmin: E160013:.*', '.*Error verifying revision 16.', 'svnadmin: E145001:.*', 'svnadmin: E145001:.*', '.*Error verifying revision 18.', 'svnadmin: E160013:.*', 'svnadmin: E160013:.*', 'svnadmin: E205012:.*'], False)
    exp_out2 = svntest.verify.RegexListOutput(['.*Verified revision 0.', '.*Verified revision 1.', '.*Verified revision 3.', '.*Verified revision 5.', '.*Verified revision 7.', '.*Verified revision 8.', '.*Verified revision 9.', '.*Verified revision 11.', '.*Verified revision 13.', '.*Verified revision 15.', '.*Verified revision 17.', '.*Verified revision 19.', '.*', '.*Summary.*', '.*r2: E160020:.*', '.*r2: E160020:.*', '.*r4: E160013:.*', '.*r6: E160013:.*', '.*r10: E160013:.*', '.*r10: E160013:.*', '.*r12: E145001:.*', '.*r12: E145001:.*', '.*r14: E160013:.*', '.*r16: E145001:.*', '.*r16: E145001:.*', '.*r18: E160013:.*'])
    exp_err2 = svntest.verify.RegexListOutput(['.*Error verifying revision 2.', 'svnadmin: E160020:.*', 'svnadmin: E160020:.*', '.*Error verifying revision 4.', 'svnadmin: E160013:.*', '.*Error verifying revision 6.', 'svnadmin: E160013:.*', '.*Error verifying revision 10.', 'svnadmin: E160013:.*', 'svnadmin: E160013:.*', '.*Error verifying revision 12.', 'svnadmin: E145001:.*', 'svnadmin: E145001:.*', '.*Error verifying revision 14.', 'svnadmin: E160013:.*', '.*Error verifying revision 16.', 'svnadmin: E145001:.*', 'svnadmin: E145001:.*', '.*Error verifying revision 18.', 'svnadmin: E160013:.*', 'svnadmin: E205012:.*'], False)
    try:
        rev6_line = errput.index('* Error verifying revision 6.\n')
        rev10_line = errput.index('* Error verifying revision 10.\n')
        error_count = 0
        for line in errput[(rev6_line + 1):rev10_line]:
            if ('svnadmin: E' in line):
                error_count = (error_count + 1)
        if (error_count == 1):
            exp_out = exp_out2
            exp_err = exp_err2
        else:
            exp_out = exp_out1
            exp_err = exp_err1
    except ValueError:
        exp_out = exp_out1
        exp_err = exp_err1
    if svntest.main.fs_has_rep_sharing():
        exp_out.insert(0, '.*Verifying.*metadata.*')
    if (svntest.main.options.fsfs_sharding is not None):
        for x in range(0, (19 / svntest.main.options.fsfs_sharding)):
            exp_out.insert(0, '.*Verifying.*metadata.*')
    if svntest.main.is_fs_log_addressing():
        exp_out.insert(0, '.*Verifying.*metadata.*')
    if svntest.verify.verify_outputs("Unexpected error while running 'svnadmin verify'.", output, errput, exp_out, exp_err):
        raise svntest.Failure
    (exit_code, output, errput) = svntest.main.run_svnadmin('verify', sbox.repo_dir)
    exp_out = svntest.verify.RegexListOutput(['.*Verified revision 0.', '.*Verified revision 1.'])
    exp_err = svntest.verify.RegexListOutput(['.*Error verifying revision 2.', 'svnadmin: E160020:.*', 'svnadmin: E160020:.*'], False)
    if svntest.main.fs_has_rep_sharing():
        exp_out.insert(0, '.*Verifying.*metadata.*')
    if (svntest.main.options.fsfs_sharding is not None):
        for x in range(0, (19 / svntest.main.options.fsfs_sharding)):
            exp_out.insert(0, '.*Verifying.*metadata.*')
    if svntest.main.is_fs_log_addressing():
        exp_out.insert(0, '.*Verifying.*metadata.*')
    if svntest.verify.verify_outputs("Unexpected error while running 'svnadmin verify'.", output, errput, exp_out, exp_err):
        raise svntest.Failure
    (exit_code, output, errput) = svntest.main.run_svnadmin('verify', '--quiet', sbox.repo_dir)
    exp_out = []
    exp_err = svntest.verify.RegexListOutput(['.*Error verifying revision 2.', 'svnadmin: E160020:.*', 'svnadmin: E160020:.*'], False)
    if svntest.verify.verify_outputs("Output of 'svnadmin verify' is unexpected.", output, errput, exp_out, exp_err):
        raise svntest.Failure
    svntest.main.safe_rmtree(sbox.repo_dir, True)