|
1 $ cat >> $HGRCPATH <<EOF |
|
2 > [extensions] |
|
3 > EOF |
|
4 $ echo "states=$(echo $(dirname $TESTDIR))/states.py" >> $HGRCPATH |
|
5 |
|
6 $ hg init local |
|
7 $ hg init remote1 |
|
8 $ hg init remote2 |
|
9 $ cd local |
|
10 $ echo "celestine" > babar |
|
11 $ hg add babar |
|
12 $ hg ci -m "add babar" |
|
13 $ echo "la veille dame" > babar |
|
14 $ hg ci -m "add dame" |
|
15 $ hg log --template='{rev}:{node|short}: {state}\n' |
|
16 1:710fe444b3b0: 0 |
|
17 0:5caa672bac26: 0 |
|
18 $ hg out ../remote1 --template='{rev}:{node|short}\n' |
|
19 comparing with ../remote1 |
|
20 searching for changes |
|
21 0:5caa672bac26 |
|
22 1:710fe444b3b0 |
|
23 $ hg push ../remote1 |
|
24 pushing to ../remote1 |
|
25 searching for changes |
|
26 adding changesets |
|
27 adding manifests |
|
28 adding file changes |
|
29 added 2 changesets with 2 changes to 1 files |
|
30 $ hg setstate 0 1 # until we fix push |
|
31 $ echo "tree" >> savanna |
|
32 $ hg add savanna |
|
33 $ hg ci -m "terrain" |
|
34 $ echo "flore" >> babar |
|
35 $ hg ci -m "children" |
|
36 $ hg log --template='{rev}:{node|short}: {state}\n' |
|
37 3:73585b17392a: 0 |
|
38 2:3c8695235a32: 0 |
|
39 1:710fe444b3b0: 0 |
|
40 0:5caa672bac26: 0 |
|
41 |
|
42 turn private on (repo side) |
|
43 $ cat > .hg/hgrc << EOF |
|
44 > [states] |
|
45 > private=yes |
|
46 > EOF |
|
47 $ hg log --template='{rev}:{node|short}: {state}\n' |
|
48 3:73585b17392a: 2 |
|
49 2:3c8695235a32: 2 |
|
50 1:710fe444b3b0: 0 |
|
51 0:5caa672bac26: 0 |
|
52 |
|
53 test outgoing and push |
|
54 $ hg out ../remote1 --template='{rev}:{node|short}\n' |
|
55 comparing with ../remote1 |
|
56 searching for changes |
|
57 no changes found |
|
58 [1] |
|
59 $ hg push ../remote1 |
|
60 pushing to ../remote1 |
|
61 searching for changes |
|
62 no changes found |
|
63 |
|
64 $ hg out ../remote2 --template='{rev}:{node|short}\n' |
|
65 comparing with ../remote2 |
|
66 searching for changes |
|
67 0:5caa672bac26 |
|
68 1:710fe444b3b0 |
|
69 $ hg push ../remote2 |
|
70 pushing to ../remote2 |
|
71 searching for changes |
|
72 adding changesets |
|
73 adding manifests |
|
74 adding file changes |
|
75 added 2 changesets with 2 changes to 1 files |
|
76 |
|
77 turn private off again (repo side) |
|
78 $ sed -i 's/^private=.*$/private=no/' .hg/hgrc |
|
79 $ hg log --template='{rev}:{node|short}: {state}\n' |
|
80 3:73585b17392a: 0 |
|
81 2:3c8695235a32: 0 |
|
82 1:710fe444b3b0: 0 |
|
83 0:5caa672bac26: 0 |
|
84 $ hg out ../remote1 --template='{rev}:{node|short}\n' |
|
85 comparing with ../remote1 |
|
86 searching for changes |
|
87 2:3c8695235a32 |
|
88 3:73585b17392a |
|
89 |
|
90 turn private on again (repo side) |
|
91 $ sed -i 's/^private=.*$/private=yes/' .hg/hgrc |
|
92 |
|
93 test incoming and pull |
|
94 |
|
95 $ hg init ../other1 |
|
96 $ cd ../other1 |
|
97 $ hg incoming ../local --template='{rev}:{node|short}\n' |
|
98 comparing with ../local |
|
99 0:5caa672bac26 |
|
100 1:710fe444b3b0 |
|
101 $ hg pull ../local |
|
102 pulling from ../local |
|
103 requesting all changes |
|
104 adding changesets |
|
105 adding manifests |
|
106 adding file changes |
|
107 added 2 changesets with 2 changes to 1 files |
|
108 (run 'hg update' to get a working copy) |
|
109 $ cd .. |
|
110 $ hg clone local other2 |
|
111 updating to branch default |
|
112 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
113 $ hg -R other2 log --template='{rev}:{node|short}\n' |
|
114 1:710fe444b3b0 |
|
115 0:5caa672bac26 |