def dump_include_by_pattern(sbox):
    'svnadmin dump with paths included by pattern'
    sbox.build(create_wc=False, empty=True)
    svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'mkdir', (sbox.repo_url + '/aaa'), (sbox.repo_url + '/aab'), (sbox.repo_url + '/aac'), (sbox.repo_url + '/bbc'), '-m', 'Create repository structure.')
    (_, dump, _) = svntest.actions.run_and_verify_svnadmin(None, [], 'dump', '-q', '--include', '/aa?', '--pattern', sbox.repo_dir)
    sbox2 = sbox.clone_dependent()
    sbox2.build(create_wc=False, empty=True)
    load_and_verify_dumpstream(sbox2, None, [], None, False, dump)
    expected_output = svntest.verify.RegexListOutput(['-+\\n', 'r1\\ .*\n', re.escape('Changed paths:\n'), re.escape('   A /aaa\n'), re.escape('   A /aab\n'), re.escape('   A /aac\n'), '-+\\n'])
    svntest.actions.run_and_verify_svn(expected_output, [], 'log', '-v', '-q', sbox2.repo_url)
svnadmin dump with paths included by pattern
def dump_include_by_pattern(sbox):
    
    sbox.build(create_wc=False, empty=True)
    svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'mkdir', (sbox.repo_url + '/aaa'), (sbox.repo_url + '/aab'), (sbox.repo_url + '/aac'), (sbox.repo_url + '/bbc'), '-m', 'Create repository structure.')
    (_, dump, _) = svntest.actions.run_and_verify_svnadmin(None, [], 'dump', '-q', '--include', '/aa?', '--pattern', sbox.repo_dir)
    sbox2 = sbox.clone_dependent()
    sbox2.build(create_wc=False, empty=True)
    load_and_verify_dumpstream(sbox2, None, [], None, False, dump)
    expected_output = svntest.verify.RegexListOutput(['-+\\n', 'r1\\ .*\n', re.escape('Changed paths:\n'), re.escape('   A /aaa\n'), re.escape('   A /aab\n'), re.escape('   A /aac\n'), '-+\\n'])
    svntest.actions.run_and_verify_svn(expected_output, [], 'log', '-v', '-q', sbox2.repo_url)