From: "cron2 (Code Review)" Date: Mon, 29 Jan 2024 15:05:29 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="0yvB3wbiZqQ="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: gerrit-send-mail: Make output consistent across systems List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld Cc: plaisthos , openvpn-devel --0yvB3wbiZqQ= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/50= 8?usp=3Demail ) Change subject: gerrit-send-mail: Make output consistent across systems ...................................................................... gerrit-send-mail: Make output consistent across systems When writing the file specify encoding and newline, so that the local settings (like locale) do not change the output. Change-Id: Id7b4bda38adfbb446bdac635ac5d5207ef3f2f40 Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe Message-Id: <20240129145756.769-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28= 153.html Signed-off-by: Gert Doering --- M dev-tools/gerrit-send-mail.py 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-tools/gerrit-send-mail.py b/dev-tools/gerrit-send-mail.py index 5429aef..67a2cf1 100755 --- a/dev-tools/gerrit-send-mail.py +++ b/dev-tools/gerrit-send-mail.py @@ -109,7 +109,7 @@ ) filename =3D f"gerrit-{args.changeid}-{details['revision']}.patch" patch_text_final =3D patch_text_mod.replace("Subject: [PATCH]", f"Subj= ect: [PATCH v{details['revision']}]") - with open(filename, "w") as patch_file: + with open(filename, "w", encoding=3D"utf-8", newline=3D"\n") as patch_= file: patch_file.write(patch_text_final) print("send with:") print(f"git send-email --in-reply-to {details['msg_id']} {filename}") -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/508?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Id7b4bda38adfbb446bdac635ac5d5207ef3f2f40 Gerrit-Change-Number: 508 Gerrit-PatchSet: 2 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-MessageType: merged --0yvB3wbiZqQ= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 submitted this change.

View Change

gerrit-send-mail: Make output consistent acros=
s systems

When writing the file specify encoding and newline, so tha= t
the local settings (like locale) do not change the output.

Chan= ge-Id: Id7b4bda38adfbb446bdac635ac5d5207ef3f2f40
Signed-off-by: Frank Li= chtenheld <frank@...2641...>
Acked-by: Arne Schwabe <arne-openv= pn@...1227...>
Message-Id: <20240129145756.769-1-gert@...1296...&g= t;
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net= /msg28153.html
Signed-off-by: Gert Doering <gert@...1296...>
--= -
M dev-tools/gerrit-send-mail.py
1 file changed, 1 insertion(+), 1 d= eletion(-)

diff --git a/dev-tools/gerrit-send-mail.py b/dev-tools/gerrit-send-mail.=
py
index 5429aef..67a2cf1 100755
--- a/dev-= tools/gerrit-send-mail.py
+++ b/dev-tools/gerrit-send-mail.= py
@@ -109,7 +109,7 @@
)
filename =3D f"gerrit-{args.changeid}-{details['revision&#= 39;]}.patch"
patch_text_final =3D patch_text_mod.= replace("Subject: [PATCH]", f"Subject: [PATCH v{details['= ;revision']}]")
+ with open(filename, "w",= encoding=3D"utf-8", newline=3D"\n") as patch_file:

patch_file.write(patch_text_final)
= print("send with:")
print(f"git send= -email --in-reply-to {details['msg_id']} {filename}")

To view, visit change 508. To unsubscribe, or for he= lp writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id7b4bda38adfbb446bdac635ac5= d5207ef3f2f40
Gerrit-Change-Number: 508
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: merged
--0yvB3wbiZqQ=--