Show More
@@ -2752,6 +2752,19 def files(ui, ctx, m, uipathfn, fm, fmt, | |||
|
2752 | 2752 | ret = 1 |
|
2753 | 2753 | |
|
2754 | 2754 | needsfctx = ui.verbose or {b'size', b'flags'} & fm.datahint() |
|
2755 | if fm.isplain() and not needsfctx: | |
|
2756 | # Fast path. The speed-up comes from skipping the formatter, and batching | |
|
2757 | # calls to ui.write. | |
|
2758 | buf = [] | |
|
2759 | for f in ctx.matches(m): | |
|
2760 | buf.append(fmt % uipathfn(f)) | |
|
2761 | if len(buf) > 100: | |
|
2762 | ui.write(b''.join(buf)) | |
|
2763 | del buf[:] | |
|
2764 | ret = 0 | |
|
2765 | if buf: | |
|
2766 | ui.write(b''.join(buf)) | |
|
2767 | else: | |
|
2755 | 2768 | for f in ctx.matches(m): |
|
2756 | 2769 | fm.startitem() |
|
2757 | 2770 | fm.context(ctx=ctx) |
General Comments 0
You need to be logged in to leave comments.
Login now