Patchwork [02,of,10] histedit-test: test that missing revision are detected

login
register
mail settings
Submitter Pierre-Yves David
Date April 18, 2013, 3:29 p.m.
Message ID <6f96687e9afe8573bee0.1366298957@crater2.logilab.fr>
Download mbox | patch
Permalink /patch/1416/
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 1366285688 -7200
#      Thu Apr 18 13:48:08 2013 +0200
# Node ID 6f96687e9afe8573bee0dce320e66ba6842c1237
# Parent  9b9ba8e13e70668d248b0b3f074f1b83825e3d41
histedit-test: test that missing 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
@@ -68,10 +68,20 @@  Run on a revision not ancestors of the c
   $ hg histedit -r 4
   abort: 08d98a8350f3 is not an ancestor of working directory
   [255]
   $ hg up --quiet
 
+Test that missing revision are detected
+---------------------------------------
+
+  $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF
+  > pick eb57da33312f 2 three
+  > pick 08d98a8350f3 4 five
+  > EOF
+  abort: must specify a rule for each changeset once
+  [255]
+
 Test short version of command
 ---------------------------------------
 
 Note: we use various number of white space between command name and changeset
 short hash. This test issue3893.