diff tests/test-tutorial.t @ 996:b98dd5d3065c

fold: overhaul handling of revisions with --rev (BC) The fold command parsed the revision arguments in a very peculiar and idiosyncratic fashion: if revisions were passed without a --rev argument, then they would all be extended to ".", but if they were passed with --rev, then no extension would happen. Passing revisions both with and without --rev would abort. This is inconsistent with the way all other hg commands parse revision arguments. We have several examples of command where several revisions are passed, and the --rev option is optional for specifying those revisions (update, strip, export). This patch alters the way in which fold parses its revision arguments. No distinction is made between revisions passed with or without the --rev argument. Regardless if a single or multiple revision is specified, all will be folded together into the parent of the working directory. If the --exact argument is passed, then the parent of the working directory is ignored and the specified revisions must be a single contiguous line. The docstring and tests are modified accordingly.
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Mon, 30 Jun 2014 13:29:49 -0400
parents 2cde59f3cb5d
children 59bc29c84ce0
line wrap: on
line diff
--- a/tests/test-tutorial.t	Mon Jun 30 10:25:08 2014 -0400
+++ b/tests/test-tutorial.t	Mon Jun 30 13:29:49 2014 -0400
@@ -473,21 +473,24 @@
 The tutorial part is not written yet but can use `hg fold`:
 
   $ hg help fold
-  hg fold rev
+  hg fold [OPTION]... [-r] REV
   
   aliases: squash
   
-  Fold multiple revisions into a single one
+  fold multiple revisions into a single one
   
-      The revisions from your current working directory to the given one are
-      folded into a single successor revision.
+      Folds a set of revisions with the parent of the working directory. All
+      revisions linearly between the given revisions and the parent of the
+      working directory will also be folded.
   
-      you can alternatively use --rev to explicitly specify revisions to be
-      folded, ignoring the current working directory parent.
+      Use --exact for folding only the specified revisions while ignoring the
+      parent of the working directory. In this case, the given revisions must
+      form a linear unbroken chain.
   
   options:
   
-   -r --rev VALUE [+] explicitly specify the full set of revision to fold
+   -r --rev VALUE [+] revision to fold
+      --exact         only fold specified revisions
    -m --message TEXT  use text as commit message
    -l --logfile FILE  read commit message from file
    -d --date DATE     record the specified date as commit date
@@ -495,7 +498,7 @@
   
   [+] marked option can be specified multiple times
   
-  use "hg -v help fold" to show the global options
+  use "hg -v help fold" to show more complete help and the global options
 
 
 -----------------------