##// END OF EJS Templates
templatefilters: add slashpath() to convert path separator to slash...
Yuya Nishihara -
r35460:dad8a507 default
parent child Browse files
Show More
@@ -349,6 +349,11 b' def shortdate(text):'
349 349 """Date. Returns a date like "2006-09-18"."""
350 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 357 @templatefilter('splitlines')
353 358 def splitlines(text):
354 359 """Any text. Split text into a list of lines."""
@@ -151,4 +151,13 b' Issue294: hg remove --after dir fails wh'
151 151 $ hg files .
152 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 163 $ cd ../..
General Comments 0
You need to be logged in to leave comments. Login now