comparison tests/test-evolve-issue5881.t @ 4346:ff483949674e

evolve: add test case for issue 5881
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Tue, 25 Dec 2018 16:08:05 +0530
parents
children 398c33b17d76
comparison
equal deleted inserted replaced
4345:f45b4c31d81f 4346:ff483949674e
1 Test for issue 5881 present at https://bz.mercurial-scm.org/show_bug.cgi?id=5881
2 ===============================================================================
3 which is about that if the working copy parent is obsolete then evolve update
4 to its successor revision and stop; it doesn't continue to evolve remaining
5 revisions those were suppossed to evovle.
6
7 Setup
8 =====
9
10 $ cat >> $HGRCPATH <<EOF
11 > [phases]
12 > publish = False
13 > [alias]
14 > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}"
15 > [extensions]
16 > EOF
17 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
18
19 $ hg init issue5881
20 $ cd issue5881
21
22 Prepare the directory by creating an orphan and update to its obsolete parent:
23
24 $ for ch in a b c; do echo $ch > $ch; hg ci -Am "added "$ch; done;
25 adding a
26 adding b
27 adding c
28 $ hg up 1 -q
29 $ hg ci --amend -m "updated b"
30 1 new orphan changesets
31 $ hg up 1
32 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
33 working directory parent is obsolete! (5f6d8a4bf34a)
34 (use 'hg evolve' to update to its successor: e6048a693c0d)
35
36 $ hg glog
37 o 3:e6048a693c0d updated b
38 | () draft
39 | * 2:155349b645be added c
40 | | () draft
41 | @ 1:5f6d8a4bf34a added b
42 |/ () draft
43 o 0:9092f1db7931 added a
44 () draft
45
46 Test `hg evolve` evolve all the revisions specified by user:
47 (XXX:it stops after updating to its successor and don't evolve next revision,
48 it will fixed in next patch)
49 $ hg evolve -r .::
50 update:[3] updated b
51 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
52 working directory is now at e6048a693c0d