[PATCH] hg: copy buffer state to remote ui
Elmar Bartel
elb_hg at leo.org
Wed Jun 10 22:14:47 UTC 2020
# HG changeset patch
# User Elmar Bartel <elb_hg at leo.org>
# Date 1591826940 -7200
# Thu Jun 11 00:09:00 2020 +0200
# Node ID 563268fce8e7502e17812fea7b90325a37c854f4
# Parent 83e41b73d115e3717943c2e5a83d36d05670384c
hg: copy buffer state to remote ui
When remoteui() creates a new ui, the buffer state of the
source ui should also be copied to the newly created ui.
Otherwise, when pushbuffer() was called on the source ui,
this "push" gets lost for the remote ui and output from the
remote side will go to default stdout but not to the pushed
buffer as is expected by the caller of pushbuffer().
diff -r 83e41b73d115 -r 563268fce8e7 mercurial/hg.py
--- a/mercurial/hg.py Tue Jun 09 17:13:26 2020 -0400
+++ b/mercurial/hg.py Thu Jun 11 00:09:00 2020 +0200
@@ -1362,6 +1362,12 @@ def remoteui(src, opts):
if v:
dst.setconfig(b'web', b'cacerts', util.expandpath(v), b'copied')
+ # copy buffer state to the remote ui
+ if src._buffers:
+ dst._buffers = src._buffers
+ dst._bufferstates = src._bufferstates
+ dst._bufferapplylabels = src._bufferstates[-1][2]
+
return dst
More information about the Mercurial-devel
mailing list