[PATCH 4 of 5 V2] help: add help topic for the interactive mode

Laurent Charignon lcharignon at fb.com
Fri May 29 12:30:00 CDT 2015


# HG changeset patch
# User Laurent Charignon <lcharignon at fb.com>
# Date 1432850717 25200
#      Thu May 28 15:05:17 2015 -0700
# Node ID 228821249aa42bcca4715fda8ad56ccb85b9426e
# Parent  2a54d1ceebeac71129f211be67fc2876d01674c2
help: add help topic for the interactive mode

The interactive mode was not covered in any help topic before. This patch
creates a new help topic for the interactive mode that also explains how to
turn on the curses ui for it.

diff --git a/mercurial/help.py b/mercurial/help.py
--- a/mercurial/help.py
+++ b/mercurial/help.py
@@ -153,6 +153,7 @@
     (['multirevs', 'mrevs'], _('Specifying Multiple Revisions'),
      loaddoc('multirevs')),
     (['revsets', 'revset'], _("Specifying Revision Sets"), loaddoc('revsets')),
+    (['interactive'], _("Interactive mode"), loaddoc('interactive')),
     (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
     (['diffs'], _('Diff Formats'), loaddoc('diffs')),
     (['merge-tools', 'mergetools'], _('Merge Tools'), loaddoc('merge-tools')),
diff --git a/mercurial/help/interactive.txt b/mercurial/help/interactive.txt
new file mode 100644
--- /dev/null
+++ b/mercurial/help/interactive.txt
@@ -0,0 +1,21 @@
+Mercurial supports an interactive mode for some commands (commit, shelve and
+revert. This user interface allows to easily filter changes across multiple
+files.
+
+For example, if you have several changes within one file and want to commit
+only some of them. You can use ``hg commit --interactive`` to include and
+exclude the changes that you have made of the commit to be created.
+
+Likewise ``hg shelve -i`` allows you to only shelve some of the changes that
+you have made. It offers more precision than the --include, --exclude flag
+that work at the file level.
+
+Curses UI
+=========
+
+By default, interactive commands are using a text interface. If you want to
+use the curses interface you can add the following to you mercurial config:
+
+[ui]
+  curses = True
+
diff --git a/tests/test-globalopts.t b/tests/test-globalopts.t
--- a/tests/test-globalopts.t
+++ b/tests/test-globalopts.t
@@ -349,6 +349,7 @@
    glossary      Glossary
    hgignore      Syntax for Mercurial Ignore Files
    hgweb         Configuring hgweb
+   interactive   Interactive mode
    merge-tools   Merge Tools
    multirevs     Specifying Multiple Revisions
    patterns      File Name Patterns
@@ -430,6 +431,7 @@
    glossary      Glossary
    hgignore      Syntax for Mercurial Ignore Files
    hgweb         Configuring hgweb
+   interactive   Interactive mode
    merge-tools   Merge Tools
    multirevs     Specifying Multiple Revisions
    patterns      File Name Patterns
diff --git a/tests/test-help.t b/tests/test-help.t
--- a/tests/test-help.t
+++ b/tests/test-help.t
@@ -111,6 +111,7 @@
    glossary      Glossary
    hgignore      Syntax for Mercurial Ignore Files
    hgweb         Configuring hgweb
+   interactive   Interactive mode
    merge-tools   Merge Tools
    multirevs     Specifying Multiple Revisions
    patterns      File Name Patterns
@@ -186,6 +187,7 @@
    glossary      Glossary
    hgignore      Syntax for Mercurial Ignore Files
    hgweb         Configuring hgweb
+   interactive   Interactive mode
    merge-tools   Merge Tools
    multirevs     Specifying Multiple Revisions
    patterns      File Name Patterns
@@ -735,6 +737,7 @@
    glossary      Glossary
    hgignore      Syntax for Mercurial Ignore Files
    hgweb         Configuring hgweb
+   interactive   Interactive mode
    merge-tools   Merge Tools
    multirevs     Specifying Multiple Revisions
    patterns      File Name Patterns
@@ -1359,6 +1362,13 @@
   Configuring hgweb
   </td></tr>
   <tr><td>
+  <a href="/help/interactive">
+  interactive
+  </a>
+  </td><td>
+  Interactive mode
+  </td></tr>
+  <tr><td>
   <a href="/help/merge-tools">
   merge-tools
   </a>
diff --git a/tests/test-hgweb-json.t b/tests/test-hgweb-json.t
--- a/tests/test-hgweb-json.t
+++ b/tests/test-hgweb-json.t
@@ -1062,6 +1062,10 @@
         "topic": "hgweb"
       },
       {
+        "summary": "Interactive mode",
+        "topic": "interactive"
+      },
+      {
         "summary": "Merge Tools",
         "topic": "merge-tools"
       },
diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -46,6 +46,8 @@
       To delete specific shelved changes, use "--delete". To delete all shelved
       changes, use "--cleanup".
   
+      For more information on the interactive mode, use "hg help interactive".
+  
   (use "hg help -e shelve" to show help for the shelve extension)
   
   options ([+] can be repeated):


More information about the Mercurial-devel mailing list