equal
deleted
inserted
replaced
1063 '$$ &Quit, recording no changes' |
1063 '$$ &Quit, recording no changes' |
1064 '$$ &? (display help)'), |
1064 '$$ &? (display help)'), |
1065 } |
1065 } |
1066 } |
1066 } |
1067 |
1067 |
1068 def filterpatch(ui, headers, operation=None): |
1068 def filterpatch(ui, headers, match, operation=None): |
1069 """Interactively filter patch chunks into applied-only chunks""" |
1069 """Interactively filter patch chunks into applied-only chunks""" |
1070 messages = getmessages() |
1070 messages = getmessages() |
1071 |
1071 |
1072 if operation is None: |
1072 if operation is None: |
1073 operation = 'record' |
1073 operation = 'record' |
1180 if hdr in seen: |
1180 if hdr in seen: |
1181 continue |
1181 continue |
1182 seen.add(hdr) |
1182 seen.add(hdr) |
1183 if skipall is None: |
1183 if skipall is None: |
1184 h.pretty(ui) |
1184 h.pretty(ui) |
|
1185 files = h.files() |
1185 msg = (_('examine changes to %s?') % |
1186 msg = (_('examine changes to %s?') % |
1186 _(' and ').join("'%s'" % f for f in h.files())) |
1187 _(' and ').join("'%s'" % f for f in files)) |
1187 r, skipfile, skipall, np = prompt(skipfile, skipall, msg, None) |
1188 if all(match.exact(f) for f in files): |
|
1189 r, skipall, np = True, None, None |
|
1190 else: |
|
1191 r, skipfile, skipall, np = prompt(skipfile, skipall, msg, None) |
1188 if not r: |
1192 if not r: |
1189 continue |
1193 continue |
1190 applied[h.filename()] = [h] |
1194 applied[h.filename()] = [h] |
1191 if h.allhunks(): |
1195 if h.allhunks(): |
1192 applied[h.filename()] += h.hunks |
1196 applied[h.filename()] += h.hunks |