unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* vc-annotate not displaying all lines
@ 2004-12-09  9:58 Steinar Bang
  2004-12-10  3:35 ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Steinar Bang @ 2004-12-09  9:58 UTC (permalink / raw)


Platform: Intel pentium M, debian sarge (testing/unstable)
	  emacs21 21.3+1-8, cvs 1.12.9-6

When I do `C-x v g' on a CVS-versioned file in my debian GNU Emacs 21,
the output is missing some lines from the file.  I haven't found any
pattern in what version the missing lines belong to.

When I do "cvs annotate" on the command line, all lines in the file
are in the the output.  When I do the `C-x v g' command in GNU Emacs
21 on Win32, all lines in the file are in the output.

Does anyone know what causes this difference, and what I can try, to
get all lines in the file on linux?

Thanx!


- Steinar

PS
The GNU Emacs version on Win32, is, according to `M-x emacs-version RET':
	GNU Emacs 21.3.1 (i386-mingw-nt5.1.2600) of 2004-03-10 on NYAUMO

The CVS version on Win32, is, according to 'cvs -v':
	Concurrent Versions System (CVS) 1.12.7 (client)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: vc-annotate not displaying all lines
  2004-12-09  9:58 vc-annotate not displaying all lines Steinar Bang
@ 2004-12-10  3:35 ` Stefan Monnier
  2004-12-10  7:36   ` Steinar Bang
  2004-12-10 10:57   ` Steinar Bang
  0 siblings, 2 replies; 6+ messages in thread
From: Stefan Monnier @ 2004-12-10  3:35 UTC (permalink / raw)


> When I do `C-x v g' on a CVS-versioned file in my debian GNU Emacs 21,
> the output is missing some lines from the file.  I haven't found any
> pattern in what version the missing lines belong to.

It's a bad interaction between libc, OpenSSH, and CVS.
Please send a bug report about it to OpenSSH.

In the meantime, you can work around the bug by setting CVS_RSH to point to
the following script:

   % cat $CVS_RSH
   #!/bin/sh
   (ssh "$@" 2>&1 1>&3 | cat) 3>&1 1>&2
   % 

Include this script in your bug-report so they know to which problem it
is referring to.  We need to send enough bug-report to convince them to
fix it (it is not exactly a bug, but it makes it difficult for other
programs like Unison, rsync, cvs, to work reliably when the use ssh).


        Stefan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: vc-annotate not displaying all lines
  2004-12-10  3:35 ` Stefan Monnier
@ 2004-12-10  7:36   ` Steinar Bang
  2004-12-10 21:07     ` Stefan Monnier
  2004-12-10 10:57   ` Steinar Bang
  1 sibling, 1 reply; 6+ messages in thread
From: Steinar Bang @ 2004-12-10  7:36 UTC (permalink / raw)


>>>>> Stefan Monnier <monnier@iro.umontreal.ca>:

> It's a bad interaction between libc, OpenSSH, and CVS.

Ah.  Forgot to mention that I was using CVS over SSH.  Glad you
figured it out anyway.

[snip!]
> In the meantime, you can work around the bug by setting CVS_RSH to point to
> the following script:

The script worked fine.  Now I can do `C-x v g' and see all lines.
Thanx! 

[snip!]
>    (ssh "$@" 2>&1 1>&3 | cat) 3>&1 1>&2

I'm trying to figure out what it does.  Lesse... ssh is run in a
subshell.  Then stdout is gated to a different file descriptor, and
stderr is gated to the file descriptor used by stdout.

Then the stderr stuff is sent through a pipe and into cat.  Outside
the subshell stdout and stderr are routed back to their standard file
descriptors.

I guess the effect is to delay stderr a bit, wrt. to stdout...?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: vc-annotate not displaying all lines
  2004-12-10  3:35 ` Stefan Monnier
  2004-12-10  7:36   ` Steinar Bang
@ 2004-12-10 10:57   ` Steinar Bang
  2004-12-10 21:08     ` Stefan Monnier
  1 sibling, 1 reply; 6+ messages in thread
From: Steinar Bang @ 2004-12-10 10:57 UTC (permalink / raw)


>>>>> Stefan Monnier <monnier@iro.umontreal.ca>:

> It's a bad interaction between libc, OpenSSH, and CVS.
> Please send a bug report about it to OpenSSH.
[snip!]
> Include this script in your bug-report so they know to which problem
> it is referring to.  We need to send enough bug-report to convince
> them to fix it (it is not exactly a bug, but it makes it difficult
> for other programs like Unison, rsync, cvs, to work reliably when
> the use ssh).

Here's my bug report:
	http://bugzilla.mindrot.org/show_bug.cgi?id=961

There has already been two followups to it.  According to the first
followup, there is a workaround to this problem in CVS 1.11.18 and
1.12.10.  Of course that doesn't help other utils like eg. rsync.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: vc-annotate not displaying all lines
  2004-12-10  7:36   ` Steinar Bang
@ 2004-12-10 21:07     ` Stefan Monnier
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2004-12-10 21:07 UTC (permalink / raw)


>> (ssh "$@" 2>&1 1>&3 | cat) 3>&1 1>&2

> I'm trying to figure out what it does.  Lesse... ssh is run in a
> subshell.  Then stdout is gated to a different file descriptor, and
> stderr is gated to the file descriptor used by stdout.

> Then the stderr stuff is sent through a pipe and into cat.  Outside
> the subshell stdout and stderr are routed back to their standard file
> descriptors.

> I guess the effect is to delay stderr a bit, wrt. to stdout...?

No, the effect is to separate the stderr of ssh from the stderr of cvs, and
then link them via `cat' to "hide" the difference.

SSH puts his stderr in non-blocking mode whereas CVS doesn't work reliably
if his stderr is non-blocking (and even worse if his stdout is non-blocking
which would happen if the programm running CVS (e.g. Emacs) redirects stdout
and stderr of CVS to the same file descriptor).


        Stefan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: vc-annotate not displaying all lines
  2004-12-10 10:57   ` Steinar Bang
@ 2004-12-10 21:08     ` Stefan Monnier
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2004-12-10 21:08 UTC (permalink / raw)


> Here's my bug report:
> 	http://bugzilla.mindrot.org/show_bug.cgi?id=961

> There has already been two followups to it.  According to the first
> followup, there is a workaround to this problem in CVS 1.11.18 and
> 1.12.10.  Of course that doesn't help other utils like eg. rsync.

Thank you very much,


        Stefan "who had heard discussions about introducing a workaround in
                CVS but didn't know it had been done."

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-12-10 21:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-09  9:58 vc-annotate not displaying all lines Steinar Bang
2004-12-10  3:35 ` Stefan Monnier
2004-12-10  7:36   ` Steinar Bang
2004-12-10 21:07     ` Stefan Monnier
2004-12-10 10:57   ` Steinar Bang
2004-12-10 21:08     ` Stefan Monnier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).