tests/test-obsconvert.t
changeset 1159 04bd66779a1f
child 1170 4697f23e0ede
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-obsconvert.t	Mon Oct 20 22:16:24 2014 -0400
@@ -0,0 +1,34 @@
+  $ 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!