Show More
@@ -256,6 +256,16 b' def hgignore(mctx, x):' | |||
|
256 | 256 | ignore = mctx.ctx.repo().dirstate._ignore |
|
257 | 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 | 269 | def grep(mctx, x): |
|
260 | 270 | """``grep(regex)`` |
|
261 | 271 | File contains the given regular expression. |
@@ -416,6 +426,7 b' symbols = {' | |||
|
416 | 426 | 'ignored': ignored, |
|
417 | 427 | 'hgignore': hgignore, |
|
418 | 428 | 'modified': modified, |
|
429 | 'portable': portable, | |
|
419 | 430 | 'removed': removed, |
|
420 | 431 | 'resolved': resolved, |
|
421 | 432 | 'size': size, |
@@ -111,6 +111,28 b' Test files properties' | |||
|
111 | 111 | $ hg add b2link |
|
112 | 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 | 136 | >>> file('1k', 'wb').write(' '*1024) |
|
115 | 137 | >>> file('2k', 'wb').write(' '*2048) |
|
116 | 138 | $ hg add 1k 2k |
@@ -220,6 +242,13 b' Test with a revision' | |||
|
220 | 242 | b2link |
|
221 | 243 | #endif |
|
222 | 244 | |
|
245 | #if no-windows | |
|
246 | $ fileset -r1 'not portable()' | |
|
247 | bar | |
|
248 | baz\ | |
|
249 | con.xml | |
|
250 | #endif | |
|
251 | ||
|
223 | 252 | $ fileset -r4 'subrepo("re:su.*")' |
|
224 | 253 | sub |
|
225 | 254 | $ fileset -r4 'subrepo("sub")' |
@@ -242,7 +271,10 b' Test with a revision' | |||
|
242 | 271 | a1 |
|
243 | 272 | b1 |
|
244 | 273 | b2 |
|
274 | bar | |
|
275 | baz\ | |
|
245 | 276 | c1 |
|
277 | con.xml | |
|
246 | 278 | mixed |
|
247 | 279 | $ fileset 'eol(mac)' |
|
248 | 280 | mac |
General Comments 0
You need to be logged in to leave comments.
Login now