tests/test-private.t
author Pierre-Yves David <pierre-yves.david@logilab.fr>
Mon, 23 May 2011 16:40:58 +0200
changeset 8 e56e40db3225
parent 7 cc592295900f
child 9 1f84a74df837
permissions -rw-r--r--
stronger tests
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     1
  $ cat >> $HGRCPATH <<EOF
7
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
     2
  > [web]
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
     3
  > push_ssl = false
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
     4
  > allow_push = *
0
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     5
  > [extensions]
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     6
  > EOF
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     7
  $ echo "states=$(echo $(dirname $TESTDIR))/states.py" >> $HGRCPATH
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     8
1
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
     9
  $ hg init local
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    10
  $ hg init remote1
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    11
  $ hg init remote2
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    12
  $ cd local
0
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    13
  $ echo "celestine" > babar
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    14
  $ hg add babar
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    15
  $ hg ci -m "add babar"
1
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    16
  $ echo "la veille dame" > babar
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    17
  $ hg ci -m "add dame"
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    18
  $ hg log --template='{rev}:{node|short}: {state}\n'
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    19
  1:710fe444b3b0: 0
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    20
  0:5caa672bac26: 0
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    21
  $ hg out  ../remote1 --template='{rev}:{node|short}\n'
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    22
  comparing with ../remote1
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    23
  searching for changes
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    24
  0:5caa672bac26
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    25
  1:710fe444b3b0
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    26
  $ hg push ../remote1
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    27
  pushing to ../remote1
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    28
  searching for changes
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    29
  adding changesets
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    30
  adding manifests
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    31
  adding file changes
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    32
  added 2 changesets with 2 changes to 1 files
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    33
  $ hg setstate 0 1 # until we fix push
3
b4932dff9bd8 fix test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 2
diff changeset
    34
  $ echo "tree" >> savanna
2
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
    35
  $ hg add savanna
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
    36
  $ hg ci -m "terrain"
1
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    37
  $ echo "flore" >> babar
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    38
  $ hg ci -m "children"
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    39
  $ hg log --template='{rev}:{node|short}: {state}\n'
3
b4932dff9bd8 fix test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 2
diff changeset
    40
  3:73585b17392a: 0
b4932dff9bd8 fix test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 2
diff changeset
    41
  2:3c8695235a32: 0
1
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    42
  1:710fe444b3b0: 0
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    43
  0:5caa672bac26: 0
0
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    44
2
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
    45
turn private on (repo side)
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
    46
  $ cat > .hg/hgrc << EOF
1
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    47
  > [states]
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    48
  > private=yes
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    49
  > EOF
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    50
  $ hg log --template='{rev}:{node|short}: {state}\n'
3
b4932dff9bd8 fix test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 2
diff changeset
    51
  3:73585b17392a: 2
b4932dff9bd8 fix test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 2
diff changeset
    52
  2:3c8695235a32: 2
1
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    53
  1:710fe444b3b0: 0
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    54
  0:5caa672bac26: 0
2
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
    55
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
    56
test outgoing and push
1
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    57
  $ hg out  ../remote1 --template='{rev}:{node|short}\n'
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    58
  comparing with ../remote1
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    59
  searching for changes
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    60
  no changes found
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    61
  [1]
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    62
  $ hg push  ../remote1
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    63
  pushing to ../remote1
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    64
  searching for changes
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    65
  no changes found
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    66
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    67
  $ hg out  ../remote2 --template='{rev}:{node|short}\n'
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    68
  comparing with ../remote2
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    69
  searching for changes
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    70
  0:5caa672bac26
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    71
  1:710fe444b3b0
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    72
  $ hg push  ../remote2
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    73
  pushing to ../remote2
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    74
  searching for changes
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    75
  adding changesets
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    76
  adding manifests
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    77
  adding file changes
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    78
  added 2 changesets with 2 changes to 1 files
beabde937e36 Add "private" concept (2). private changeset are hiden suppose to be hidden for
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    79
2
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
    80
turn private off again (repo side)
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
    81
  $ sed -i 's/^private=.*$/private=no/' .hg/hgrc
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
    82
  $ hg log --template='{rev}:{node|short}: {state}\n'
3
b4932dff9bd8 fix test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 2
diff changeset
    83
  3:73585b17392a: 0
b4932dff9bd8 fix test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 2
diff changeset
    84
  2:3c8695235a32: 0
2
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
    85
  1:710fe444b3b0: 0
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
    86
  0:5caa672bac26: 0
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
    87
  $ hg out  ../remote1 --template='{rev}:{node|short}\n'
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
    88
  comparing with ../remote1
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
    89
  searching for changes
3
b4932dff9bd8 fix test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 2
diff changeset
    90
  2:3c8695235a32
b4932dff9bd8 fix test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 2
diff changeset
    91
  3:73585b17392a
2
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
    92
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
    93
turn private on again (repo side)
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
    94
  $ sed -i 's/^private=.*$/private=yes/' .hg/hgrc
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
    95
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
    96
test incoming and pull
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
    97
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
    98
  $ hg init ../other1
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
    99
  $ cd ../other1
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
   100
  $ hg incoming ../local --template='{rev}:{node|short}\n'
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
   101
  comparing with ../local
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
   102
  0:5caa672bac26
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
   103
  1:710fe444b3b0
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
   104
  $ hg pull  ../local
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
   105
  pulling from ../local
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
   106
  requesting all changes
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
   107
  adding changesets
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
   108
  adding manifests
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
   109
  adding file changes
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
   110
  added 2 changesets with 2 changes to 1 files
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
   111
  (run 'hg update' to get a working copy)
8
e56e40db3225 stronger tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 7
diff changeset
   112
  $ hg log --template='{rev}:{node|short}\n'
e56e40db3225 stronger tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 7
diff changeset
   113
  1:710fe444b3b0
e56e40db3225 stronger tests
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 7
diff changeset
   114
  0:5caa672bac26
2
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
   115
  $ cd ..
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
   116
  $ hg clone local other2
5
9445ce78a935 fix clone
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 3
diff changeset
   117
  requesting all changes
9445ce78a935 fix clone
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 3
diff changeset
   118
  adding changesets
9445ce78a935 fix clone
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 3
diff changeset
   119
  adding manifests
9445ce78a935 fix clone
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 3
diff changeset
   120
  adding file changes
9445ce78a935 fix clone
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 3
diff changeset
   121
  added 2 changesets with 2 changes to 1 files
2
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
   122
  updating to branch default
166694e62daf hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 1
diff changeset
   123
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3
b4932dff9bd8 fix test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 2
diff changeset
   124
  $ hg -R other2 log --template='{rev}:{node|short}\n'
b4932dff9bd8 fix test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 2
diff changeset
   125
  1:710fe444b3b0
b4932dff9bd8 fix test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 2
diff changeset
   126
  0:5caa672bac26
4
bc78b6b29447 http test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 3
diff changeset
   127
bc78b6b29447 http test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 3
diff changeset
   128
test on http
bc78b6b29447 http test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 3
diff changeset
   129
bc78b6b29447 http test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 3
diff changeset
   130
  $ hg -R local serve -p $HGPORT -d --pid-file=local.pid
bc78b6b29447 http test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 3
diff changeset
   131
  $ cat local.pid >> "$DAEMON_PIDS"
7
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   132
  $ hg clone http://localhost:$HGPORT/ fromhttp
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   133
  requesting all changes
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   134
  adding changesets
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   135
  adding manifests
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   136
  adding file changes
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   137
  added 2 changesets with 2 changes to 1 files
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   138
  updating to branch default
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   139
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   140
  $ hg -R fromhttp log --template='{rev}:{node|short}\n'
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   141
  1:710fe444b3b0
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   142
  0:5caa672bac26
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   143
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   144
  $ hg init fromhttp2
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   145
  $ cd fromhttp2
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   146
  $ hg inc http://localhost:$HGPORT/ --template='{rev}:{node|short}\n'
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   147
  comparing with http://localhost:$HGPORT/
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   148
  0:5caa672bac26
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   149
  1:710fe444b3b0
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   150
  $ hg pull http://localhost:$HGPORT/
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   151
  pulling from http://localhost:$HGPORT/
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   152
  requesting all changes
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   153
  adding changesets
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   154
  adding manifests
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   155
  adding file changes
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   156
  added 2 changesets with 2 changes to 1 files
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   157
  (run 'hg update' to get a working copy)
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   158
  $ hg log --template='{rev}:{node|short}\n'
4
bc78b6b29447 http test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 3
diff changeset
   159
  1:710fe444b3b0
bc78b6b29447 http test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 3
diff changeset
   160
  0:5caa672bac26
7
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   161
  $ hg inc http://localhost:$HGPORT/ --template='{rev}:{node|short}\n'
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   162
  comparing with http://localhost:$HGPORT/
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   163
  searching for changes
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   164
  no changes found
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   165
  [1]
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   166
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   167
turn private off again (repo side)
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   168
  $ cd ..
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   169
  $ "$TESTDIR/killdaemons.py"
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   170
  $ sed -i 's/^private=.*$/private=off/' ./local/.hg/hgrc
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   171
  $ hg -R local serve -p $HGPORT -d --pid-file=local.pid
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   172
  $ cat local.pid >> "$DAEMON_PIDS"
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   173
  $ cd fromhttp2
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   174
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   175
  $ hg inc http://localhost:$HGPORT/ --template='{rev}:{node|short}\n'
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   176
  comparing with http://localhost:$HGPORT/
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   177
  searching for changes
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   178
  2:3c8695235a32
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   179
  3:73585b17392a
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   180
  $ hg pull http://localhost:$HGPORT/
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   181
  pulling from http://localhost:$HGPORT/
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   182
  searching for changes
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   183
  adding changesets
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   184
  adding manifests
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   185
  adding file changes
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   186
  added 2 changesets with 2 changes to 2 files
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   187
  (run 'hg update' to get a working copy)
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   188
  $ cd ..
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   189
  $ "$TESTDIR/killdaemons.py"
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   190
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   191
turn private on again (repo side)
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   192
  $ sed -i 's/^private=.*$/private=on/' local/.hg/hgrc
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   193
  $ hg init httpto
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   194
  $ hg -R httpto serve -p $HGPORT -d --pid-file=remote.pid
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   195
  $ cat remote.pid >> "$DAEMON_PIDS"
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   196
  $ cd local
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   197
  $ hg out http://localhost:$HGPORT/  --template='{rev}:{node|short}\n'
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   198
  comparing with http://localhost:$HGPORT/
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   199
  searching for changes
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   200
  0:5caa672bac26
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   201
  1:710fe444b3b0
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   202
  $ hg push http://localhost:$HGPORT/
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   203
  pushing to http://localhost:$HGPORT/
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   204
  searching for changes
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   205
  remote: adding changesets
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   206
  remote: adding manifests
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   207
  remote: adding file changes
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   208
  remote: added 2 changesets with 2 changes to 1 files
cc592295900f Add write protocol support for private.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 6
diff changeset
   209
  $ "$TESTDIR/killdaemons.py"