##// END OF EJS Templates
files: respect ui.relative-paths...
Martin von Zweigbergk -
r41717:15f63ac1 default
parent child Browse files
Show More
@@ -2164,6 +2164,7 b' def files(ui, ctx, m, fm, fmt, subrepos)'
2164 ret = 1
2164 ret = 1
2165
2165
2166 needsfctx = ui.verbose or {'size', 'flags'} & fm.datahint()
2166 needsfctx = ui.verbose or {'size', 'flags'} & fm.datahint()
2167 uipathfn = scmutil.getuipathfn(ctx.repo(), legacyrelativevalue=True)
2167 for f in ctx.matches(m):
2168 for f in ctx.matches(m):
2168 fm.startitem()
2169 fm.startitem()
2169 fm.context(ctx=ctx)
2170 fm.context(ctx=ctx)
@@ -2171,7 +2172,7 b' def files(ui, ctx, m, fm, fmt, subrepos)'
2171 fc = ctx[f]
2172 fc = ctx[f]
2172 fm.write('size flags', '% 10d % 1s ', fc.size(), fc.flags())
2173 fm.write('size flags', '% 10d % 1s ', fc.size(), fc.flags())
2173 fm.data(path=f)
2174 fm.data(path=f)
2174 fm.plain(fmt % m.rel(f))
2175 fm.plain(fmt % uipathfn(f))
2175 ret = 0
2176 ret = 0
2176
2177
2177 for subpath in sorted(ctx.substate):
2178 for subpath in sorted(ctx.substate):
@@ -123,6 +123,24 b' Issue294: hg remove --after dir fails wh'
123 ../t.h
123 ../t.h
124 ../t/e.h
124 ../t/e.h
125 ../t/x
125 ../t/x
126 $ hg files --config ui.relative-paths=yes
127 ../b
128 ../dir.h/foo
129 ../t.h
130 ../t/e.h
131 ../t/x
132 $ hg files --config ui.relative-paths=no
133 b
134 dir.h/foo
135 t.h
136 t/e.h
137 t/x
138 $ hg files --config ui.relative-paths=legacy
139 ../b
140 ../dir.h/foo
141 ../t.h
142 ../t/e.h
143 ../t/x
126
144
127 $ hg locate b
145 $ hg locate b
128 ../b
146 ../b
General Comments 0
You need to be logged in to leave comments. Login now