tests/test-obsconvert.t
author Augie Fackler <raf@durin42.com>
Mon, 20 Oct 2014 22:16:24 -0400
changeset 1159 04bd66779a1f
child 1170 4697f23e0ede
permissions -rw-r--r--
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.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1159
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     1
  $ cat >> $HGRCPATH <<EOF
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     2
  > [extensions]
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     3
  > rebase=
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     4
  > EOF
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     5
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     6
  $ hg init alpha
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     7
  $ cd alpha
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     8
  $ echo foo > foo
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     9
  $ hg addremove
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    10
  adding foo
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    11
  $ hg ci -m 'foo'
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    12
  $ for x in 1 2 3 4 ; do
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    13
  >   echo foo $x > foo
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    14
  >   hg amend
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    15
  > done
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    16
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    17
Test conversion between obsolete marker formats
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    18
  $ hg debugobsconvert --new-format 0
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    19
  Old store is version 1, will rewrite in verion 0
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    20
  Done!
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    21
  $ hg debugobsconvert --new-format 0
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    22
  abort: New format is the same as the old format, not upgrading!
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    23
  [255]
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    24
  $ hg debugobsconvert --new-format 1
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    25
  Old store is version 0, will rewrite in verion 1
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    26
  Done!
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    27
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    28
Test that the default is some reasonably modern format (first downgrade)
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    29
  $ hg debugobsconvert --new-format 0
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    30
  Old store is version 1, will rewrite in verion 0
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    31
  Done!
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    32
  $ hg debugobsconvert
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    33
  Old store is version 0, will rewrite in verion * (glob)
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    34
  Done!