Mercurial > evolve
diff tests/test-evolve.t @ 5970:65d4e47d7f26
rewriteutil: use precheck from core if recent enough
This commit makes the evolve extension's `rewriteutil.precheck()`
simply delegate to the same function from Mercurial core, if that
function is deemed recent enough. The way I made that check is by
looking for `rewriteutil.find_new_divergence_from()`. That means that
there's a range of commits (ba6881c6::8125bcd2^) where the user would
see less detailed error messages if they are running with an hg
version from that range (there are no released versions in that
range).
As you can see in the tests, switching to core's version of the
function mostly affects error messages and exit codes.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 04 May 2021 09:40:18 -0700 |
parents | 701a91a23799 |
children | 1a13ac9ef30a f49e5fa3ae0e |
line wrap: on
line diff
--- a/tests/test-evolve.t Sat Jun 19 22:33:38 2021 +0300 +++ b/tests/test-evolve.t Tue May 04 09:40:18 2021 -0700 @@ -148,7 +148,7 @@ $ hg prune 1 abort: cannot prune public changesets: 7c3bad9141dc (see 'hg help phases' for details) - [255] + [10] $ hg log -r 1 --template '{rev} {phase} {obsolete}\n' 1 public @@ -1261,9 +1261,9 @@ $ hg up 274b6cd0c101^ 0 files updated, 0 files merged, 2 files removed, 0 files unresolved $ hg uncommit --all - abort: uncommit will orphan 4 descendants + abort: cannot uncommit changeset, as that will orphan 4 descendants (see 'hg help evolution.instability') - [255] + [10] $ hg up 274b6cd0c101 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg uncommit --all @@ -1318,13 +1318,13 @@ $ mkcommit c5_ created new head $ hg prune '0ef9ff75f8e2 + f1b85956c48c' - abort: prune will orphan 1 descendants + abort: cannot prune changeset, as that will orphan 1 descendants (see 'hg help evolution.instability') - [255] + [10] $ hg prune '98e171e2f272::0d9203b74542' - abort: prune will orphan 1 descendants + abort: cannot prune changeset, as that will orphan 1 descendants (see 'hg help evolution.instability') - [255] + [10] $ hg prune '0ef9ff75f8e2::' 3 changesets pruned $ glog -r "0cf3707e8971::"