[PATCH 1 of 2 pushrebase-ext] pushrebase: don't use evolve in tests

Gregory Szorc gregory.szorc at gmail.com
Wed Jul 1 15:26:07 CDT 2015


# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1434152075 25200
#      Fri Jun 12 16:34:35 2015 -0700
# Node ID 681ee61e7c78a414e840405d06841ab6f96c92ac
# Parent  ebe4f489c99e0de174f80f6710854fbb80f3470c
pushrebase: don't use evolve in tests

Evolve isn't a part of core Mercurial nor is it part of this repository.
Make it easier to run tests for pushrebase by removing the evolve
dependency.

This does drop a workflow test that `hg evolve` after a rebased push
does the right thing. But, evolve's behavior in the presence of
specific obsolescence markers should be pretty well tested and it
shouldn't be strictly necessary to test this behavior.

diff --git a/tests/test-pushrebase.t b/tests/test-pushrebase.t
--- a/tests/test-pushrebase.t
+++ b/tests/test-pushrebase.t
@@ -266,19 +266,23 @@ Stack with conflict in head should abort
   |
   o  a => bar [public:add0c792bfce]
   |
   o  initial [public:2bb9d20e471c]
   
 
 With evolution enabled, should set obsolescence markers
 
-  $ echo "[extensions]" >> $HGRCPATH
-  $ echo "rebase =" >> $HGRCPATH
-  $ echo "evolve =" >> $HGRCPATH
+  $ cat >> $HGRCPATH << EOF
+  > [extensions]
+  > rebase =
+  > 
+  > [experimental]
+  > evolution = all
+  > EOF
 
   $ cd ../client
   $ echo 'foofoo' > b
   $ commit 'b => foofoo'
   $ echo 'foobar' > b
   $ commit 'b => foobar'
   $ log
   @  b => foobar [draft:a754b7172e58]
@@ -318,30 +322,32 @@ With evolution enabled, should set obsol
   incoming hook: HG_NODE=ddd9491cc0b4965056141b5064ac0c141153b1a9 HG_SOURCE=push-response HG_TXNID=TXN:* HG_URL=ssh://user@dummy/server (glob)
   incoming hook: HG_NODE=5402bb2493c730b659b638d6a2f67f9d6dd57f84 HG_SOURCE=push-response HG_TXNID=TXN:* HG_URL=ssh://user@dummy/server (glob)
   incoming hook: HG_NODE=b423e42e554804d21e786126e84a27565a786628 HG_SOURCE=push-response HG_TXNID=TXN:* HG_URL=ssh://user@dummy/server (glob)
 
   $ hg pull
   pulling from ssh://user@dummy/server
   searching for changes
   no changes found
-  working directory parent is obsolete!
 
-  $ hg evolve
-  update:[9] b => foobar
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  working directory is now at b423e42e5548
+  $ hg debugobsolete | sort
+  6e1d0b2f81801d1de2645ac4295781ff2ee08fb4 5402bb2493c730b659b638d6a2f67f9d6dd57f84 0 (*) {'user': 'test'} (glob)
+  a754b7172e58b7e27ed5dfd7827a1b911c727655 b423e42e554804d21e786126e84a27565a786628 0 (*) {'user': 'test'} (glob)
 
   $ log
-  @  b => foobar [public:b423e42e5548]
+  o  b => foobar [public:b423e42e5548]
   |
   o  b => foofoo [public:5402bb2493c7]
   |
   o  a => baz [public:ddd9491cc0b4]
   |
+  | @  b => foobar [draft:a754b7172e58]
+  | |
+  | x  b => foofoo [draft:6e1d0b2f8180]
+  |/
   o  b => quux [public:137b1b6ef903]
   |
   o  b => baz [public:7ba922f02e46]
   |
   o  b => bar [public:fe66d1686ec2]
   |
   o  a => bar [public:add0c792bfce]
   |


More information about the Mercurial-devel mailing list