##// END OF EJS Templates
test: fix the flakyness in test-remotefilelog-local.t...
marmoute -
r50968:983e2db1 stable
parent child Browse files
Show More
@@ -1,210 +1,218 b''
1 #require no-windows
1 #require no-windows
2
2
3 $ . "$TESTDIR/remotefilelog-library.sh"
3 $ . "$TESTDIR/remotefilelog-library.sh"
4
4
5 $ hg init master
5 $ hg init master
6 $ cd master
6 $ cd master
7 $ cat >> .hg/hgrc <<EOF
7 $ cat >> .hg/hgrc <<EOF
8 > [remotefilelog]
8 > [remotefilelog]
9 > server=True
9 > server=True
10 > EOF
10 > EOF
11 $ echo x > x
11 $ echo x > x
12 $ echo y > y
12 $ echo y > y
13 $ echo z > z
13 $ echo z > z
14 $ hg commit -qAm xy
14 $ hg commit -qAm xy
15
15
16 $ cd ..
16 $ cd ..
17
17
18 $ hgcloneshallow ssh://user@dummy/master shallow -q
18 $ hgcloneshallow ssh://user@dummy/master shallow -q
19 3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob)
19 3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob)
20 $ cd shallow
20 $ cd shallow
21
21
22 # status
22 # status
23
23
24 $ clearcache
24 $ clearcache
25 $ echo xx > x
25 $ echo xx > x
26 $ echo yy > y
26 $ echo yy > y
27 $ touch a
27 $ touch a
28 $ hg status
28 $ hg status
29 M x
29 M x
30 M y
30 M y
31 ? a
31 ? a
32 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob)
32 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob)
33 $ hg add a
33 $ hg add a
34 $ hg status
34 $ hg status
35 M x
35 M x
36 M y
36 M y
37 A a
37 A a
38
38
39 # diff
39 # diff
40
40
41 $ hg debugrebuilddirstate # fixes dirstate non-determinism
41 $ hg debugrebuilddirstate # fixes dirstate non-determinism
42 $ hg add a
42 $ hg add a
43 $ clearcache
43 $ clearcache
44 $ hg diff
44 $ hg diff
45 diff -r f3d0bb0d1e48 x
45 diff -r f3d0bb0d1e48 x
46 --- a/x* (glob)
46 --- a/x* (glob)
47 +++ b/x* (glob)
47 +++ b/x* (glob)
48 @@ -1,1 +1,1 @@
48 @@ -1,1 +1,1 @@
49 -x
49 -x
50 +xx
50 +xx
51 diff -r f3d0bb0d1e48 y
51 diff -r f3d0bb0d1e48 y
52 --- a/y* (glob)
52 --- a/y* (glob)
53 +++ b/y* (glob)
53 +++ b/y* (glob)
54 @@ -1,1 +1,1 @@
54 @@ -1,1 +1,1 @@
55 -y
55 -y
56 +yy
56 +yy
57 3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob)
57 3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob)
58
58
59 # local commit
59 # local commit
60
60
61 $ clearcache
61 $ clearcache
62 $ echo a > a
62 $ echo a > a
63 $ echo xxx > x
63 $ echo xxx > x
64 $ echo yyy > y
64 $ echo yyy > y
65 $ hg commit -m a
65 $ hg commit -m a
66 ? files fetched over 1 fetches - (? misses, 0.00% hit ratio) over *s (glob)
66 ? files fetched over 1 fetches - (? misses, 0.00% hit ratio) over *s (glob)
67
67
68 # local commit where the dirstate is clean -- ensure that we do just one fetch
68 # local commit where the dirstate is clean -- ensure that we do just one fetch
69 # (update to a commit on the server first)
69 # (update to a commit on the server first)
70
70
71 $ hg --config debug.dirstate.delaywrite=1 up 0
71 $ hg --config debug.dirstate.delaywrite=1 up 0
72 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
72 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
73 $ clearcache
73 $ clearcache
74 $ hg debugdirstate
74 $ hg debugdirstate
75 n 644 2 * x (glob)
75 n 644 2 * x (glob)
76 n 644 2 * y (glob)
76 n 644 2 * y (glob)
77 n 644 2 * z (glob)
77 n 644 2 * z (glob)
78 $ echo xxxx > x
78 $ echo xxxx > x
79 $ echo yyyy > y
79 $ echo yyyy > y
80 # run status early to avoid a flaky second fetch during commit.
81 $ hg st
82 M x
83 M y
84 \d+ files fetched over \d+ fetches .* (re) (?)
80 $ hg commit -m x
85 $ hg commit -m x
81 created new head
86 created new head
82 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob)
87 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob)
83
88
84 # restore state for future tests
89 # restore state for future tests
85
90
86 $ hg -q strip .
91 $ hg -q strip .
87 $ hg -q up tip
92 $ hg -q up tip
88
93
89 # rebase
94 # rebase
90
95
91 $ clearcache
96 $ clearcache
92 $ cd ../master
97 $ cd ../master
93 $ echo w > w
98 $ echo w > w
94 $ hg commit -qAm w
99 $ hg commit -qAm w
95
100
96 $ cd ../shallow
101 $ cd ../shallow
97 $ hg pull
102 $ hg pull
98 pulling from ssh://user@dummy/master
103 pulling from ssh://user@dummy/master
99 searching for changes
104 searching for changes
100 adding changesets
105 adding changesets
101 adding manifests
106 adding manifests
102 adding file changes
107 adding file changes
103 added 1 changesets with 0 changes to 0 files (+1 heads)
108 added 1 changesets with 0 changes to 0 files (+1 heads)
104 new changesets fed61014d323
109 new changesets fed61014d323
105 (run 'hg heads' to see heads, 'hg merge' to merge)
110 (run 'hg heads' to see heads, 'hg merge' to merge)
106
111
112 # run status early to avoid a flaky second fetch during commit
113 $ hg status
114 \d+ files fetched over \d+ fetches .* (re) (?)
107 $ hg rebase -d tip
115 $ hg rebase -d tip
108 rebasing 1:9abfe7bca547 "a"
116 rebasing 1:9abfe7bca547 "a"
109 saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/9abfe7bca547-8b11e5ff-rebase.hg (glob)
117 saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/9abfe7bca547-8b11e5ff-rebase.hg (glob)
110 3 files fetched over 2 fetches - (3 misses, 0.00% hit ratio) over *s (glob)
118 3 files fetched over 2 fetches - (3 misses, 0.00% hit ratio) over *s (glob)
111
119
112 # strip
120 # strip
113
121
114 $ clearcache
122 $ clearcache
115 $ hg debugrebuilddirstate # fixes dirstate non-determinism
123 $ hg debugrebuilddirstate # fixes dirstate non-determinism
116 $ hg strip -r .
124 $ hg strip -r .
117 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
125 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
118 saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/19edf50f4de7-df3d0f74-backup.hg (glob)
126 saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/19edf50f4de7-df3d0f74-backup.hg (glob)
119 3 files fetched over 2 fetches - (3 misses, 0.00% hit ratio) over *s (glob)
127 3 files fetched over 2 fetches - (3 misses, 0.00% hit ratio) over *s (glob)
120
128
121 # unbundle
129 # unbundle
122
130
123 $ clearcache
131 $ clearcache
124 $ ls -A
132 $ ls -A
125 .hg
133 .hg
126 w
134 w
127 x
135 x
128 y
136 y
129 z
137 z
130
138
131 $ hg debugrebuilddirstate # fixes dirstate non-determinism
139 $ hg debugrebuilddirstate # fixes dirstate non-determinism
132 $ hg unbundle .hg/strip-backup/19edf50f4de7-df3d0f74-backup.hg
140 $ hg unbundle .hg/strip-backup/19edf50f4de7-df3d0f74-backup.hg
133 adding changesets
141 adding changesets
134 adding manifests
142 adding manifests
135 adding file changes
143 adding file changes
136 added 1 changesets with 3 changes to 3 files
144 added 1 changesets with 3 changes to 3 files
137 new changesets 19edf50f4de7 (1 drafts)
145 new changesets 19edf50f4de7 (1 drafts)
138 (run 'hg update' to get a working copy)
146 (run 'hg update' to get a working copy)
139 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob)
147 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob)
140
148
141 $ hg up
149 $ hg up
142 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
150 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
143 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob)
151 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob)
144 $ cat a
152 $ cat a
145 a
153 a
146
154
147 # revert
155 # revert
148
156
149 $ clearcache
157 $ clearcache
150 $ hg revert -r .~2 y z
158 $ hg revert -r .~2 y z
151 no changes needed to z
159 no changes needed to z
152 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob)
160 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob)
153 $ hg checkout -C -r . -q
161 $ hg checkout -C -r . -q
154
162
155 # explicit bundle should produce full bundle file
163 # explicit bundle should produce full bundle file
156
164
157 $ hg bundle -r 2 --base 1 ../local.bundle
165 $ hg bundle -r 2 --base 1 ../local.bundle
158 1 changesets found
166 1 changesets found
159 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob)
167 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob)
160 $ cd ..
168 $ cd ..
161
169
162 $ hgcloneshallow ssh://user@dummy/master shallow2 -q
170 $ hgcloneshallow ssh://user@dummy/master shallow2 -q
163 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob)
171 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob)
164 $ cd shallow2
172 $ cd shallow2
165 $ hg unbundle ../local.bundle
173 $ hg unbundle ../local.bundle
166 adding changesets
174 adding changesets
167 adding manifests
175 adding manifests
168 adding file changes
176 adding file changes
169 added 1 changesets with 3 changes to 3 files
177 added 1 changesets with 3 changes to 3 files
170 new changesets 19edf50f4de7 (1 drafts)
178 new changesets 19edf50f4de7 (1 drafts)
171 (run 'hg update' to get a working copy)
179 (run 'hg update' to get a working copy)
172
180
173 $ hg log -r 2 --stat
181 $ hg log -r 2 --stat
174 changeset: 2:19edf50f4de7
182 changeset: 2:19edf50f4de7
175 tag: tip
183 tag: tip
176 user: test
184 user: test
177 date: Thu Jan 01 00:00:00 1970 +0000
185 date: Thu Jan 01 00:00:00 1970 +0000
178 summary: a
186 summary: a
179
187
180 a | 1 +
188 a | 1 +
181 x | 2 +-
189 x | 2 +-
182 y | 2 +-
190 y | 2 +-
183 3 files changed, 3 insertions(+), 2 deletions(-)
191 3 files changed, 3 insertions(+), 2 deletions(-)
184
192
185 # Merge
193 # Merge
186
194
187 $ echo merge >> w
195 $ echo merge >> w
188 $ hg commit -m w
196 $ hg commit -m w
189 created new head
197 created new head
190 $ hg merge 2
198 $ hg merge 2
191 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
199 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
192 (branch merge, don't forget to commit)
200 (branch merge, don't forget to commit)
193 $ hg commit -m merge
201 $ hg commit -m merge
194 $ hg strip -q -r ".^"
202 $ hg strip -q -r ".^"
195
203
196 # commit without producing new node
204 # commit without producing new node
197
205
198 $ cd $TESTTMP
206 $ cd $TESTTMP
199 $ hgcloneshallow ssh://user@dummy/master shallow3 -q
207 $ hgcloneshallow ssh://user@dummy/master shallow3 -q
200 $ cd shallow3
208 $ cd shallow3
201 $ echo 1 > A
209 $ echo 1 > A
202 $ hg commit -m foo -A A
210 $ hg commit -m foo -A A
203 $ hg log -r . -T '{node}\n'
211 $ hg log -r . -T '{node}\n'
204 383ce605500277f879b7460a16ba620eb6930b7f
212 383ce605500277f879b7460a16ba620eb6930b7f
205 $ hg update -r '.^' -q
213 $ hg update -r '.^' -q
206 $ echo 1 > A
214 $ echo 1 > A
207 $ hg commit -m foo -A A
215 $ hg commit -m foo -A A
208 warning: commit already existed in the repository!
216 warning: commit already existed in the repository!
209 $ hg log -r . -T '{node}\n'
217 $ hg log -r . -T '{node}\n'
210 383ce605500277f879b7460a16ba620eb6930b7f
218 383ce605500277f879b7460a16ba620eb6930b7f
General Comments 0
You need to be logged in to leave comments. Login now