Show More
@@ -141,3 +141,61 b' Test that history rewriting command can ' | |||||
141 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
141 | date: Thu Jan 01 00:00:00 1970 +0000 | |
142 | summary: root |
|
142 | summary: root | |
143 |
|
143 | |||
|
144 | ||||
|
145 | Test that a strip will preserve unrelated changeset archived | |||
|
146 | ------------------------------------------------------------ | |||
|
147 | ||||
|
148 | prepare a suitable tree | |||
|
149 | ||||
|
150 | $ echo foo > bar | |||
|
151 | $ hg add bar | |||
|
152 | $ hg commit -m 'some more commit' | |||
|
153 | $ hg log -G --hidden -T '{rev} {node|short} [{phase}] {desc|firstline}\n' | |||
|
154 | @ 3 f90bf4e57854 [draft] some more commit | |||
|
155 | | | |||
|
156 | o 2 d1e73e428f29 [draft] unbundletesting | |||
|
157 | | | |||
|
158 | | o 1 883aadbbf309 [draft] unbundletesting | |||
|
159 | |/ | |||
|
160 | o 0 c1863a3840c6 [draft] root | |||
|
161 | ||||
|
162 | $ hg strip --soft --rev '.' | |||
|
163 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
164 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/f90bf4e57854-56b37ff2-backup.hg | |||
|
165 | $ hg log -G --hidden -T '{rev} {node|short} [{phase}] {desc|firstline}\n' | |||
|
166 | o 3 f90bf4e57854 [archived] some more commit | |||
|
167 | | | |||
|
168 | @ 2 d1e73e428f29 [draft] unbundletesting | |||
|
169 | | | |||
|
170 | | o 1 883aadbbf309 [draft] unbundletesting | |||
|
171 | |/ | |||
|
172 | o 0 c1863a3840c6 [draft] root | |||
|
173 | ||||
|
174 | ||||
|
175 | ||||
|
176 | Strips the other (lower rev-num) head | |||
|
177 | ||||
|
178 | $ hg strip --rev 'min(head() and not .)' | |||
|
179 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/883aadbbf309-efc55adc-backup.hg | |||
|
180 | ||||
|
181 | The archived changeset should still be hidden | |||
|
182 | ||||
|
183 | $ hg log -G -T '{rev} {node|short} [{phase}] {desc|firstline}\n' | |||
|
184 | o 2 f90bf4e57854 [draft] some more commit (known-bad-output !) | |||
|
185 | | (known-bad-output !) | |||
|
186 | @ 1 d1e73e428f29 [draft] unbundletesting | |||
|
187 | | | |||
|
188 | o 0 c1863a3840c6 [draft] root | |||
|
189 | ||||
|
190 | ||||
|
191 | It may still be around: | |||
|
192 | ||||
|
193 | $ hg log --hidden -G -T '{rev} {node|short} [{phase}] {desc|firstline}\n' | |||
|
194 | o 2 f90bf4e57854 [draft] some more commit (known-bad-output !) | |||
|
195 | o 2 f90bf4e57854 [archived] some more commit (missing-correct-output !) | |||
|
196 | | | |||
|
197 | @ 1 d1e73e428f29 [draft] unbundletesting | |||
|
198 | | | |||
|
199 | o 0 c1863a3840c6 [draft] root | |||
|
200 | ||||
|
201 |
General Comments 0
You need to be logged in to leave comments.
Login now