Show More
@@ -349,6 +349,11 b' def shortdate(text):' | |||||
349 | """Date. Returns a date like "2006-09-18".""" |
|
349 | """Date. Returns a date like "2006-09-18".""" | |
350 | return util.shortdate(text) |
|
350 | return util.shortdate(text) | |
351 |
|
351 | |||
|
352 | @templatefilter('slashpath') | |||
|
353 | def slashpath(path): | |||
|
354 | """Any text. Replaces the native path separator with slash.""" | |||
|
355 | return util.pconvert(path) | |||
|
356 | ||||
352 | @templatefilter('splitlines') |
|
357 | @templatefilter('splitlines') | |
353 | def splitlines(text): |
|
358 | def splitlines(text): | |
354 | """Any text. Split text into a list of lines.""" |
|
359 | """Any text. Split text into a list of lines.""" |
@@ -151,4 +151,13 b' Issue294: hg remove --after dir fails wh' | |||||
151 | $ hg files . |
|
151 | $ hg files . | |
152 | [1] |
|
152 | [1] | |
153 |
|
153 | |||
|
154 | Convert native path separator to slash (issue5572) | |||
|
155 | ||||
|
156 | $ hg files -T '{path|slashpath}\n' | |||
|
157 | ../b | |||
|
158 | ../dir.h/foo | |||
|
159 | ../t.h | |||
|
160 | ../t/e.h | |||
|
161 | ../t/x | |||
|
162 | ||||
154 | $ cd ../.. |
|
163 | $ cd ../.. |
General Comments 0
You need to be logged in to leave comments.
Login now