obsup: hack extension to make in-place upgrading of obsolete markers easy
I tried upgrading my obsstore by doing a local clone as suggested by
Pierre-Yves and Sean, but that caused me to end up with a ton of
unstable changes that should have been marked dead. In fact, as far as
I can tell, most of the performance win of that upgrade came from the
fact that only about 46% (46672 of 102285) of my markers were brought
over with the copy-and-pull method.
$ cat >> $HGRCPATH <<EOF
> [extensions]
> rebase=
> EOF
$ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
$ hg init alpha
$ cd alpha
$ echo foo > foo
$ hg addremove
adding foo
$ hg ci -m 'foo'
$ for x in 1 2 3 4 ; do
> echo foo $x > foo
> hg amend
> done
Test conversion between obsolete marker formats
$ hg debugobsconvert --new-format 0
Old store is version 1, will rewrite in verion 0
Done!
$ hg debugobsconvert --new-format 0
abort: New format is the same as the old format, not upgrading!
[255]
$ hg debugobsconvert --new-format 1
Old store is version 0, will rewrite in verion 1
Done!
Test that the default is some reasonably modern format (first downgrade)
$ hg debugobsconvert --new-format 0
Old store is version 1, will rewrite in verion 0
Done!
$ hg debugobsconvert
Old store is version 0, will rewrite in verion * (glob)
Done!