tests/test-private.t
changeset 10 91169d2d7f1b
parent 9 1f84a74df837
equal deleted inserted replaced
9:1f84a74df837 10:91169d2d7f1b
    14   $ hg add babar
    14   $ hg add babar
    15   $ hg ci -m "add babar"
    15   $ hg ci -m "add babar"
    16   $ echo "la veille dame" > babar
    16   $ echo "la veille dame" > babar
    17   $ hg ci -m "add dame"
    17   $ hg ci -m "add dame"
    18   $ hg log --template='{rev}:{node|short}: {state}\n'
    18   $ hg log --template='{rev}:{node|short}: {state}\n'
    19   1:710fe444b3b0: 0
    19   1:710fe444b3b0: published
    20   0:5caa672bac26: 0
    20   0:5caa672bac26: published
    21   $ hg out  ../remote1 --template='{rev}:{node|short}\n'
    21   $ hg out  ../remote1 --template='{rev}:{node|short}\n'
    22   comparing with ../remote1
    22   comparing with ../remote1
    23   searching for changes
    23   searching for changes
    24   0:5caa672bac26
    24   0:5caa672bac26
    25   1:710fe444b3b0
    25   1:710fe444b3b0
    28   searching for changes
    28   searching for changes
    29   adding changesets
    29   adding changesets
    30   adding manifests
    30   adding manifests
    31   adding file changes
    31   adding file changes
    32   added 2 changesets with 2 changes to 1 files
    32   added 2 changesets with 2 changes to 1 files
    33   $ hg setstate 0 1 # until we fix push
    33   $ hg setstate published 1 # until we fix push
    34   $ echo "tree" >> savanna
    34   $ echo "tree" >> savanna
    35   $ hg add savanna
    35   $ hg add savanna
    36   $ hg ci -m "terrain"
    36   $ hg ci -m "terrain"
    37   $ echo "flore" >> babar
    37   $ echo "flore" >> babar
    38   $ hg ci -m "children"
    38   $ hg ci -m "children"
    39   $ hg log --template='{rev}:{node|short}: {state}\n'
    39   $ hg log --template='{rev}:{node|short}: {state}\n'
    40   3:73585b17392a: 0
    40   3:73585b17392a: published
    41   2:3c8695235a32: 0
    41   2:3c8695235a32: published
    42   1:710fe444b3b0: 0
    42   1:710fe444b3b0: published
    43   0:5caa672bac26: 0
    43   0:5caa672bac26: published
    44 
    44 
    45 turn private on (repo side)
    45 turn private on (repo side)
    46   $ cat > .hg/hgrc << EOF
    46   $ cat > .hg/hgrc << EOF
    47   > [states]
    47   > [states]
    48   > private=yes
    48   > private=yes
    49   > EOF
    49   > EOF
    50   $ hg log --template='{rev}:{node|short}: {state}\n'
    50   $ hg log --template='{rev}:{node|short}: {state}\n'
    51   3:73585b17392a: 3
    51   3:73585b17392a: draft
    52   2:3c8695235a32: 3
    52   2:3c8695235a32: draft
    53   1:710fe444b3b0: 0
    53   1:710fe444b3b0: published
    54   0:5caa672bac26: 0
    54   0:5caa672bac26: published
    55 
    55 
    56 test outgoing and push
    56 test outgoing and push
    57   $ hg out  ../remote1 --template='{rev}:{node|short}\n'
    57   $ hg out  ../remote1 --template='{rev}:{node|short}\n'
    58   comparing with ../remote1
    58   comparing with ../remote1
    59   searching for changes
    59   searching for changes
    78   added 2 changesets with 2 changes to 1 files
    78   added 2 changesets with 2 changes to 1 files
    79 
    79 
    80 turn private off again (repo side)
    80 turn private off again (repo side)
    81   $ sed -i 's/^private=.*$/private=no/' .hg/hgrc
    81   $ sed -i 's/^private=.*$/private=no/' .hg/hgrc
    82   $ hg log --template='{rev}:{node|short}: {state}\n'
    82   $ hg log --template='{rev}:{node|short}: {state}\n'
    83   3:73585b17392a: 0
    83   3:73585b17392a: published
    84   2:3c8695235a32: 0
    84   2:3c8695235a32: published
    85   1:710fe444b3b0: 0
    85   1:710fe444b3b0: published
    86   0:5caa672bac26: 0
    86   0:5caa672bac26: published
    87   $ hg out  ../remote1 --template='{rev}:{node|short}\n'
    87   $ hg out  ../remote1 --template='{rev}:{node|short}\n'
    88   comparing with ../remote1
    88   comparing with ../remote1
    89   searching for changes
    89   searching for changes
    90   2:3c8695235a32
    90   2:3c8695235a32
    91   3:73585b17392a
    91   3:73585b17392a