##// END OF EJS Templates
record: handle translated prompt correctly...
Martin Geisler -
r9837:b13474cd default
parent child Browse files
Show More
@@ -275,7 +275,8 b' def filterpatch(ui, chunks):'
275 - ? (help)
275 - ? (help)
276 - q (quit)
276 - q (quit)
277
277
278 else, input is returned to the caller.
278 Returns True/False and sets reps_all and resp_file as
279 appropriate.
279 """
280 """
280 if resp_all[0] is not None:
281 if resp_all[0] is not None:
281 return resp_all[0]
282 return resp_all[0]
@@ -299,17 +300,17 b' def filterpatch(ui, chunks):'
299 if l: ui.write(l.strip(), '\n')
300 if l: ui.write(l.strip(), '\n')
300 continue
301 continue
301 elif r == 0: # yes
302 elif r == 0: # yes
302 ret = 'y'
303 ret = True
303 elif r == 1: # no
304 elif r == 1: # no
304 ret = 'n'
305 ret = False
305 elif r == 2: # Skip
306 elif r == 2: # Skip
306 ret = resp_file[0] = 'n'
307 ret = resp_file[0] = False
307 elif r == 3: # file (Record remaining)
308 elif r == 3: # file (Record remaining)
308 ret = resp_file[0] = 'y'
309 ret = resp_file[0] = True
309 elif r == 4: # done, skip remaining
310 elif r == 4: # done, skip remaining
310 ret = resp_all[0] = 'n'
311 ret = resp_all[0] = False
311 elif r == 5: # all
312 elif r == 5: # all
312 ret = resp_all[0] = 'y'
313 ret = resp_all[0] = True
313 elif r == 6: # quit
314 elif r == 6: # quit
314 raise util.Abort(_('user quit'))
315 raise util.Abort(_('user quit'))
315 return ret
316 return ret
@@ -330,7 +331,7 b' def filterpatch(ui, chunks):'
330 chunk.pretty(ui)
331 chunk.pretty(ui)
331 r = prompt(_('examine changes to %s?') %
332 r = prompt(_('examine changes to %s?') %
332 _(' and ').join(map(repr, chunk.files())))
333 _(' and ').join(map(repr, chunk.files())))
333 if r == _('y'):
334 if r:
334 applied[chunk.filename()] = [chunk]
335 applied[chunk.filename()] = [chunk]
335 if chunk.allhunks():
336 if chunk.allhunks():
336 applied[chunk.filename()] += consumefile()
337 applied[chunk.filename()] += consumefile()
@@ -344,7 +345,7 b' def filterpatch(ui, chunks):'
344 chunk.filename()) \
345 chunk.filename()) \
345 or prompt(_('record change %d/%d to %r?') %
346 or prompt(_('record change %d/%d to %r?') %
346 (pos, total, chunk.filename()))
347 (pos, total, chunk.filename()))
347 if r == _('y'):
348 if r:
348 if fixoffset:
349 if fixoffset:
349 chunk = copy.copy(chunk)
350 chunk = copy.copy(chunk)
350 chunk.toline += fixoffset
351 chunk.toline += fixoffset
General Comments 0
You need to be logged in to leave comments. Login now