GNU bug report logs - #36090
26.1; Tramp hanging when writing version-controlled file

Previous Next

Package: emacs;

Reported by: Norman Gray <Norman.Gray <at> glasgow.ac.uk>

Date: Tue, 4 Jun 2019 14:23:01 UTC

Severity: normal

Tags: patch

Found in version 26.1

Fixed in version 27.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Norman Gray <Norman.Gray <at> glasgow.ac.uk>
Cc: "36090 <at> debbugs.gnu.org" <36090 <at> debbugs.gnu.org>
Subject: bug#36090: 26.1; Tramp hanging when writing version-controlled file
Date: Mon, 10 Jun 2019 15:09:02 +0200
Norman Gray <Norman.Gray <at> glasgow.ac.uk> writes:

> Michael, hello.

Hi Norman,

> I've narrowed down the problem: it's with 'pager=less' in the remote
> .hgrc.  See details below.
>
> helium:~> cat .hgrc
> [ui]
> username = Norman Gray <norman.gray <at> glasgow.ac.uk>
> [pager]
> pager = less
> helium:~>
>
> Then:
>
>> C-x C-f /scp:helium:checkouts/test/vc.txt
>
> hangs until
>
>> C-g

Well, this is what I've supposed. A pager in the way.

The problem was discussed already in <https://debbugs.gnu.org/18940>.
I've patched vc-hg.el to set HGPLAIN=1, and this works at least
partly. See tramp-notes-debug-4.txt:

> 12:04:29.776000 tramp-send-command (6) # _echo( cd /home/norman/checkouts/test/ && env LANGUAGE\=C HGPLAIN\=1 hg --config alias.status\=status --config defaults.status\= status -A vc.txt </dev/null; echo tramp_exit_status $? )_echo
> 12:04:29.902872 tramp-wait-for-regexp (6) #
> M vc.txt
> tramp_exit_status 0
> ///2df5766235934cbe1e41dec56521114c#$

This "hg status" command works, w/o any problem. But then there is a "hg
log" command, which hangs, because HGPLAIN is not set:

> 12:04:29.937969 tramp-send-command (6) # _echo( cd /usr/home/norman/checkouts/test/ && env LC_MESSAGES\=C hg log -r . -l1 --template \{if\(bookmarks\,sub\(\'\ \'\,\'\,\'\,bookmarks\)\,if\(phabdiff\,phabdiff\,shortest\(node\,6\)\)\)\} </dev/null; echo tramp_exit_status $? )_echo
> 12:04:30.107049 tramp-accept-process-output (10) # *tramp/scp helium* nil run t
> WARNING: terminal is not fully functional
> -  (press RETURN)
> 12:04:35.825130 tramp-file-name-handler (1) # Interrupt received in operation (process-file hg nil t nil log -r . -l1 --template {if(bookmarks,sub(' ',',',bookmarks),if(phabdiff,phabdiff,shortest(node,6)))})

Well, we could try to patch vc-hg.el, again. But there is a more elegant
solution, set HGPLAIN=1 yourself in Tramp. This is even explained in the
Tramp manual, for a good reason :-) See (info "(tramp) Remote processes")

Alternatively, you could try to set in .hgrc

pager = LESS='FRX' less -d

as proposed in <https://mercurial.selenic.com/wiki/PagerExtension> for
Tramp. I haven't tested this, 'tho.

Best regards, Michael.




This bug report was last modified 5 years and 256 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.