Patchwork [2,of,3] revert: indicate the default choice when prompting to forget files

login
register
mail settings
Submitter Denis Laxalde
Date Nov. 25, 2016, 8:43 a.m.
Message ID <0df7774c49eda9f95f25.1480063382@sh77.tls.logilab.fr>
Download mbox | patch
Permalink /patch/17753/
State Accepted
Headers show

Comments

Denis Laxalde - Nov. 25, 2016, 8:43 a.m.
# HG changeset patch
# User Denis Laxalde <denis.laxalde@logilab.fr>
# Date 1480061371 -3600
#      Fri Nov 25 09:09:31 2016 +0100
# Node ID 0df7774c49eda9f95f255066cfddae296c13a33a
# Parent  cde950264b07eb8626e0aa5aa2fbcd6b27f98c10
# EXP-Topic revert/interactive-remove
revert: indicate the default choice when prompting to forget files

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -3256,7 +3256,7 @@  def _performrevert(repo, parents, ctx, a
     for f in actions['forget'][0]:
         if interactive:
             choice = repo.ui.promptchoice(
-                _("forget added file %s (yn)?$$ &Yes $$ &No") % f)
+                _("forget added file %s (Yn)?$$ &Yes $$ &No") % f)
             if choice == 0:
                 repo.dirstate.drop(f)
             else:
diff --git a/tests/test-revert-interactive.t b/tests/test-revert-interactive.t
--- a/tests/test-revert-interactive.t
+++ b/tests/test-revert-interactive.t
@@ -424,14 +424,14 @@  Check the experimental config to invert 
   > n
   > EOF
   forgetting newfile
-  forget added file newfile (yn)? n
+  forget added file newfile (Yn)? n
   $ hg status
   A newfile
   $ hg revert -i <<EOF
   > y
   > EOF
   forgetting newfile
-  forget added file newfile (yn)? y
+  forget added file newfile (Yn)? y
   $ hg status
   ? newfile