tests/test-obsconvert.t
author Pierre-Yves David <pierre-yves.david@fb.com>
Thu, 20 Nov 2014 15:33:59 -0800
changeset 1170 4697f23e0ede
parent 1159 04bd66779a1f
child 1172 8d28bb4fc127
permissions -rw-r--r--
debugobsconvert: fix a typo on "version"

  $ 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 version 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 version 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 version 0
  Done!
  $ hg debugobsconvert
  Old store is version 0, will rewrite in version 1
  Done!