comparison tests/test-unamend.t @ 35709:1a09dad8b85a

evolution: report new unstable changesets This adds a transaction summary callback that reports the number of new orphan, content-divergent and phase-divergent changesets. The code for reporting it is based on the code from the evolve extension, but simplified a bit. It simply counts the numbers for each kind of instability before and after the transaction. That's obviously not very efficient, but it's easy to reason about, so I'm doing this as a first step that can make us quite confident about the test case changes. We can optimize it later and make sure that the tests are not affected. The code has been used in the evolve extension for a long time and has apparently been sufficiently fast, so it doesn't seem like a pressing issue. Unlike the evolve extension's version of this report, this version applies to all commands (or all transactions run as part of any command, to be exact). Differential Revision: https://phab.mercurial-scm.org/D1867
author Martin von Zweigbergk <martinvonz@google.com>
date Sun, 14 Jan 2018 23:59:17 -0800
parents f01101100043
children 713fbf057c7d
comparison
equal deleted inserted replaced
35708:03e921942163 35709:1a09dad8b85a
256 256
257 $ hg up 5 257 $ hg up 5
258 2 files updated, 0 files merged, 2 files removed, 0 files unresolved 258 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
259 $ echo bar >> f 259 $ echo bar >> f
260 $ hg amend 260 $ hg amend
261 3 new orphan changesets
261 $ hg rebase -s 6 -d . -q 262 $ hg rebase -s 6 -d . -q
262 263
263 $ hg glog 264 $ hg glog
264 o 23:03ddd6fc5af1 Added things to a and b 265 o 23:03ddd6fc5af1 Added things to a and b
265 | 266 |
283 $ hg --config experimental.evolution=createmarkers unamend 284 $ hg --config experimental.evolution=createmarkers unamend
284 abort: cannot unamend changeset with children 285 abort: cannot unamend changeset with children
285 [255] 286 [255]
286 287
287 $ hg unamend 288 $ hg unamend
289 3 new orphan changesets
288 290
289 Trying to unamend a public changeset 291 Trying to unamend a public changeset
290 292
291 $ hg up -C 23 293 $ hg up -C 23
292 5 files updated, 0 files merged, 0 files removed, 0 files unresolved 294 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
293 $ hg phase -r . -p 295 $ hg phase -r . -p
296 1 new phase-divergent changesets
294 $ hg unamend 297 $ hg unamend
295 abort: cannot unamend public changesets 298 abort: cannot unamend public changesets
296 (see 'hg help phases' for details) 299 (see 'hg help phases' for details)
297 [255] 300 [255]
298 301