This is an archive of the discontinued Mercurial Phabricator instance.

evolution: report new unstable changesets
ClosedPublic

Authored by martinvonz on Jan 16 2018, 2:33 AM.

Details

Summary

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).

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

martinvonz created this revision.Jan 16 2018, 2:33 AM

LGTM on a first quick review

lothiraldan accepted this revision.Jan 17 2018, 1:55 PM
yuja accepted this revision.Jan 18 2018, 8:14 AM
This revision is now accepted and ready to land.Jan 18 2018, 8:14 AM
This revision was automatically updated to reflect the committed changes.

Any idea why this introduced failures on Windows? The missing orphan line I assumed was a #if conditional, but there's not one in any of the files.

--- c:/Users/Matt/projects/hg/tests/test-single-head.t
+++ c:/Users/Matt/projects/hg/tests/test-single-head.t.err
@@ -200,4 +200,5 @@

   $ hg strip --config extensions.strip= --rev 'desc("c_dH0")'
   saved backup bundle to $TESTTMP/client/.hg/strip-backup/fe47ea669cea-a41bf5a9-backup.hg
-
+  warning: ignoring unknown working parent 49003e504178!
+

ERROR: test-single-head.t output changed
!
--- c:/Users/Matt/projects/hg/tests/test-histedit-obsolete.t
+++ c:/Users/Matt/projects/hg/tests/test-histedit-obsolete.t.err
@@ -71,6 +71,7 @@
   $ hg commit --amend -X . -m XXXXXX
   $ hg commit --amend -X . -m b2
   $ hg --hidden --config extensions.strip= strip 'desc(XXXXXX)' --no-backup
+  warning: ignoring unknown working parent aba7da937030!
   $ hg histedit --continue
   $ hg log -G
   @  8:273c1f3b8626 c

ERROR: test-histedit-obsolete.t output changed
!
--- c:/Users/Matt/projects/hg/tests/test-rebase-obsolete.t
+++ c:/Users/Matt/projects/hg/tests/test-rebase-obsolete.t.err
@@ -772,6 +772,7 @@
   1 new orphan changesets
   $ hg --hidden strip -r 'desc(B1)'
   saved backup bundle to $TESTTMP/obsskip/.hg/strip-backup/86f6414ccda7-b1c452ee-backup.hg
+  1 new orphan changesets
   $ hg log -G
   @  5:1a79b7535141 D
   |

ERROR: test-rebase-obsolete.t output changed
!
Failed test-single-head.t: output changed
Failed test-histedit-obsolete.t: output changed
Failed test-rebase-obsolete.t: output changed

Any idea why this introduced failures on Windows? The missing orphan line I assumed was a #if conditional, but there's not one in any of the files.

That one actually looked correct (i.e. it seemed wrong for it to be missing in the Linux case). It seems to have something to do with cache invalidation. I'll continue digging. Thanks for bringing it to my attention.