Mercurial > hg
comparison mercurial/crecord.py @ 25359:724421cb4745
record: add default value for operation argument
This patch is part of a series of patches to change the recording ui to reflect
the operation currently running (commit, shelve, revert ...).
This patch adds the default value of the operation argument for record's
standard and curses interface to match what is displayed in the interface
as of today.
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Wed, 27 May 2015 15:56:10 -0700 |
parents | c1f5ef76d1c2 |
children | 6e62a5b3442d |
comparison
equal
deleted
inserted
replaced
25358:31f3636e9296 | 25359:724421cb4745 |
---|---|
426 return '<hunk %r@%d>' % (self.filename(), self.fromline) | 426 return '<hunk %r@%d>' % (self.filename(), self.fromline) |
427 | 427 |
428 def filterpatch(ui, chunks, chunkselector, operation=None): | 428 def filterpatch(ui, chunks, chunkselector, operation=None): |
429 """interactively filter patch chunks into applied-only chunks""" | 429 """interactively filter patch chunks into applied-only chunks""" |
430 | 430 |
431 if operation is None: | |
432 operation = _('confirm') | |
431 chunks = list(chunks) | 433 chunks = list(chunks) |
432 # convert chunks list into structure suitable for displaying/modifying | 434 # convert chunks list into structure suitable for displaying/modifying |
433 # with curses. create a list of headers only. | 435 # with curses. create a list of headers only. |
434 headers = [c for c in chunks if isinstance(c, patchmod.header)] | 436 headers = [c for c in chunks if isinstance(c, patchmod.header)] |
435 | 437 |