comparison tests/test-prev-next.t @ 1445:6fd6c98f9f70

next: add extensive testing to the 'next' command We are going to introduce more complexity to it. We add the full extend of the case we want tested to see how they evolve later.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 24 Jun 2015 21:16:57 -0700
parents fcc467ca740e
children 09206bdc2db4
comparison
equal deleted inserted replaced
1444:9a78233c62a4 1445:6fd6c98f9f70
102 [255] 102 [255]
103 $ hg next --merge 103 $ hg next --merge
104 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 104 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
105 [1] added b 105 [1] added b
106 106
107 Behavior with aspiring children
108 -------------------------------
109
110 $ hg revert --all
111 forgetting modified-bar
112 $ hg log -G
113 o changeset: 2:4e26ef31f919
114 | bookmark: mark
115 | bookmark: no-move
116 | tag: tip
117 | user: test
118 | date: Thu Jan 01 00:00:00 1970 +0000
119 | summary: added c
120 |
121 @ changeset: 1:6e742c9127b3
122 | user: test
123 | date: Thu Jan 01 00:00:00 1970 +0000
124 | summary: added b
125 |
126 o changeset: 0:a154386e50d1
127 user: test
128 date: Thu Jan 01 00:00:00 1970 +0000
129 summary: added a
130
131
132 no children of any kind
133
134 $ hg next
135 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
136 [2] added c
137 $ hg next
138 no non-obsolete children
139 [1]
140 $ hg prev
141 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
142 [1] added b
143
144 some aspiring children
145
146 $ hg amend -m 'added b (2)'
147 1 new unstable changesets
148 $ hg next
149 no non-obsolete children
150 [1]
151 $ hg evolve
152 move:[2] added c
153 atop:[3] added b (2)
154 working directory is now at e3b6d5df389b
155
156 next with ambiguity
157
158 $ hg prev
159 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
160 [3] added b (2)
161 $ echo d > d
162 $ hg add d
163 $ hg commit -m 'added d'
164 created new head
165 $ hg prev
166 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
167 [3] added b (2)
168 $ hg next
169 [4] added c
170 [5] added d
171 multiple non-obsolete children, explicitly update to one of them
172 [1]
173
174 next with ambiguity in aspiring children
175
176 $ hg am -m 'added b (3)'
177 2 new unstable changesets
178 $ hg next
179 no non-obsolete children
180 [1]
181 $ hg evolve
182 abort: multiple evolve candidates
183 (select one of e3b6d5df389b, 9df671ccd2c7 with --rev)
184 [255]
185 $ hg evolve -r 5
186 move:[5] added d
187 atop:[6] added b (3)
188 working directory is now at 47ea25be8aea