Show More
@@ -996,21 +996,17 b' class recordhunk(object):' | |||
|
996 | 996 | def __repr__(self): |
|
997 | 997 | return '<hunk %r@%d>' % (self.filename(), self.fromline) |
|
998 | 998 | |
|
999 | def filterpatch(ui, headers, operation=None): | |
|
1000 | """Interactively filter patch chunks into applied-only chunks""" | |
|
1001 | if operation is None: | |
|
1002 | operation = 'record' | |
|
1003 | 999 |
|
|
1004 | 1000 |
|
|
1005 | 1001 |
|
|
1006 | 1002 |
|
|
1007 | 1003 |
|
|
1008 | }[operation], | |
|
1004 | }, | |
|
1009 | 1005 |
|
|
1010 | 1006 |
|
|
1011 | 1007 |
|
|
1012 | 1008 |
|
|
1013 | }[operation], | |
|
1009 | }, | |
|
1014 | 1010 |
|
|
1015 | 1011 |
|
|
1016 | 1012 |
|
@@ -1042,9 +1038,14 b' def filterpatch(ui, headers, operation=N' | |||
|
1042 | 1038 |
|
|
1043 | 1039 |
|
|
1044 | 1040 |
|
|
1045 | }[operation] | |
|
1041 | } | |
|
1046 | 1042 | } |
|
1047 | 1043 | |
|
1044 | def filterpatch(ui, headers, operation=None): | |
|
1045 | """Interactively filter patch chunks into applied-only chunks""" | |
|
1046 | if operation is None: | |
|
1047 | operation = 'record' | |
|
1048 | ||
|
1048 | 1049 | def prompt(skipfile, skipall, query, chunk): |
|
1049 | 1050 | """prompt query, and process base inputs |
|
1050 | 1051 | |
@@ -1061,7 +1062,7 b' def filterpatch(ui, headers, operation=N' | |||
|
1061 | 1062 | if skipfile is not None: |
|
1062 | 1063 | return skipfile, skipfile, skipall, newpatches |
|
1063 | 1064 | while True: |
|
1064 | resps = messages['help'] | |
|
1065 | resps = messages['help'][operation] | |
|
1065 | 1066 | r = ui.promptchoice("%s %s" % (query, resps)) |
|
1066 | 1067 | ui.write("\n") |
|
1067 | 1068 | if r == 8: # ? |
@@ -1166,10 +1167,11 b' the hunk is left unchanged.' | |||
|
1166 | 1167 | if skipfile is None and skipall is None: |
|
1167 | 1168 | chunk.pretty(ui) |
|
1168 | 1169 | if total == 1: |
|
1169 | msg = messages['single'] % chunk.filename() | |
|
1170 | msg = messages['single'][operation] % chunk.filename() | |
|
1170 | 1171 | else: |
|
1171 | 1172 | idx = pos - len(h.hunks) + i |
|
1172 |
msg = messages['multiple'] % (idx, total, |
|
|
1173 | msg = messages['multiple'][operation] % (idx, total, | |
|
1174 | chunk.filename()) | |
|
1173 | 1175 | r, skipfile, skipall, newpatches = prompt(skipfile, |
|
1174 | 1176 | skipall, msg, chunk) |
|
1175 | 1177 | if r: |
General Comments 0
You need to be logged in to leave comments.
Login now