Exemple #1
0
def write_patch_list(git_dir, patches, start_point):
    filename = os.path.join(hgtlib.dotgit_dir(git_dir), "hgt-patches")
    fh = open(filename, "w")
    fh.write("Start %s\n" % start_point)

    def recurse(patches):
        for patch in patches:
            if "group_id" in patch:
                fh.write("Group %s\n{\n" % patch["group_id"])
                recurse(patch["patches"])
                fh.write("}\n")
            else:
                fh.write("Patch %s %s\n" % (patch["commit_id"], patch["msg"]))

    recurse(patches)
    fh.close()
Exemple #2
0
 def save_applylist():
     hgtlib.save_applylist(hgtlib.dotgit_dir(), get_applylist())