bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#36090: 26.1; Tramp hanging when writing version-controlled file


From: Michael Albinus
Subject: bug#36090: 26.1; Tramp hanging when writing version-controlled file
Date: Mon, 10 Jun 2019 15:09:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Norman Gray <Norman.Gray@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@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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]