@SkipUnless(svntest.main.is_posix_os)
@Issue(2591)
def hotcopy_symlink(sbox):
    "'svnadmin hotcopy' replicates symlink"
    sbox.build(create_wc=False, empty=True)
    original_repo = sbox.repo_dir
    (hotcopy_repo, hotcopy_url) = sbox.add_repo_path('hotcopy')
    svntest.main.safe_rmtree(sbox.wc_dir, 1)
    os.mkdir(sbox.wc_dir)
    external_file_path = os.path.join(sbox.wc_dir, 'file')
    svntest.main.file_write(external_file_path, 'An existing file')
    external_dir_path = os.path.join(sbox.wc_dir, 'dir')
    os.mkdir(external_dir_path)
    external_missing_path = os.path.join(sbox.wc_dir, 'missing')
    symlinks = [('in_repos_file', 'format'), ('in_repos_dir', 'conf'), ('in_repos_missing', 'missing'), ('external_file', os.path.join('..', '..', '..', external_file_path)), ('external_dir', os.path.join('..', '..', '..', external_dir_path)), ('external_missing', os.path.join('..', '..', '..', external_missing_path))]
    for (name, target_relpath) in symlinks:
        target_path = os.path.join(original_repo, target_relpath)
        target_abspath = os.path.abspath(target_path)
        symlink_path = os.path.join(original_repo, name)
        os.symlink(target_relpath, (symlink_path + '_rel'))
        os.symlink(target_abspath, (symlink_path + '_abs'))
    svntest.actions.run_and_verify_svnadmin(None, [], 'hotcopy', original_repo, hotcopy_repo)
    for (name, target_relpath) in symlinks:
        target_path = os.path.join(original_repo, target_relpath)
        target_abspath = os.path.abspath(target_path)
        symlink_path = os.path.join(hotcopy_repo, name)
        if (os.readlink((symlink_path + '_rel')) != target_relpath):
            raise svntest.Failure
        if (os.readlink((symlink_path + '_abs')) != target_abspath):
            raise svntest.Failure
'svnadmin hotcopy' replicates symlink
@SkipUnless(svntest.main.is_posix_os)
@Issue(2591)
def hotcopy_symlink(sbox):
    
    sbox.build(create_wc=False, empty=True)
    original_repo = sbox.repo_dir
    (hotcopy_repo, hotcopy_url) = sbox.add_repo_path('hotcopy')
    svntest.main.safe_rmtree(sbox.wc_dir, 1)
    os.mkdir(sbox.wc_dir)
    external_file_path = os.path.join(sbox.wc_dir, 'file')
    svntest.main.file_write(external_file_path, 'An existing file')
    external_dir_path = os.path.join(sbox.wc_dir, 'dir')
    os.mkdir(external_dir_path)
    external_missing_path = os.path.join(sbox.wc_dir, 'missing')
    symlinks = [('in_repos_file', 'format'), ('in_repos_dir', 'conf'), ('in_repos_missing', 'missing'), ('external_file', os.path.join('..', '..', '..', external_file_path)), ('external_dir', os.path.join('..', '..', '..', external_dir_path)), ('external_missing', os.path.join('..', '..', '..', external_missing_path))]
    for (name, target_relpath) in symlinks:
        target_path = os.path.join(original_repo, target_relpath)
        target_abspath = os.path.abspath(target_path)
        symlink_path = os.path.join(original_repo, name)
        os.symlink(target_relpath, (symlink_path + '_rel'))
        os.symlink(target_abspath, (symlink_path + '_abs'))
    svntest.actions.run_and_verify_svnadmin(None, [], 'hotcopy', original_repo, hotcopy_repo)
    for (name, target_relpath) in symlinks:
        target_path = os.path.join(original_repo, target_relpath)
        target_abspath = os.path.abspath(target_path)
        symlink_path = os.path.join(hotcopy_repo, name)
        if (os.readlink((symlink_path + '_rel')) != target_relpath):
            raise svntest.Failure
        if (os.readlink((symlink_path + '_abs')) != target_abspath):
            raise svntest.Failure