Patchwork [05,of,10] histedit-test: test unknown changeset

login
register
mail settings
Submitter Pierre-Yves David
Date April 18, 2013, 3:29 p.m.
Message ID <4bb8ea96798d4c8634cf.1366298960@crater2.logilab.fr>
Download mbox | patch
Permalink /patch/1418/
State Accepted
Commit 7d27d80185f08833d1392134b39760a6d0440c5d
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 1366285859 -7200
#      Thu Apr 18 13:50:59 2013 +0200
# Node ID 4bb8ea96798d4c8634cf2def42f741954b7fb8c7
# Parent  aefa522078d14fc1ac815c18dba2884c648cd852
histedit-test: test unknown changeset

We had no 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
@@ -100,10 +100,21 @@  Test malformed line
   > pick 08d98a8350f3 4 five
   > EOF
   abort: malformed line "pickeb57da33312f2three"
   [255]
 
+Test unknown changeset
+---------------------------------------
+
+  $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF
+  > pick 0123456789ab 2 three
+  > pick c8e68270e35a 3 four
+  > pick 08d98a8350f3 4 five
+  > EOF
+  abort: unknown changeset 0123456789ab 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.