author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
Mon, 23 May 2011 15:02:16 +0200 | |
changeset 6 | 2ec66dbe2ebe |
parent 5 | 9445ce78a935 |
parent 4 | bc78b6b29447 |
child 7 | cc592295900f |
permissions | -rw-r--r-- |
0
bbeef801409c
minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
1 |
$ cat >> $HGRCPATH <<EOF |
bbeef801409c
minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
2 |
> [extensions] |
bbeef801409c
minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
3 |
> EOF |
bbeef801409c
minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
4 |
$ echo "states=$(echo $(dirname $TESTDIR))/states.py" >> $HGRCPATH |
bbeef801409c
minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
5 |
|
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
|
6 |
$ 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
|
7 |
$ 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
|
8 |
$ 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
|
9 |
$ cd local |
0
bbeef801409c
minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
10 |
$ echo "celestine" > babar |
bbeef801409c
minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
11 |
$ hg add babar |
bbeef801409c
minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
12 |
$ 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
|
13 |
$ 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
|
14 |
$ 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
|
15 |
$ 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
|
16 |
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
|
17 |
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
|
18 |
$ 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
|
19 |
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
|
20 |
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
|
21 |
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
|
22 |
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
|
23 |
$ 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
|
24 |
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
|
25 |
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
|
26 |
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
|
27 |
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
|
28 |
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
|
29 |
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
|
30 |
$ hg setstate 0 1 # until we fix push |
3 | 31 |
$ echo "tree" >> savanna |
2
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
32 |
$ hg add savanna |
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
33 |
$ 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
|
34 |
$ 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
|
35 |
$ 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
|
36 |
$ hg log --template='{rev}:{node|short}: {state}\n' |
3 | 37 |
3:73585b17392a: 0 |
38 |
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
|
39 |
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
|
40 |
0:5caa672bac26: 0 |
0
bbeef801409c
minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
41 |
|
2
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
42 |
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
|
43 |
$ 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
|
44 |
> [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
|
45 |
> 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
|
46 |
> 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
|
47 |
$ hg log --template='{rev}:{node|short}: {state}\n' |
3 | 48 |
3:73585b17392a: 2 |
49 |
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
|
50 |
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
|
51 |
0:5caa672bac26: 0 |
2
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
52 |
|
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
53 |
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
|
54 |
$ 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
|
55 |
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
|
56 |
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
|
57 |
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
|
58 |
[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
|
59 |
$ 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
|
60 |
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
|
61 |
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
|
62 |
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
|
63 |
|
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 |
$ 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
|
65 |
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
|
66 |
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
|
67 |
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
|
68 |
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
|
69 |
$ 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
|
70 |
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
|
71 |
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
|
72 |
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
|
73 |
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
|
74 |
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
|
75 |
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
|
76 |
|
2
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
77 |
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
|
78 |
$ 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
|
79 |
$ hg log --template='{rev}:{node|short}: {state}\n' |
3 | 80 |
3:73585b17392a: 0 |
81 |
2:3c8695235a32: 0 |
|
2
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
82 |
1:710fe444b3b0: 0 |
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
83 |
0:5caa672bac26: 0 |
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
84 |
$ 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
|
85 |
comparing with ../remote1 |
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
86 |
searching for changes |
3 | 87 |
2:3c8695235a32 |
88 |
3:73585b17392a |
|
2
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
89 |
|
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
90 |
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
|
91 |
$ 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
|
92 |
|
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
93 |
test incoming and pull |
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
94 |
|
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
95 |
$ hg init ../other1 |
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
96 |
$ cd ../other1 |
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
97 |
$ 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
|
98 |
comparing with ../local |
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
99 |
0:5caa672bac26 |
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
100 |
1:710fe444b3b0 |
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
101 |
$ hg pull ../local |
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
102 |
pulling from ../local |
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
103 |
requesting all changes |
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
104 |
adding changesets |
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
105 |
adding manifests |
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
106 |
adding file changes |
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
107 |
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
|
108 |
(run 'hg update' to get a working copy) |
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
109 |
$ cd .. |
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
110 |
$ hg clone local other2 |
5 | 111 |
requesting all changes |
112 |
adding changesets |
|
113 |
adding manifests |
|
114 |
adding file changes |
|
115 |
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
|
116 |
updating to branch default |
166694e62daf
hide private changeset to inc and pull.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
1
diff
changeset
|
117 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
3 | 118 |
$ hg -R other2 log --template='{rev}:{node|short}\n' |
119 |
1:710fe444b3b0 |
|
120 |
0:5caa672bac26 |
|
4 | 121 |
|
122 |
test on http |
|
123 |
||
124 |
$ hg -R local serve -p $HGPORT -d --pid-file=local.pid |
|
125 |
$ cat local.pid >> "$DAEMON_PIDS" |
|
126 |
$ hg clone http://localhost:$HGPORT/ other3 |
|
127 |
$ hg -R other2 log --template='{rev}:{node|short}\n' |
|
128 |
1:710fe444b3b0 |
|
129 |
0:5caa672bac26 |
|
130 |
$ kill `cat local.pid` |