tests/test-obsconvert.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Sat, 16 Dec 2017 23:40:39 +0100
branchmercurial-4.3
changeset 3380 62f742d144da
parent 3105 f5d472b7e800
permissions -rw-r--r--
test-compat: merge stable into mercurial-4.3
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
  > EOF
1806
9f42f819267b evolve: move the extensions to 'hgext3rd'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1187
diff changeset
     4
  $ 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
     5
  $ hg init alpha
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     6
  $ cd alpha
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     7
  $ echo foo > foo
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     8
  $ hg addremove
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     9
  adding foo
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    10
  $ 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
    11
  $ 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
    12
  >   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
    13
  >   hg amend
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    14
  > done
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    15
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    16
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
    17
  $ hg debugobsolete
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    18
  e63c23eaa88ae77967edcf4ea194d31167c478b0 b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34 0 (*) {'ef1': '*', 'user': 'test'} (glob)
3105
f5d472b7e800 test-compat: revert output changes related to temporary amend commit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
    19
  a5b276878fa564da042b4b9efef3713ceea20350 0 {e63c23eaa88ae77967edcf4ea194d31167c478b0} (*) {'ef1': '*', 'user': 'test'} (glob)
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    20
  b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34 384fc811182687231962e486f23ea8c5bab7a2d3 0 (*) {'ef1': '*', 'user': 'test'} (glob)
3105
f5d472b7e800 test-compat: revert output changes related to temporary amend commit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
    21
  2291082406feb57d0f83b9b0a6777b6074f3fde6 0 {b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34} (*) {'ef1': '*', 'user': 'test'} (glob)
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    22
  384fc811182687231962e486f23ea8c5bab7a2d3 949d379b3c3bf051906bc3528c049cb536e2ec86 0 (*) {'ef1': '*', 'user': 'test'} (glob)
3105
f5d472b7e800 test-compat: revert output changes related to temporary amend commit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
    23
  1616bdbe82d3fd1fb7c4e068aee277835672ffdc 0 {384fc811182687231962e486f23ea8c5bab7a2d3} (*) {'ef1': '*', 'user': 'test'} (glob)
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    24
  949d379b3c3bf051906bc3528c049cb536e2ec86 f2e4c45b2a4a58ccf7ef6825b8fa5685873cd2f7 0 (*) {'ef1': '*', 'user': 'test'} (glob)
3105
f5d472b7e800 test-compat: revert output changes related to temporary amend commit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
    25
  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
    26
  $ 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
    27
  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
    28
  Done!
1172
8d28bb4fc127 debugobsconvert: fix 6f08a8f6bb1d and add proper test
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1170
diff changeset
    29
  $ hg debugobsolete
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    30
  e63c23eaa88ae77967edcf4ea194d31167c478b0 b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34 0 (*) {'ef1': '*', 'user': 'test'} (glob)
3105
f5d472b7e800 test-compat: revert output changes related to temporary amend commit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
    31
  a5b276878fa564da042b4b9efef3713ceea20350 0 {e63c23eaa88ae77967edcf4ea194d31167c478b0} (*) {'ef1': '*', 'user': 'test'} (glob)
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    32
  b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34 384fc811182687231962e486f23ea8c5bab7a2d3 0 (*) {'ef1': '*', 'user': 'test'} (glob)
3105
f5d472b7e800 test-compat: revert output changes related to temporary amend commit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
    33
  2291082406feb57d0f83b9b0a6777b6074f3fde6 0 {b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34} (*) {'ef1': '*', 'user': 'test'} (glob)
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    34
  384fc811182687231962e486f23ea8c5bab7a2d3 949d379b3c3bf051906bc3528c049cb536e2ec86 0 (*) {'ef1': '*', 'user': 'test'} (glob)
3105
f5d472b7e800 test-compat: revert output changes related to temporary amend commit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
    35
  1616bdbe82d3fd1fb7c4e068aee277835672ffdc 0 {384fc811182687231962e486f23ea8c5bab7a2d3} (*) {'ef1': '*', 'user': 'test'} (glob)
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    36
  949d379b3c3bf051906bc3528c049cb536e2ec86 f2e4c45b2a4a58ccf7ef6825b8fa5685873cd2f7 0 (*) {'ef1': '*', 'user': 'test'} (glob)
3105
f5d472b7e800 test-compat: revert output changes related to temporary amend commit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
    37
  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
    38
  $ 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
    39
  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
    40
  [255]
1172
8d28bb4fc127 debugobsconvert: fix 6f08a8f6bb1d and add proper test
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1170
diff changeset
    41
  $ hg debugobsolete
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    42
  e63c23eaa88ae77967edcf4ea194d31167c478b0 b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34 0 (*) {'ef1': '*', 'user': 'test'} (glob)
3105
f5d472b7e800 test-compat: revert output changes related to temporary amend commit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
    43
  a5b276878fa564da042b4b9efef3713ceea20350 0 {e63c23eaa88ae77967edcf4ea194d31167c478b0} (*) {'ef1': '*', 'user': 'test'} (glob)
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    44
  b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34 384fc811182687231962e486f23ea8c5bab7a2d3 0 (*) {'ef1': '*', 'user': 'test'} (glob)
3105
f5d472b7e800 test-compat: revert output changes related to temporary amend commit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
    45
  2291082406feb57d0f83b9b0a6777b6074f3fde6 0 {b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34} (*) {'ef1': '*', 'user': 'test'} (glob)
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    46
  384fc811182687231962e486f23ea8c5bab7a2d3 949d379b3c3bf051906bc3528c049cb536e2ec86 0 (*) {'ef1': '*', 'user': 'test'} (glob)
3105
f5d472b7e800 test-compat: revert output changes related to temporary amend commit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
    47
  1616bdbe82d3fd1fb7c4e068aee277835672ffdc 0 {384fc811182687231962e486f23ea8c5bab7a2d3} (*) {'ef1': '*', 'user': 'test'} (glob)
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    48
  949d379b3c3bf051906bc3528c049cb536e2ec86 f2e4c45b2a4a58ccf7ef6825b8fa5685873cd2f7 0 (*) {'ef1': '*', 'user': 'test'} (glob)
3105
f5d472b7e800 test-compat: revert output changes related to temporary amend commit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
    49
  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
    50
  $ 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
    51
  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
    52
  Done!
1172
8d28bb4fc127 debugobsconvert: fix 6f08a8f6bb1d and add proper test
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1170
diff changeset
    53
  $ hg debugobsolete
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    54
  e63c23eaa88ae77967edcf4ea194d31167c478b0 b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34 0 (*) {'ef1': '*', 'user': 'test'} (glob)
3105
f5d472b7e800 test-compat: revert output changes related to temporary amend commit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
    55
  a5b276878fa564da042b4b9efef3713ceea20350 0 {e63c23eaa88ae77967edcf4ea194d31167c478b0} (*) {'ef1': '*', 'user': 'test'} (glob)
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    56
  b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34 384fc811182687231962e486f23ea8c5bab7a2d3 0 (*) {'ef1': '*', 'user': 'test'} (glob)
3105
f5d472b7e800 test-compat: revert output changes related to temporary amend commit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
    57
  2291082406feb57d0f83b9b0a6777b6074f3fde6 0 {b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34} (*) {'ef1': '*', 'user': 'test'} (glob)
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    58
  384fc811182687231962e486f23ea8c5bab7a2d3 949d379b3c3bf051906bc3528c049cb536e2ec86 0 (*) {'ef1': '*', 'user': 'test'} (glob)
3105
f5d472b7e800 test-compat: revert output changes related to temporary amend commit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
    59
  1616bdbe82d3fd1fb7c4e068aee277835672ffdc 0 {384fc811182687231962e486f23ea8c5bab7a2d3} (*) {'ef1': '*', 'user': 'test'} (glob)
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    60
  949d379b3c3bf051906bc3528c049cb536e2ec86 f2e4c45b2a4a58ccf7ef6825b8fa5685873cd2f7 0 (*) {'ef1': '*', 'user': 'test'} (glob)
3105
f5d472b7e800 test-compat: revert output changes related to temporary amend commit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
    61
  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
    62
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    63
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
    64
  $ 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
    65
  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
    66
  Done!
04bd66779a1f obsup: hack extension to make in-place upgrading of obsolete markers easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    67
  $ hg debugobsconvert
1170
4697f23e0ede debugobsconvert: fix a typo on "version"
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1159
diff changeset
    68
  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
    69
  Done!
1172
8d28bb4fc127 debugobsconvert: fix 6f08a8f6bb1d and add proper test
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1170
diff changeset
    70
  $ hg debugobsolete
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    71
  e63c23eaa88ae77967edcf4ea194d31167c478b0 b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34 0 (*) {'ef1': '*', 'user': 'test'} (glob)
3105
f5d472b7e800 test-compat: revert output changes related to temporary amend commit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
    72
  a5b276878fa564da042b4b9efef3713ceea20350 0 {e63c23eaa88ae77967edcf4ea194d31167c478b0} (*) {'ef1': '*', 'user': 'test'} (glob)
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    73
  b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34 384fc811182687231962e486f23ea8c5bab7a2d3 0 (*) {'ef1': '*', 'user': 'test'} (glob)
3105
f5d472b7e800 test-compat: revert output changes related to temporary amend commit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
    74
  2291082406feb57d0f83b9b0a6777b6074f3fde6 0 {b81ac6b9d2a55f9a7a6b90a006b1aab0568d6d34} (*) {'ef1': '*', 'user': 'test'} (glob)
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    75
  384fc811182687231962e486f23ea8c5bab7a2d3 949d379b3c3bf051906bc3528c049cb536e2ec86 0 (*) {'ef1': '*', 'user': 'test'} (glob)
3105
f5d472b7e800 test-compat: revert output changes related to temporary amend commit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
    76
  1616bdbe82d3fd1fb7c4e068aee277835672ffdc 0 {384fc811182687231962e486f23ea8c5bab7a2d3} (*) {'ef1': '*', 'user': 'test'} (glob)
2581
ef5d556ec589 effectflag: activate effect flag on test-obsconvert.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    77
  949d379b3c3bf051906bc3528c049cb536e2ec86 f2e4c45b2a4a58ccf7ef6825b8fa5685873cd2f7 0 (*) {'ef1': '*', 'user': 'test'} (glob)
3105
f5d472b7e800 test-compat: revert output changes related to temporary amend commit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
    78
  8668d55aac650158bb510be6d47d21e3db9e5c75 0 {949d379b3c3bf051906bc3528c049cb536e2ec86} (*) {'ef1': '*', 'user': 'test'} (glob)