|
1 Testing the `--no-update` flag to `hg evolve` command |
|
2 ===================================================== |
|
3 |
|
4 There is an `--update` flag to `hg evolve` command which defaults to True. The |
|
5 `--update` flag updates to the head of the evolved revisions. If you dont want |
|
6 to change your working directory or update your working directory to its |
|
7 sucessor after hg evolve, `hg evolve --no-update` is the thing for you. |
|
8 |
|
9 This patch tests that flag. |
|
10 |
|
11 Setup |
|
12 ----- |
|
13 |
|
14 $ cat >> $HGRCPATH <<EOF |
|
15 > [alias] |
|
16 > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}" |
|
17 > [extensions] |
|
18 > EOF |
|
19 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH |
|
20 |
|
21 $ hg init stoprepo |
|
22 $ cd stoprepo |
|
23 $ echo ".*\.orig" > .hgignore |
|
24 $ hg add .hgignore |
|
25 $ hg ci -m "added hgignore" |
|
26 $ for ch in a b c d; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done; |
|
27 |
|
28 $ hg glog |
|
29 @ 4:c41c793e0ef1 added d |
|
30 | () draft |
|
31 o 3:ca1b80f7960a added c |
|
32 | () draft |
|
33 o 2:b1661037fa25 added b |
|
34 | () draft |
|
35 o 1:c7586e2a9264 added a |
|
36 | () draft |
|
37 o 0:8fa14d15e168 added hgignore |
|
38 () draft |
|
39 |
|
40 Making sure we stay where we were is current wdir parent is not obsoleted |
|
41 -------------------------------------------------------------------------- |
|
42 |
|
43 $ hg up .^^ |
|
44 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
45 $ echo bar > b |
|
46 $ hg amend |
|
47 2 new orphan changesets |
|
48 $ hg glog |
|
49 @ 5:7ed0642d644b added b |
|
50 | () draft |
|
51 | * 4:c41c793e0ef1 added d |
|
52 | | () draft |
|
53 | * 3:ca1b80f7960a added c |
|
54 | | () draft |
|
55 | x 2:b1661037fa25 added b |
|
56 |/ () draft |
|
57 o 1:c7586e2a9264 added a |
|
58 | () draft |
|
59 o 0:8fa14d15e168 added hgignore |
|
60 () draft |
|
61 |
|
62 There is 'working directory is now at' message because it didnt changed |
|
63 $ hg evolve --all --no-update |
|
64 move:[3] added c |
|
65 atop:[5] added b |
|
66 move:[4] added d |
|
67 atop:[6] added c |
|
68 |
|
69 $ hg glog |
|
70 o 7:b6b20b8eefdc added d |
|
71 | () draft |
|
72 o 6:7c46f743e62f added c |
|
73 | () draft |
|
74 @ 5:7ed0642d644b added b |
|
75 | () draft |
|
76 o 1:c7586e2a9264 added a |
|
77 | () draft |
|
78 o 0:8fa14d15e168 added hgignore |
|
79 () draft |
|
80 |
|
81 Updating to successor when working directory parent is obsoleted by evolution |
|
82 ----------------------------------------------------------------------------- |
|
83 |
|
84 $ hg prev |
|
85 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
86 [1] added a |
|
87 $ echo bar > a |
|
88 $ hg amend |
|
89 3 new orphan changesets |
|
90 $ hg up 7ed0642d644b |
|
91 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
92 |
|
93 $ hg glog |
|
94 o 8:3d41537b44ca added a |
|
95 | () draft |
|
96 | * 7:b6b20b8eefdc added d |
|
97 | | () draft |
|
98 | * 6:7c46f743e62f added c |
|
99 | | () draft |
|
100 | @ 5:7ed0642d644b added b |
|
101 | | () draft |
|
102 | x 1:c7586e2a9264 added a |
|
103 |/ () draft |
|
104 o 0:8fa14d15e168 added hgignore |
|
105 () draft |
|
106 |
|
107 $ hg evolve --all --any --no-update |
|
108 move:[5] added b |
|
109 atop:[8] added a |
|
110 move:[6] added c |
|
111 atop:[9] added b |
|
112 move:[7] added d |
|
113 atop:[10] added c |
|
114 working directory is now at 12c720cb3782 |
|
115 |
|
116 $ hg glog |
|
117 o 11:a74d9f22ba3f added d |
|
118 | () draft |
|
119 o 10:958f5155e8cd added c |
|
120 | () draft |
|
121 @ 9:12c720cb3782 added b |
|
122 | () draft |
|
123 o 8:3d41537b44ca added a |
|
124 | () draft |
|
125 o 0:8fa14d15e168 added hgignore |
|
126 () draft |