Mercurial > hg-stable
comparison tests/test-fileset.t @ 27459:2f15253e415f
fileset: treat encoding and eol as the predicate calling _existing
Before this patch, predicate function 'encoding' and 'eol' aren't
listed up in '_existingcallers', even though they invoke 'existing()'.
This causes unexpected failure of these predicate, if there is a
(manually) deleted file in the working directory.
8a0513bf030a and 3ce3f2b059a1 seem to overlook putting already
existing 'encoding' or newly introduced 'eol' into '_existingcallers'.
This patch also changes order of fileset "eol(unix)" output in test,
because "existing caller" predicates show "A(dded)" files before
"C(lean)" ones.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Mon, 21 Dec 2015 22:31:16 +0900 |
parents | ceef5fb14872 |
children | c39ecb2b86b3 |
comparison
equal
deleted
inserted
replaced
27458:d39e743e3578 | 27459:2f15253e415f |
---|---|
295 >>> open('dos', 'wb').write("dos\r\n") | 295 >>> open('dos', 'wb').write("dos\r\n") |
296 >>> open('mixed', 'wb').write("dos\r\nunix\n") | 296 >>> open('mixed', 'wb').write("dos\r\nunix\n") |
297 >>> open('mac', 'wb').write("mac\r") | 297 >>> open('mac', 'wb').write("mac\r") |
298 $ hg add dos mixed mac | 298 $ hg add dos mixed mac |
299 | 299 |
300 (remove a1, to examine safety of 'eol' on removed files) | |
301 $ rm a1 | |
302 | |
300 $ fileset 'eol(dos)' | 303 $ fileset 'eol(dos)' |
301 dos | 304 dos |
302 mixed | 305 mixed |
303 $ fileset 'eol(unix)' | 306 $ fileset 'eol(unix)' |
307 mixed | |
304 .hgsub | 308 .hgsub |
305 .hgsubstate | 309 .hgsubstate |
306 a1 | 310 b1 |
307 b1 | 311 b2 |
308 b2 | 312 c1 |
309 c1 | |
310 mixed | |
311 $ fileset 'eol(mac)' | 313 $ fileset 'eol(mac)' |
312 mac | 314 mac |
315 | |
316 Test safety of 'encoding' on removed files | |
317 | |
318 $ fileset 'encoding("ascii")' | |
319 dos | |
320 mac | |
321 mixed | |
322 .hgsub | |
323 .hgsubstate | |
324 1k | |
325 2k | |
326 b1 | |
327 b2 | |
328 b2link | |
329 bin | |
330 c1 |