after = [] elif args.check: # no sorted section sys.exit(0) else: print("Error: %s" % (err, ), file=sys.stderr) sys.exit(1) try: input_entries = lib.parse_inside(index, inside, args.upstream) except exc.KSError as err: print("Error: %s" % (err, ), file=sys.stderr) sys.exit(1) try: sorted_entries = lib.series_sort(index, input_entries) except exc.KSError as err: print("Error: %s" % (err, ), file=sys.stderr) sys.exit(1) new_inside = lib.flatten([ lib.series_header(inside), lib.series_format(sorted_entries), 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.")
print("Error: %s" % (err,), file=sys.stderr) sys.exit(1) if entry.dest_head != git_sort.oot: for rev in entry.revs: try: match = current_revs[rev] except KeyError: continue else: print("Warning: commit %s in new patch \"%s\" is already " "present in patch \"%s\" from series.conf." % ( rev[12:], entry.name, match,), file=sys.stderr) new_entries.append(entry) try: sorted_entries = lib.series_sort(index, current_entries + new_entries) except exc.KSError as err: print("Error: %s" % (err,), file=sys.stderr) sys.exit(1) cur_sorted_entries = collections.OrderedDict() for head, lines in list(sorted_entries.items()): current_lines = [line for line in lines if line not in new_lines] if current_lines: cur_sorted_entries[head] = current_lines cur_inside = lib.flatten([ lib.series_header(inside), lib.series_format(cur_sorted_entries), lib.series_footer(inside), ])
after = [] elif args.check: # no sorted section sys.exit(0) else: print("Error: %s" % (err,), file=sys.stderr) sys.exit(1) try: input_entries = lib.parse_inside(index, inside, args.upstream) except exc.KSError as err: print("Error: %s" % (err,), file=sys.stderr) sys.exit(1) try: sorted_entries = lib.series_sort(index, input_entries) except exc.KSError as err: print("Error: %s" % (err,), file=sys.stderr) sys.exit(1) new_inside = lib.flatten([ lib.series_header(inside), lib.series_format(sorted_entries), 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.")