tests/test-manifestv2.t
changeset 24935 3035b75cd594
parent 24573 701d3554de0e
child 26917 2329ca3ebc7a
equal deleted inserted replaced
24934:5abd0a76bc8f 24935:3035b75cd594
     1 Check that entry is added to .hg/requires
     1 Create repo with old manifest
       
     2 
       
     3   $ hg init existing
       
     4   $ cd existing
       
     5   $ echo footext > foo
       
     6   $ hg add foo
       
     7   $ hg commit -m initial
       
     8 
       
     9 We're using v1, so no manifestv2 entry is in requires yet.
       
    10 
       
    11   $ grep manifestv2 .hg/requires
       
    12   [1]
       
    13 
       
    14 Let's clone this with manifestv2 enabled to switch to the new format for
       
    15 future commits.
       
    16 
       
    17   $ cd ..
       
    18   $ hg clone --pull existing new --config experimental.manifestv2=1
       
    19   requesting all changes
       
    20   adding changesets
       
    21   adding manifests
       
    22   adding file changes
       
    23   added 1 changesets with 1 changes to 1 files
       
    24   updating to branch default
       
    25   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
    26   $ cd new
       
    27 
       
    28 Check that entry was added to .hg/requires.
       
    29 
       
    30   $ grep manifestv2 .hg/requires
       
    31   manifestv2
       
    32 
       
    33 Make a new commit.
       
    34 
       
    35   $ echo newfootext > foo
       
    36   $ hg commit -m new
       
    37 
       
    38 Check that the manifest actually switched to v2.
       
    39 
       
    40   $ hg debugdata -m 0
       
    41   foo\x0021e958b1dca695a60ee2e9cf151753204ee0f9e9 (esc)
       
    42 
       
    43   $ hg debugdata -m 1
       
    44   \x00 (esc)
       
    45   \x00foo\x00 (esc)
       
    46   I\xab\x7f\xb8(\x83\xcas\x15\x9d\xc2\xd3\xd3:5\x08\xbad5_ (esc)
       
    47 
       
    48 Check that manifestv2 is used if the requirement is present, even if it's
       
    49 disabled in the config.
       
    50 
       
    51   $ echo newerfootext > foo
       
    52   $ hg --config experimental.manifestv2=False commit -m newer
       
    53 
       
    54   $ hg debugdata -m 2
       
    55   \x00 (esc)
       
    56   \x00foo\x00 (esc)
       
    57   \xa6\xb1\xfb\xef]\x91\xa1\x19`\xf3.#\x90S\xf8\x06 \xe2\x19\x00 (esc)
       
    58 
       
    59 Check that we can still read v1 manifests.
       
    60 
       
    61   $ hg files -r 0
       
    62   foo
       
    63 
       
    64   $ cd ..
       
    65 
       
    66 Check that entry is added to .hg/requires on repo creation
     2 
    67 
     3   $ hg --config experimental.manifestv2=True init repo
    68   $ hg --config experimental.manifestv2=True init repo
     4   $ cd repo
    69   $ cd repo
     5   $ grep manifestv2 .hg/requires
    70   $ grep manifestv2 .hg/requires
     6   manifestv2
    71   manifestv2