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