

@classmethod
def clone_wiki_versions(cls, node, copy, user, save=True):
    'Clone wiki pages for a forked or registered project.\n        :param node: The Node that was forked/registered\n        :param copy: The fork/registration\n        :param user: The user who forked or registered the node\n        :param save: Whether to save the fork/registration\n        :return: copy\n        '
    copy.wiki_pages_versions = {
        
    }
    copy.wiki_pages_current = {
        
    }
    for key in node.wiki_pages_versions:
        copy.wiki_pages_versions[key] = []
        for wiki_id in node.wiki_pages_versions[key]:
            node_wiki = NodeWikiPage.load(wiki_id)
            cloned_wiki = node_wiki.clone_wiki(copy._id)
            copy.wiki_pages_versions[key].append(cloned_wiki._id)
            if node_wiki.is_current:
                copy.wiki_pages_current[key] = cloned_wiki._id
    if save:
        copy.save()
    return copy

dataset/ETHPy150Open CenterForOpenScience/osf.io/website/addons/wiki/model.py NodeWikiPage.clone_wiki_versions/original