Patchwork hgk: ignore ctrl-z as EOF on windows

mail settings
Submitter Andrew Shadura
Date March 15, 2014, 6:19 p.m.
Message ID <242d091f03284062f1ca.1394907582@localhost.localdomain>
Download mbox | patch
Permalink /patch/3948/
State Accepted
Commit 0132cbe30c41b29e8762760f5833ffa494e59c0f
Headers show


Andrew Shadura - March 15, 2014, 6:19 p.m.
# HG changeset patch
# User Andrew Shadura <>
# Date 1394894030 -3600
#      Sat Mar 15 15:33:50 2014 +0100
# Node ID 242d091f03284062f1ca4c270e7020f117d79eb5
# Parent  05267e6e94dd36461d9018743540506c65cabcf1
hgk: ignore ctrl-z as EOF on windows

Port a patch from gitk. Original description:

Cygwin's Tcl is configured to honor any occurence of ctrl-z as an
end-of-file marker, while some commits in the git repository and possibly
elsewhere include that character in the commit comment. This causes gitk
ignore commit history following such a comment and incorrect graphs. This
change affects only Windows as Tcl on other platforms already has
eofchar == {}. This fixes problems noted by me and by Ray Lehtiniemi, and
the fix was suggested by Shawn Pierce.

Signed-off-by: Mark Levedahl <>
Signed-off-by: Paul Mackerras <>


diff --git a/contrib/hgk b/contrib/hgk
--- a/contrib/hgk
+++ b/contrib/hgk
@@ -208,7 +208,7 @@  proc getcommits {rargs} {
 	exit 1
     set leftover {}
-    fconfigure $commfd -blocking 0 -translation lf
+    fconfigure $commfd -blocking 0 -translation lf -eofchar {}
     fileevent $commfd readable [list getcommitlines $commfd]
     $canv delete all
     $canv create text 3 3 -anchor nw -text "Reading commits..." \