Show More
@@ -256,6 +256,16 b' def hgignore(mctx, x):' | |||||
256 | ignore = mctx.ctx.repo().dirstate._ignore |
|
256 | ignore = mctx.ctx.repo().dirstate._ignore | |
257 | return [f for f in mctx.subset if ignore(f)] |
|
257 | return [f for f in mctx.subset if ignore(f)] | |
258 |
|
258 | |||
|
259 | def portable(mctx, x): | |||
|
260 | """``portable()`` | |||
|
261 | File that has a portable name. (This doesn't include filenames with case | |||
|
262 | collisions.) | |||
|
263 | """ | |||
|
264 | # i18n: "portable" is a keyword | |||
|
265 | getargs(x, 0, 0, _("portable takes no arguments")) | |||
|
266 | checkwinfilename = util.checkwinfilename | |||
|
267 | return [f for f in mctx.subset if checkwinfilename(f) is None] | |||
|
268 | ||||
259 | def grep(mctx, x): |
|
269 | def grep(mctx, x): | |
260 | """``grep(regex)`` |
|
270 | """``grep(regex)`` | |
261 | File contains the given regular expression. |
|
271 | File contains the given regular expression. | |
@@ -416,6 +426,7 b' symbols = {' | |||||
416 | 'ignored': ignored, |
|
426 | 'ignored': ignored, | |
417 | 'hgignore': hgignore, |
|
427 | 'hgignore': hgignore, | |
418 | 'modified': modified, |
|
428 | 'modified': modified, | |
|
429 | 'portable': portable, | |||
419 | 'removed': removed, |
|
430 | 'removed': removed, | |
420 | 'resolved': resolved, |
|
431 | 'resolved': resolved, | |
421 | 'size': size, |
|
432 | 'size': size, |
@@ -111,6 +111,28 b' Test files properties' | |||||
111 | $ hg add b2link |
|
111 | $ hg add b2link | |
112 | #endif |
|
112 | #endif | |
113 |
|
113 | |||
|
114 | #if no-windows | |||
|
115 | $ echo foo > con.xml | |||
|
116 | $ echo bar > 'bar ' | |||
|
117 | $ echo baz > 'baz\' | |||
|
118 | $ ls | |||
|
119 | b1 | |||
|
120 | b2 | |||
|
121 | b2link | |||
|
122 | bar | |||
|
123 | baz\ | |||
|
124 | bin | |||
|
125 | c1 | |||
|
126 | c2 | |||
|
127 | c3 | |||
|
128 | con.xml | |||
|
129 | $ fileset 'not portable()' | |||
|
130 | bar | |||
|
131 | baz\ | |||
|
132 | con.xml | |||
|
133 | $ hg --config ui.portablefilenames=ignore add con.xml 'bar ' 'baz\' | |||
|
134 | #endif | |||
|
135 | ||||
114 | >>> file('1k', 'wb').write(' '*1024) |
|
136 | >>> file('1k', 'wb').write(' '*1024) | |
115 | >>> file('2k', 'wb').write(' '*2048) |
|
137 | >>> file('2k', 'wb').write(' '*2048) | |
116 | $ hg add 1k 2k |
|
138 | $ hg add 1k 2k | |
@@ -220,6 +242,13 b' Test with a revision' | |||||
220 | b2link |
|
242 | b2link | |
221 | #endif |
|
243 | #endif | |
222 |
|
244 | |||
|
245 | #if no-windows | |||
|
246 | $ fileset -r1 'not portable()' | |||
|
247 | bar | |||
|
248 | baz\ | |||
|
249 | con.xml | |||
|
250 | #endif | |||
|
251 | ||||
223 | $ fileset -r4 'subrepo("re:su.*")' |
|
252 | $ fileset -r4 'subrepo("re:su.*")' | |
224 | sub |
|
253 | sub | |
225 | $ fileset -r4 'subrepo("sub")' |
|
254 | $ fileset -r4 'subrepo("sub")' | |
@@ -242,7 +271,10 b' Test with a revision' | |||||
242 | a1 |
|
271 | a1 | |
243 | b1 |
|
272 | b1 | |
244 | b2 |
|
273 | b2 | |
|
274 | bar | |||
|
275 | baz\ | |||
245 | c1 |
|
276 | c1 | |
|
277 | con.xml | |||
246 | mixed |
|
278 | mixed | |
247 | $ fileset 'eol(mac)' |
|
279 | $ fileset 'eol(mac)' | |
248 | mac |
|
280 | mac |
General Comments 0
You need to be logged in to leave comments.
Login now