Example #1
0
def run_applied(args):
    patchfns.chdir_to_base_dir()
    patch = patchfns.find_applied_patch(args.patch)
    if not patch:
        return cmd_result.ERROR
    output.start_pager()
    for patch in patchfns.applied_before(patch) + [patch]:
        output.write('%s\n' % patchfns.print_patch(patch))
    output.wait_for_pager()
    return cmd_result.OK
Example #2
0
def run_previous(args):
    patchfns.chdir_to_base_dir()
    patch = patchfns.find_patch_in_series(args.arg_patch)
    if not patch:
        return cmd_result.ERROR
    befores = patchfns.applied_before(patch)
    if not befores:
        return cmd_result.ERROR
    output.write('%s\n' % patchfns.print_patch(befores[-1]))
    return cmd_result.OK