changeset 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 31f3636e9296
children 7d24a41200d3
files mercurial/crecord.py mercurial/patch.py
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/crecord.py	Thu May 28 16:41:47 2015 -0700
+++ b/mercurial/crecord.py	Wed May 27 15:56:10 2015 -0700
@@ -428,6 +428,8 @@
 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.
--- a/mercurial/patch.py	Thu May 28 16:41:47 2015 -0700
+++ b/mercurial/patch.py	Wed May 27 15:56:10 2015 -0700
@@ -950,6 +950,8 @@
 
 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