lib.series_footer(inside), ]) to_update = list(filter(lib.tag_needs_update, input_entries)) if args.check: result = 0 if inside != new_inside: print("Input is not sorted.") result = 2 if len(to_update): print("Git-repo tags are outdated.") result = 2 sys.exit(result) else: output = lib.flatten([ before, new_inside, after, ]) if filter_mode: f = sys.stdout else: f = open(series_path, mode="w") f.writelines(output) try: lib.update_tags(index, to_update) except exc.KSError as err: print("Error: %s" % (err, ), file=sys.stderr) sys.exit(1)
lib.series_format(cur_sorted_entries), lib.series_footer(inside), ]) if inside != cur_inside: print("Error: Current series.conf is not sorted. " "Please run series_sort.py first and commit the result before " "adding new patches.", file=sys.stderr) sys.exit(1) new_inside = lib.flatten([ lib.series_header(inside), lib.series_format(sorted_entries), lib.series_footer(inside), ]) output = lib.flatten([ before, new_inside, after, ]) with open("series.conf", mode="w") as f: f.writelines(output) try: lib.update_tags(index, list(filter(lib.tag_needs_update, new_entries))) except exc.KSError as err: print("Error: %s" % (err,), file=sys.stderr) sys.exit(1)
lib.series_footer(inside), ]) to_update = list(filter(lib.tag_needs_update, input_entries)) if args.check: result = 0 if inside != new_inside: print("Input is not sorted.") result = 2 if len(to_update): print("Git-repo tags are outdated.") result = 2 sys.exit(result) else: output = lib.flatten([ before, new_inside, after, ]) if filter_mode: f = sys.stdout else: f = open(series_path, mode="w") f.writelines(output) try: lib.update_tags(index, to_update) except exc.KSError as err: print("Error: %s" % (err,), file=sys.stderr) sys.exit(1)
lib.series_format(cur_sorted_entries), lib.series_footer(inside), ]) if inside != cur_inside: print("Error: Current series.conf is not sorted. " "Please run series_sort.py first and commit the result before " "adding new patches.", file=sys.stderr) sys.exit(1) new_inside = lib.flatten([ lib.series_header(inside), lib.series_format(sorted_entries), lib.series_footer(inside), ]) output = lib.flatten([ before, new_inside, after, ]) with open("series.conf", mode="w") as f: f.writelines(output) try: lib.update_tags(index, list(filter(lib.tag_needs_update, new_entries))) except exc.KSError as err: print("Error: %s" % (err,), file=sys.stderr) sys.exit(1)