tests/test-obsconvert.t
author Boris Feld <boris.feld@octobus.net>
Sun, 04 Jun 2017 21:30:08 +0200
changeset 2581 ef5d556ec589
parent 1806 9f42f819267b
child 2587 cbc7a69116bd
permissions -rw-r--r--
effectflag: activate effect flag on test-obsconvert.t test file Prepare activation of effect flag by default by activating it on test- obsconvert.t test file first.
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
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
     2
  > [experimental]
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
     3
  > evolution.effect-flags = yes
1159
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     4
  > [extensions]
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     5
  > EOF
1806
9f42f819267b evolve: move the extensions to 'hgext3rd'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1187
diff changeset
     6
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
1159
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     7
  $ hg init alpha
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     8
  $ cd alpha
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     9
  $ echo foo > foo
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    10
  $ hg addremove
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    11
  adding foo
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    12
  $ 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
    13
  $ 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
    14
  >   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
    15
  >   hg amend
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    16
  > done
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    17
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    18
Test conversion between obsolete marker formats
1172
8d28bb4fc127 debugobsconvert: fix 6f08a8f6bb1d and add proper test
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1170
diff changeset
    19
  $ hg debugobsolete
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    20
  e63c23eaa88ae77967edcf4ea194d31167c478b0 b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34 0 (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    21
  a5b276878fa564da042b4b9efef3713ceea20350 0 {e63c23eaa88ae77967edcf4ea194d31167c478b0} (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    22
  b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34 384fc811182687231962e486f23ea8c5bab7a2d3 0 (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    23
  2291082406feb57d0f83b9b0a6777b6074f3fde6 0 {b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34} (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    24
  384fc811182687231962e486f23ea8c5bab7a2d3 949d379b3c3bf051906bc3528c049cb536e2ec86 0 (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    25
  1616bdbe82d3fd1fb7c4e068aee277835672ffdc 0 {384fc811182687231962e486f23ea8c5bab7a2d3} (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    26
  949d379b3c3bf051906bc3528c049cb536e2ec86 f2e4c45b2a4a58ccf7ef6825b8fa5685873cd2f7 0 (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    27
  8668d55aac650158bb510be6d47d21e3db9e5c75 0 {949d379b3c3bf051906bc3528c049cb536e2ec86} (*) {'ef1': '*', 'user': 'test'} (glob)
1159
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    28
  $ hg debugobsconvert --new-format 0
1170
4697f23e0ede debugobsconvert: fix a typo on "version"
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1159
diff changeset
    29
  Old store is version 1, will rewrite in version 0
1159
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    30
  Done!
1172
8d28bb4fc127 debugobsconvert: fix 6f08a8f6bb1d and add proper test
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1170
diff changeset
    31
  $ hg debugobsolete
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    32
  e63c23eaa88ae77967edcf4ea194d31167c478b0 b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34 0 (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    33
  a5b276878fa564da042b4b9efef3713ceea20350 0 {e63c23eaa88ae77967edcf4ea194d31167c478b0} (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    34
  b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34 384fc811182687231962e486f23ea8c5bab7a2d3 0 (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    35
  2291082406feb57d0f83b9b0a6777b6074f3fde6 0 {b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34} (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    36
  384fc811182687231962e486f23ea8c5bab7a2d3 949d379b3c3bf051906bc3528c049cb536e2ec86 0 (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    37
  1616bdbe82d3fd1fb7c4e068aee277835672ffdc 0 {384fc811182687231962e486f23ea8c5bab7a2d3} (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    38
  949d379b3c3bf051906bc3528c049cb536e2ec86 f2e4c45b2a4a58ccf7ef6825b8fa5685873cd2f7 0 (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    39
  8668d55aac650158bb510be6d47d21e3db9e5c75 0 {949d379b3c3bf051906bc3528c049cb536e2ec86} (*) {'ef1': '*', 'user': 'test'} (glob)
1159
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    40
  $ 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
    41
  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
    42
  [255]
1172
8d28bb4fc127 debugobsconvert: fix 6f08a8f6bb1d and add proper test
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1170
diff changeset
    43
  $ hg debugobsolete
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    44
  e63c23eaa88ae77967edcf4ea194d31167c478b0 b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34 0 (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    45
  a5b276878fa564da042b4b9efef3713ceea20350 0 {e63c23eaa88ae77967edcf4ea194d31167c478b0} (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    46
  b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34 384fc811182687231962e486f23ea8c5bab7a2d3 0 (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    47
  2291082406feb57d0f83b9b0a6777b6074f3fde6 0 {b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34} (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    48
  384fc811182687231962e486f23ea8c5bab7a2d3 949d379b3c3bf051906bc3528c049cb536e2ec86 0 (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    49
  1616bdbe82d3fd1fb7c4e068aee277835672ffdc 0 {384fc811182687231962e486f23ea8c5bab7a2d3} (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    50
  949d379b3c3bf051906bc3528c049cb536e2ec86 f2e4c45b2a4a58ccf7ef6825b8fa5685873cd2f7 0 (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    51
  8668d55aac650158bb510be6d47d21e3db9e5c75 0 {949d379b3c3bf051906bc3528c049cb536e2ec86} (*) {'ef1': '*', 'user': 'test'} (glob)
1159
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    52
  $ hg debugobsconvert --new-format 1
1170
4697f23e0ede debugobsconvert: fix a typo on "version"
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1159
diff changeset
    53
  Old store is version 0, will rewrite in version 1
1159
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    54
  Done!
1172
8d28bb4fc127 debugobsconvert: fix 6f08a8f6bb1d and add proper test
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1170
diff changeset
    55
  $ hg debugobsolete
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    56
  e63c23eaa88ae77967edcf4ea194d31167c478b0 b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34 0 (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    57
  a5b276878fa564da042b4b9efef3713ceea20350 0 {e63c23eaa88ae77967edcf4ea194d31167c478b0} (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    58
  b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34 384fc811182687231962e486f23ea8c5bab7a2d3 0 (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    59
  2291082406feb57d0f83b9b0a6777b6074f3fde6 0 {b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34} (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    60
  384fc811182687231962e486f23ea8c5bab7a2d3 949d379b3c3bf051906bc3528c049cb536e2ec86 0 (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    61
  1616bdbe82d3fd1fb7c4e068aee277835672ffdc 0 {384fc811182687231962e486f23ea8c5bab7a2d3} (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    62
  949d379b3c3bf051906bc3528c049cb536e2ec86 f2e4c45b2a4a58ccf7ef6825b8fa5685873cd2f7 0 (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    63
  8668d55aac650158bb510be6d47d21e3db9e5c75 0 {949d379b3c3bf051906bc3528c049cb536e2ec86} (*) {'ef1': '*', 'user': 'test'} (glob)
1159
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    64
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    65
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
    66
  $ hg debugobsconvert --new-format 0
1170
4697f23e0ede debugobsconvert: fix a typo on "version"
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1159
diff changeset
    67
  Old store is version 1, will rewrite in version 0
1159
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    68
  Done!
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    69
  $ hg debugobsconvert
1170
4697f23e0ede debugobsconvert: fix a typo on "version"
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1159
diff changeset
    70
  Old store is version 0, will rewrite in version 1
1159
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    71
  Done!
1172
8d28bb4fc127 debugobsconvert: fix 6f08a8f6bb1d and add proper test
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1170
diff changeset
    72
  $ hg debugobsolete
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    73
  e63c23eaa88ae77967edcf4ea194d31167c478b0 b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34 0 (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    74
  a5b276878fa564da042b4b9efef3713ceea20350 0 {e63c23eaa88ae77967edcf4ea194d31167c478b0} (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    75
  b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34 384fc811182687231962e486f23ea8c5bab7a2d3 0 (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    76
  2291082406feb57d0f83b9b0a6777b6074f3fde6 0 {b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34} (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    77
  384fc811182687231962e486f23ea8c5bab7a2d3 949d379b3c3bf051906bc3528c049cb536e2ec86 0 (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    78
  1616bdbe82d3fd1fb7c4e068aee277835672ffdc 0 {384fc811182687231962e486f23ea8c5bab7a2d3} (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    79
  949d379b3c3bf051906bc3528c049cb536e2ec86 f2e4c45b2a4a58ccf7ef6825b8fa5685873cd2f7 0 (*) {'ef1': '*', 'user': 'test'} (glob)
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    80
  8668d55aac650158bb510be6d47d21e3db9e5c75 0 {949d379b3c3bf051906bc3528c049cb536e2ec86} (*) {'ef1': '*', 'user': 'test'} (glob)