From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#36090: 26.1; Tramp hanging when writing version-controlled file Date: Tue, 16 Jul 2019 16:44:03 +0200 Message-ID: <87ftn6qbt8.fsf@gmx.de> References: <6DD5CBFD-B32C-428F-A882-43ECBCC377C3@glasgow.ac.uk> <87zhmwwehm.fsf@gmx.de> <87a7ep8u4x.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="181043"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: "36090@debbugs.gnu.org" <36090@debbugs.gnu.org>, Dmitry Gutov To: Norman Gray Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 16 16:45:17 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hnOhg-000kmN-JC for geb-bug-gnu-emacs@m.gmane.org; Tue, 16 Jul 2019 16:45:17 +0200 Original-Received: from localhost ([::1]:49672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnOha-0006gg-3p for geb-bug-gnu-emacs@m.gmane.org; Tue, 16 Jul 2019 10:45:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47182) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnOhU-0006gK-VT for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2019 10:45:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hnOhT-0002ik-At for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2019 10:45:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42151) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hnOhT-0002gT-03 for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2019 10:45:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hnOhS-0002ki-Sg for bug-gnu-emacs@gnu.org; Tue, 16 Jul 2019 10:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Jul 2019 14:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36090 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 36090-submit@debbugs.gnu.org id=B36090.156328825610493 (code B ref 36090); Tue, 16 Jul 2019 14:45:02 +0000 Original-Received: (at 36090) by debbugs.gnu.org; 16 Jul 2019 14:44:16 +0000 Original-Received: from localhost ([127.0.0.1]:50969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hnOgi-0002jB-FG for submit@debbugs.gnu.org; Tue, 16 Jul 2019 10:44:16 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:55349) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hnOge-0002iu-NY for 36090@debbugs.gnu.org; Tue, 16 Jul 2019 10:44:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1563288246; bh=N2V9edi5LmDs5ECm1IRZPBAtBiLt5wQdRA+zr/djPtA=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=ZMUGoPyMhTaDD+ssJpj1ExqZ93Pjx3/0hvW0klXeDrf398Ci5oINoKOFe+V30Mu/k 96Cc+8D9hFWnwr9yKn1yMX/CswXPLmS7N/mboW1nO97VaLE59h39Uufe2cHvMBhmWW cMSZlceklygKT1lkrJw6eiw/Vt+/JJbNO++4tft4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from detlef.gmx.de ([212.86.58.192]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MRocn-1htd1g3lW5-00Sz45; Tue, 16 Jul 2019 16:44:06 +0200 In-Reply-To: (Norman Gray's message of "Mon, 24 Jun 2019 16:21:14 +0000") X-Provags-ID: V03:K1:xt92MyjLqnRnSohprAUA6q4zuYIEmT/aFi3q34QJB7/Z0ZUWgP9 GvsAxTOsFZ6asv+hfcNT+IzsWbTdp45YByMBOabuNFctjsJzq/lVckoBcOui5gIhCci5s+X ftlH9GYwCHsA7T9ZXvdTbw+mIsVYhPZol3/RIifDJZ5Iz7fZvJ/wJAhsBVha/oi8tAeoT+n iWuAQ1t0OSNV4XoRua8WA== X-UI-Out-Filterresults: notjunk:1;V03:K0:BpmrxAbzQEg=:V7g8pkd2/eKnt/tYTBmDNj NeysYoXrp37oks92c9Fn5l9Z1VaReOMfWXalgKnYGM7ruqq2FPU376gCqDbA93H+MSTvQgoK0 9BUojX2mMQh4NnkCAAykoDpDwmRTtBa9X6SIt1pM1OCrnmh7/oliP4o09fx2VMNAjgPml+Wrn Rqvnn+JPi0nAzX1m7Xm50AlWWEpGjm/CIJlfhy5FAiAn79vaLtgXksTGoYlRN5QA4obZ0M6wM HRc9/8VIIIFM8nM5JPNYD0Sbzwxf2PcQysiRA+0ADD5TbwMW5LPpoXwJ3AOg4w1vJKL3feE/W C+Ewwtj5IH7x6QEUfbdC8CRe2hJ+TYTieM+7ZZlNpqFI5YW0QZ9qyNNzOg+20vYDdl+4HNjoE /+fyrm/e1El8nCkMiTAhmQs3BpBdecnumYSNWJznjCxabQLyAEgHzVNpJE+xKxBY2Kn9XvF+5 PPjgoWHD99VvkoiXaiH7WvMcJElW3j4RzL/XSZUor1ZDRtFw6d43Xkqzv0a4V5an6cNK/WLIu TKDdiSaL/xcl87ivJHw1bqdYY2nVQH8Jn25qR44BfzQEKuLEq4/NMz5CZ4dt2s5Ss25JPLDN8 9rWEPyknNPDUbjwrZFalDWUoBjjmhY8LzuZHHTFxckDA/3p6LVW3JL8mBwXlMQZesGYLFI5YG DxI28s25MG+kmF+4npJx/eYsOnaIZThqea2oyDG9Aju7/GdEmrBc+OkeZ+KbajIcf5Y7FXh5M m4JJzKfiVQGo5Z7cRg2njdbnpISOdg5vZ1vfzHqV8/NsrvzFCV7a/3JGDrL6dQ/6W3K2PkAs X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:163195 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Norman Gray writes: > Michael, hello. Hi Norman, >> The problem was discussed already in . >> I've patched vc-hg.el to set HGPLAIN=3D1, and this works at least >> partly. See tramp-notes-debug-4.txt: > > I've now read the discussion in that bug report. > >> Well, we could try to patch vc-hg.el, again. > > Myself, I think that setting HGPLAIN=3D1 in the hg invocation within > vc-hg.el is by far the most elegant/straightforward/robust solution. > > The hg(1) manpage explicitly documents HGPLAIN as being the preferred > way to disable 'any configuration settings that might change Mercurial's > default output' and notes that '[t]his can be useful when scripting > against Mercurial in the face of existing user configuration.' Also, > `hg help scripting` goes further, and says of HGPLAIN 'It is highly > recommended for machines to set this variable when invoking "hg" > processes.' > > That is, this seems to clearly indicate that, in all non-interactive > invocations of Mercurial, HGPLAIN should be set; indeed, that this is > set could almost be regarded as an integral part of Mercurial's > scripting interface. I suggest that _any_ invocation of 'hg' within > vc-hg.el, local or remote, which does not ensure this is set, should be > reported as a bug! Might this require a lot more than adjusting > vc-hg-command at the end of vc-hg.el? (possibly -- I'm not clear on just > how/where vc-hg.el interacts with Tramp). I'm not familiar with vc-hg.el. The appended patch tries to set HGPLAIN wherever "hg" is called. Could you pls check, whether it works for you as expected? And in case of, Dmitry might decide, whether the patch is applicable to vc-hg.el. > Best wishes, > > Norman Best regards, Michael. --=-=-= Content-Type: text/plain Content-Disposition: attachment Content-Transfer-Encoding: quoted-printable *** /tmp/ediffirtJOm 2019-07-16 16:38:39.833382599 +0200 =2D-- /home/albinus/src/emacs/lisp/vc/vc-hg.el 2019-07-16 16:33:08.6119972= 69 +0200 *************** *** 1359,1364 **** =2D-- 1359,1366 ---- (mapcar (lambda (arg) (list "-r" arg)) marked-list))) (let* ((root (vc-hg-root default-directory)) (buffer (format "*vc-hg : %s*" (expand-file-name root))) + ;; Disable pager. + (process-environment (cons "HGPLAIN=3D1" process-environmen= t)) (hg-program vc-hg-program) args) ;; If necessary, prompt for the exact command. *************** *** 1431,1437 **** "Merge incoming changes into the current working directory. This runs the command \"hg merge\"." (let* ((root (vc-hg-root default-directory)) ! (buffer (format "*vc-hg : %s*" (expand-file-name root)))) (apply 'vc-do-async-command buffer root vc-hg-program '("merge")) (with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'hg= ))) (vc-set-async-update buffer))) =2D-- 1433,1441 ---- "Merge incoming changes into the current working directory. This runs the command \"hg merge\"." (let* ((root (vc-hg-root default-directory)) ! (buffer (format "*vc-hg : %s*" (expand-file-name root))) ! ;; Disable pager. ! (process-environment (cons "HGPLAIN=3D1" process-environment))) (apply 'vc-do-async-command buffer root vc-hg-program '("merge")) (with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'hg= ))) (vc-set-async-update buffer))) *************** *** 1442,1452 **** "A wrapper around `vc-do-command' for use in vc-hg.el. This function differs from vc-do-command in that it invokes `vc-hg-program', and passes `vc-hg-global-switches' to it before FLAGS." ! (apply 'vc-do-command (or buffer "*vc*") okstatus vc-hg-program file-o= r-list ! (if (stringp vc-hg-global-switches) ! (cons vc-hg-global-switches flags) ! (append vc-hg-global-switches ! flags)))) (defun vc-hg-root (file) (vc-find-root file ".hg")) =2D-- 1446,1458 ---- "A wrapper around `vc-do-command' for use in vc-hg.el. This function differs from vc-do-command in that it invokes `vc-hg-program', and passes `vc-hg-global-switches' to it before FLAGS." ! ;; Disable pager. ! (let ((process-environment (cons "HGPLAIN=3D1" process-environment))) ! (apply 'vc-do-command (or buffer "*vc*") okstatus vc-hg-program file= -or-list ! (if (stringp vc-hg-global-switches) ! (cons vc-hg-global-switches flags) ! (append vc-hg-global-switches ! flags))))) (defun vc-hg-root (file) (vc-find-root file ".hg")) --=-=-=--