def fsfs_file(repo_dir, kind, rev):
    if (svntest.main.options.server_minor_version >= 5):
        if (svntest.main.options.fsfs_sharding is None):
            if svntest.main.is_fs_type_fsx():
                rev = ('r' + rev)
            return os.path.join(repo_dir, 'db', kind, '0', rev)
        else:
            shard = (int(rev) // svntest.main.options.fsfs_sharding)
            if svntest.main.is_fs_type_fsx():
                rev = ('r' + rev)
            path = os.path.join(repo_dir, 'db', kind, str(shard), rev)
            if ((svntest.main.options.fsfs_packing is None) or (kind == 'revprops')):
                return path
            elif os.path.exists(path):
                return path
            else:
                return os.path.join(repo_dir, 'db', kind, ('%d.pack' % shard), 'pack')
    else:
        return os.path.join(repo_dir, 'db', kind, rev)
def fsfs_file(repo_dir, kind, rev):
    if (svntest.main.options.server_minor_version >= 5):
        if (svntest.main.options.fsfs_sharding is None):
            if svntest.main.is_fs_type_fsx():
                rev = ('r' + rev)
            return os.path.join(repo_dir, 'db', kind, '0', rev)
        else:
            shard = (int(rev) // svntest.main.options.fsfs_sharding)
            if svntest.main.is_fs_type_fsx():
                rev = ('r' + rev)
            path = os.path.join(repo_dir, 'db', kind, str(shard), rev)
            if ((svntest.main.options.fsfs_packing is None) or (kind == 'revprops')):
                return path
            elif os.path.exists(path):
                return path
            else:
                return os.path.join(repo_dir, 'db', kind, ('%d.pack' % shard), 'pack')
    else:
        return os.path.join(repo_dir, 'db', kind, rev)