##// END OF EJS Templates
tests: ignore missing file with PYTHONDONTWRITEBYTECODE (issue4239)
Matt Mackall -
r21760:a7f5967f stable
parent child Browse files
Show More
@@ -1,238 +1,238 b''
1 1 Init repo1:
2 2
3 3 $ hg init repo1
4 4 $ cd repo1
5 5 $ echo "some text" > a
6 6 $ hg add
7 7 adding a
8 8 $ hg ci -m first
9 9 $ cat .hg/store/fncache | sort
10 10 data/a.i
11 11
12 12 Testing a.i/b:
13 13
14 14 $ mkdir a.i
15 15 $ echo "some other text" > a.i/b
16 16 $ hg add
17 17 adding a.i/b (glob)
18 18 $ hg ci -m second
19 19 $ cat .hg/store/fncache | sort
20 20 data/a.i
21 21 data/a.i.hg/b.i
22 22
23 23 Testing a.i.hg/c:
24 24
25 25 $ mkdir a.i.hg
26 26 $ echo "yet another text" > a.i.hg/c
27 27 $ hg add
28 28 adding a.i.hg/c (glob)
29 29 $ hg ci -m third
30 30 $ cat .hg/store/fncache | sort
31 31 data/a.i
32 32 data/a.i.hg.hg/c.i
33 33 data/a.i.hg/b.i
34 34
35 35 Testing verify:
36 36
37 37 $ hg verify
38 38 checking changesets
39 39 checking manifests
40 40 crosschecking files in changesets and manifests
41 41 checking files
42 42 3 files, 3 changesets, 3 total revisions
43 43
44 44 $ rm .hg/store/fncache
45 45
46 46 $ hg verify
47 47 checking changesets
48 48 checking manifests
49 49 crosschecking files in changesets and manifests
50 50 checking files
51 51 data/a.i@0: missing revlog!
52 52 data/a.i.hg/c.i@2: missing revlog!
53 53 data/a.i/b.i@1: missing revlog!
54 54 3 files, 3 changesets, 3 total revisions
55 55 3 integrity errors encountered!
56 56 (first damaged changeset appears to be 0)
57 57 [1]
58 58 $ cd ..
59 59
60 60 Non store repo:
61 61
62 62 $ hg --config format.usestore=False init foo
63 63 $ cd foo
64 64 $ mkdir tst.d
65 65 $ echo foo > tst.d/foo
66 66 $ hg ci -Amfoo
67 67 adding tst.d/foo
68 68 $ find .hg | sort
69 69 .hg
70 70 .hg/00changelog.i
71 71 .hg/00manifest.i
72 72 .hg/cache
73 73 .hg/cache/branch2-served
74 74 .hg/data
75 75 .hg/data/tst.d.hg
76 76 .hg/data/tst.d.hg/foo.i
77 77 .hg/dirstate
78 78 .hg/last-message.txt
79 79 .hg/phaseroots
80 80 .hg/requires
81 81 .hg/undo
82 82 .hg/undo.bookmarks
83 83 .hg/undo.branch
84 84 .hg/undo.desc
85 85 .hg/undo.dirstate
86 86 .hg/undo.phaseroots
87 87 $ cd ..
88 88
89 89 Non fncache repo:
90 90
91 91 $ hg --config format.usefncache=False init bar
92 92 $ cd bar
93 93 $ mkdir tst.d
94 94 $ echo foo > tst.d/Foo
95 95 $ hg ci -Amfoo
96 96 adding tst.d/Foo
97 97 $ find .hg | sort
98 98 .hg
99 99 .hg/00changelog.i
100 100 .hg/cache
101 101 .hg/cache/branch2-served
102 102 .hg/dirstate
103 103 .hg/last-message.txt
104 104 .hg/requires
105 105 .hg/store
106 106 .hg/store/00changelog.i
107 107 .hg/store/00manifest.i
108 108 .hg/store/data
109 109 .hg/store/data/tst.d.hg
110 110 .hg/store/data/tst.d.hg/_foo.i
111 111 .hg/store/phaseroots
112 112 .hg/store/undo
113 113 .hg/store/undo.phaseroots
114 114 .hg/undo.bookmarks
115 115 .hg/undo.branch
116 116 .hg/undo.desc
117 117 .hg/undo.dirstate
118 118 $ cd ..
119 119
120 120 Encoding of reserved / long paths in the store
121 121
122 122 $ hg init r2
123 123 $ cd r2
124 124 $ cat <<EOF > .hg/hgrc
125 125 > [ui]
126 126 > portablefilenames = ignore
127 127 > EOF
128 128
129 129 $ hg import -q --bypass - <<EOF
130 130 > # HG changeset patch
131 131 > # User test
132 132 > # Date 0 0
133 133 > # Node ID 1c7a2f7cb77be1a0def34e4c7cabc562ad98fbd7
134 134 > # Parent 0000000000000000000000000000000000000000
135 135 > 1
136 136 >
137 137 > diff --git a/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3456789-12345-ABCDEFGHIJKLMNOPRSTUVWXYZ-abcdefghjiklmnopqrstuvwxyz b/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3456789-12345-ABCDEFGHIJKLMNOPRSTUVWXYZ-abcdefghjiklmnopqrstuvwxyz
138 138 > new file mode 100644
139 139 > --- /dev/null
140 140 > +++ b/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3456789-12345-ABCDEFGHIJKLMNOPRSTUVWXYZ-abcdefghjiklmnopqrstuvwxyz
141 141 > @@ -0,0 +1,1 @@
142 142 > +foo
143 143 > diff --git a/AUX/SECOND/X.PRN/FOURTH/FI:FTH/SIXTH/SEVENTH/EIGHTH/NINETH/TENTH/ELEVENTH/LOREMIPSUM.TXT b/AUX/SECOND/X.PRN/FOURTH/FI:FTH/SIXTH/SEVENTH/EIGHTH/NINETH/TENTH/ELEVENTH/LOREMIPSUM.TXT
144 144 > new file mode 100644
145 145 > --- /dev/null
146 146 > +++ b/AUX/SECOND/X.PRN/FOURTH/FI:FTH/SIXTH/SEVENTH/EIGHTH/NINETH/TENTH/ELEVENTH/LOREMIPSUM.TXT
147 147 > @@ -0,0 +1,1 @@
148 148 > +foo
149 149 > diff --git a/Project Planning/Resources/AnotherLongDirectoryName/Followedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt b/Project Planning/Resources/AnotherLongDirectoryName/Followedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt
150 150 > new file mode 100644
151 151 > --- /dev/null
152 152 > +++ b/Project Planning/Resources/AnotherLongDirectoryName/Followedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt
153 153 > @@ -0,0 +1,1 @@
154 154 > +foo
155 155 > diff --git a/bla.aux/prn/PRN/lpt/com3/nul/coma/foo.NUL/normal.c b/bla.aux/prn/PRN/lpt/com3/nul/coma/foo.NUL/normal.c
156 156 > new file mode 100644
157 157 > --- /dev/null
158 158 > +++ b/bla.aux/prn/PRN/lpt/com3/nul/coma/foo.NUL/normal.c
159 159 > @@ -0,0 +1,1 @@
160 160 > +foo
161 161 > diff --git a/enterprise/openesbaddons/contrib-imola/corba-bc/netbeansplugin/wsdlExtension/src/main/java/META-INF/services/org.netbeans.modules.xml.wsdl.bindingsupport.spi.ExtensibilityElementTemplateProvider b/enterprise/openesbaddons/contrib-imola/corba-bc/netbeansplugin/wsdlExtension/src/main/java/META-INF/services/org.netbeans.modules.xml.wsdl.bindingsupport.spi.ExtensibilityElementTemplateProvider
162 162 > new file mode 100644
163 163 > --- /dev/null
164 164 > +++ b/enterprise/openesbaddons/contrib-imola/corba-bc/netbeansplugin/wsdlExtension/src/main/java/META-INF/services/org.netbeans.modules.xml.wsdl.bindingsupport.spi.ExtensibilityElementTemplateProvider
165 165 > @@ -0,0 +1,1 @@
166 166 > +foo
167 167 > EOF
168 168
169 169 $ find .hg/store -name *.i | sort
170 170 .hg/store/00changelog.i
171 171 .hg/store/00manifest.i
172 172 .hg/store/data/bla.aux/pr~6e/_p_r_n/lpt/co~6d3/nu~6c/coma/foo._n_u_l/normal.c.i
173 173 .hg/store/dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxx168e07b38e65eff86ab579afaaa8e30bfbe0f35f.i
174 174 .hg/store/dh/au~78/second/x.prn/fourth/fi~3afth/sixth/seventh/eighth/nineth/tenth/loremia20419e358ddff1bf8751e38288aff1d7c32ec05.i
175 175 .hg/store/dh/enterpri/openesba/contrib-/corba-bc/netbeans/wsdlexte/src/main/java/org.net7018f27961fdf338a598a40c4683429e7ffb9743.i
176 176 .hg/store/dh/project_/resource/anotherl/followed/andanoth/andthenanextremelylongfilename0d8e1f4187c650e2f1fdca9fd90f786bc0976b6b.i
177 177
178 178 $ cd ..
179 179
180 180 Aborting lock does not prevent fncache writes
181 181
182 182 $ cat > exceptionext.py <<EOF
183 183 > import os
184 184 > from mercurial import commands, util
185 185 > from mercurial.extensions import wrapfunction
186 186 >
187 187 > def lockexception(orig, vfs, lockname, wait, releasefn, acquirefn, desc):
188 188 > def releasewrap():
189 189 > raise util.Abort("forced lock failure")
190 190 > return orig(vfs, lockname, wait, releasewrap, acquirefn, desc)
191 191 >
192 192 > def reposetup(ui, repo):
193 193 > wrapfunction(repo, '_lock', lockexception)
194 194 >
195 195 > cmdtable = {}
196 196 >
197 197 > EOF
198 198 $ extpath=`pwd`/exceptionext.py
199 199 $ hg init fncachetxn
200 200 $ cd fncachetxn
201 201 $ printf "[extensions]\nexceptionext=$extpath\n" >> .hg/hgrc
202 202 $ touch y
203 203 $ hg ci -qAm y
204 204 abort: forced lock failure
205 205 [255]
206 206 $ cat .hg/store/fncache
207 207 data/y.i
208 208
209 209 Aborting transaction prevents fncache change
210 210
211 211 $ cat > ../exceptionext.py <<EOF
212 212 > import os
213 213 > from mercurial import commands, util, transaction
214 214 > from mercurial.extensions import wrapfunction
215 215 >
216 216 > def wrapper(orig, self, *args, **kwargs):
217 217 > origonclose = self.onclose
218 218 > def onclose():
219 219 > origonclose()
220 220 > raise util.Abort("forced transaction failure")
221 221 > self.onclose = onclose
222 222 > return orig(self, *args, **kwargs)
223 223 >
224 224 > def uisetup(ui):
225 225 > wrapfunction(transaction.transaction, 'close', wrapper)
226 226 >
227 227 > cmdtable = {}
228 228 >
229 229 > EOF
230 $ rm "${extpath}c"
230 $ rm -f "${extpath}c"
231 231 $ touch z
232 232 $ hg ci -qAm z
233 233 transaction abort!
234 234 rollback completed
235 235 abort: forced transaction failure
236 236 [255]
237 237 $ cat .hg/store/fncache
238 238 data/y.i
General Comments 0
You need to be logged in to leave comments. Login now