fix retrieval of divergent changesets in obssummary (typo)
Add a test for this; drop wrong divergent print in 'Test rollback support'.
--- a/hgext/evolve.py Thu Nov 22 11:30:36 2012 +0100
+++ b/hgext/evolve.py Wed Nov 28 10:19:43 2012 +0100
@@ -1100,7 +1100,7 @@
ret = orig(ui, repo, *args, **kwargs)
nbunstable = len(getobscache(repo, 'unstable'))
nbbumped = len(getobscache(repo, 'bumped'))
- nbdivergent = len(getobscache(repo, 'unstable'))
+ nbdivergent = len(getobscache(repo, 'divergent'))
write('unstable: %i changesets\n', nbunstable)
write('bumped: %i changesets\n', nbbumped)
write('divergent: %i changesets\n', nbdivergent)
--- a/tests/test-obsolete-divergent.t Thu Nov 22 11:30:36 2012 +0100
+++ b/tests/test-obsolete-divergent.t Wed Nov 28 10:19:43 2012 +0100
@@ -81,6 +81,16 @@
$ hg log -r 'divergent()'
2:82623d38b9ba A_1
3:392fd25390da A_2
+ $ hg summary -v
+ parent: 0:d20a80d4def3
+ base
+ branch: default
+ commit: (clean)
+ update: 3 new changesets (update)
+ unstable: 0 changesets
+ bumped: 0 changesets
+ divergent: 2 changesets
+
check that mercurial refuse to push
--- a/tests/test-obsolete.t Thu Nov 22 11:30:36 2012 +0100
+++ b/tests/test-obsolete.t Wed Nov 28 10:19:43 2012 +0100
@@ -376,7 +376,6 @@
commit: 1 deleted, 2 unknown (clean)
update: 4 new changesets, 4 branch heads (merge)
unstable: 1 changesets
- divergent: 1 changesets
$ qlog
6
- 909a0fb57e5d