Ejemplo n.º 1
0
def create_submodule_tree(odb, submodule_commit_hexsha):
    submodule_conf = "/Users/kenjif/test_gitmodules"
    conf_mode, conf_binsha = write_blob(odb, submodule_conf)
    tree_contents = []
    tree_contents.append((conf_mode, conf_binsha, ".gitmodules"))
    tree_contents.append(get_submodule_tree_content(submodule_commit_hexsha, "jEdit"))

    tree_mode, binsha = mktree_from_iter(odb, tree_contents)
    return bin_to_hex(binsha)
Ejemplo n.º 2
0
def create_submodule_tree(odb, submodule_commit_hexsha):
    submodule_conf = '/Users/kenjif/test_gitmodules'
    conf_mode, conf_binsha = write_blob_from_path(odb, submodule_conf)
    tree_contents = []
    tree_contents.append((conf_mode, conf_binsha, '.gitmodules'))
    tree_contents.append(get_submodule_tree_content(submodule_commit_hexsha, 'jEdit'))

    tree_mode, binsha = mktree_from_iter(odb, tree_contents)
    return bin_to_hex(binsha)
Ejemplo n.º 3
0
    def commit(self, org_commit, tree_contents):
        (mode, binsha) = mktree_from_iter(self.new_repo.odb, tree_contents)

        parents = [self.old2new[parent.hexsha] for parent in org_commit.parents]

        result = commit_from_binsha(self.new_repo, binsha, org_commit, parents)

        note_message = str(org_commit.hexsha)
        create_note(self.new_repo, note_message)
        return result
Ejemplo n.º 4
0
    def commit(self, org_commit, tree_contents):
        (_, binsha) = mktree_from_iter(self.new_repo.odb, tree_contents)

        parents = [self.new_repo.commit(self.old2new[parent.hexsha]) for parent in org_commit.parents]

        result = commit_from_binsha(self.new_repo, binsha, org_commit, parents)

        note_message = str(org_commit.hexsha)
        create_note(self.new_repo, note_message)
        return result