Patchwork [03,of,10] histedit-test: test that extra revision are detected

login
register
mail settings
Submitter Pierre-Yves David
Date April 18, 2013, 3:29 p.m.
Message ID <c5c25ba5ed3adcda9634.1366298958@crater2.logilab.fr>
Download mbox | patch
Permalink /patch/1415/
State Accepted, archived
Headers show

Comments

Pierre-Yves David - April 18, 2013, 3:29 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@logilab.fr>
# Date 1366285717 -7200
#      Thu Apr 18 13:48:37 2013 +0200
# Node ID c5c25ba5ed3adcda963433227e7cc37bdf30ebde
# Parent  6f96687e9afe8573bee0dce320e66ba6842c1237
histedit-test: test that extra revision are detected

We had not test for this case.

Patch

diff --git a/tests/test-histedit-arguments.t b/tests/test-histedit-arguments.t
--- a/tests/test-histedit-arguments.t
+++ b/tests/test-histedit-arguments.t
@@ -78,10 +78,21 @@  Test that missing revision are detected
   > pick 08d98a8350f3 4 five
   > EOF
   abort: must specify a rule for each changeset once
   [255]
 
+Test that extra revision are detected
+---------------------------------------
+
+  $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF
+  > pick 6058cbb6cfd7 0 one
+  > pick c8e68270e35a 3 four
+  > pick 08d98a8350f3 4 five
+  > EOF
+  abort: may not use changesets other than the ones listed
+  [255]
+
 Test short version of command
 ---------------------------------------
 
 Note: we use various number of white space between command name and changeset
 short hash. This test issue3893.