# HG changeset patch # User Laurent Charignon # Date 2015-05-27 22:56:10 # Node ID 724421cb4745000f1a16e4e9d97c6e200ae32c4b # Parent 31f3636e92969a9fd36f4979964f92f8eb9321c2 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. diff --git a/mercurial/crecord.py b/mercurial/crecord.py --- a/mercurial/crecord.py +++ b/mercurial/crecord.py @@ -428,6 +428,8 @@ class uihunk(patchnode): def filterpatch(ui, chunks, chunkselector, operation=None): """interactively filter patch chunks into applied-only chunks""" + if operation is None: + operation = _('confirm') chunks = list(chunks) # convert chunks list into structure suitable for displaying/modifying # with curses. create a list of headers only. diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -950,6 +950,8 @@ class recordhunk(object): def filterpatch(ui, headers, operation=None): """Interactively filter patch chunks into applied-only chunks""" + if operation is None: + operation = _('record') def prompt(skipfile, skipall, query, chunk): """prompt query, and process base inputs