all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* pcl-cvs help
@ 2003-01-23 19:18 Jim Hourihan
  2003-01-23 23:01 ` Stefan Monnier <foo@acm.com>
  0 siblings, 1 reply; 12+ messages in thread
From: Jim Hourihan @ 2003-01-23 19:18 UTC (permalink / raw)



I'm having all sorts of problems getting pcl-cvs to correctly parse CVS
output. Generally, it works, but often it will have parse errors when doing
cvs-status. VC directory works fine on the same directory. 

In addition, I can't seem to figure out which version of pcl-cvs comes with
emacs 21. There isn't a function or variable that I can find or even a
comment in the source code that assigns a version to the package.

I've downloaded Stefan Monnier's 2.9.9 version and that's better, but it
still has problems. Is there a developement version out there that's
better? Here's what I using:

   GNU Emacs 21.2.1 (powerpc-apple-darwin, X toolkit)
   cvs version 1.10

Thanks.

    -Jim

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

* Re: pcl-cvs help
  2003-01-23 19:18 pcl-cvs help Jim Hourihan
@ 2003-01-23 23:01 ` Stefan Monnier <foo@acm.com>
       [not found]   ` <200301232349.h0NNnWo09694@rum.cs.yale.edu>
  0 siblings, 1 reply; 12+ messages in thread
From: Stefan Monnier <foo@acm.com> @ 2003-01-23 23:01 UTC (permalink / raw)


>>>>> "Jim" == Jim Hourihan <jimhourihan@earthlink.net> writes:
> I'm having all sorts of problems getting pcl-cvs to correctly parse CVS
> output. Generally, it works, but often it will have parse errors when doing
> cvs-status. VC directory works fine on the same directory. 

Can you edit the file .../lisp/pcvs.el and change the line

               (process-connection-type nil) ; Use a pipe, not a pty.
into
               ;; If process-connection-type is nil and the repository
               ;; is accessed via SSH, a bad interaction between libc,
               ;; CVS and SSH can lead to garbled output.
               ;; It might be a glibc-specific problem.
               ;; Until the problem is cleared, we'll use a pty rather than
               ;; a pipe.
               ;; (process-connection-type nil) ; Use a pipe, not a pty.

and then byte-compile the file and finally see if it helps ?
This applies to both the Emacs-21 code and the 2.9.9 version as well.

> In addition, I can't seem to figure out which version of pcl-cvs comes with
> emacs 21.  There isn't a function or variable that I can find or even a
> comment in the source code that assigns a version to the package.

PCL-CVS' home is now Emacs.  I.e. you now have PCL-CVS version 21.2 ;-)
It's more recent than 2.9.9 and, as a matter of fact, it's the latest
released version.  The very latest version is the one in the CVS trunk
of Emacs (and it has the workaround shown above).

> I've downloaded Stefan Monnier's 2.9.9 version and that's better, but it
> still has problems. Is there a developement version out there that's
> better? Here's what I using:

As mentioned, the development version can be gotten from
http://savannah.gnu.org/projects/emacs

>    GNU Emacs 21.2.1 (powerpc-apple-darwin, X toolkit)
>    cvs version 1.10

I've never heard of the problem you're talking about on your platform, so
maybe your problem is a different one (the fix suggested above has only been
needed until for systems using GNU libc).  Are you accessing the repository
via SSH ?  If the fix above solves your problem, please tell me so I will
know that the problem is not specific to glibc contrary to my
current impression.


        Stefan

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

* Re: pcl-cvs help
       [not found]     ` <200301240123.h0O1NK022670@champion.sslsecure.com>
@ 2003-01-27 17:39       ` Stefan Monnier
  2003-01-27 19:16         ` Jim Hourihan
  0 siblings, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2003-01-27 17:39 UTC (permalink / raw)
  Cc: emacs-devel

> > Please double and triple check.  For example, open up a *cvs* buffer (to
> > make sure that PCL-CVS gets loaded), then do C-x C-f .../pcvs.el RET and
> > the M-x eval-region RET and then try M-x cvs-status (aka M-u) a few times
> > to see if the problem is still present.  It's very easy to end up loading
> > a stray unmodified file: even long-time Emacs maintainers routinely do it
> > even after "double checking".
> 
> Ok, I double checked and was able to actually pick up the change; I'm not
> sure what happened before. Anyway, on Linux, the problem is gone. On OS X,
> the problem is much less noticable, but still there. 

So there's something else at play.  Could any Max OS X guy lok at this ?

> I'm guessing that the problem is now related to a problem that also shows
> up in eshell on OS X: the output of a process is sometimes cut short.

So it might be a bug in Emacs' handling of async processes ?

> Once again its only happening on OS X now and the problem "looks different"
> than it did before.
> 
> > The problem that the patch above is trying to fix is not specific to
> > Emacs at all, but to a combination of "CVS + SSH + some libc + stdout and
> > stderr outputting to a pipe".  It's a pretty "obscure" interaction
> > and the jury is still out about who is to blame.
> >
> > I can easily reproduce it outside of Emacs on my Linux box as follows:
> >
> > 	src/m-0% cvs status -v 2>&1 | wc  
> > 	   4724   13182  187152
> > 	src/m-0% cvs status -v 2>&1 | (sleep 10; wc)
> > 	    151     417    5828
> > 	src/m-0% 
> 
> It happens on OS X too:
> 
>     bash-2.05a$ cvs status -v 2>&1 | wc
>          618    1340   17113 
>     bash-2.05a$ cvs status -v 2>&1 | (sleep 10; wc)
>          319     693    8853 
>     bash-2.05a$ 
> 
> and on my Linux box:
> 
>     bash-2.05$ cvs status -v 2>&1 | wc
> 	626    1360   17307
>     bash-2.05$ cvs status -v 2>&1 | (sleep 10; wc)
> 	 34      74     818
>     bash-2.05$ 

Thank you for testing it.  I suggested you report the above problem
to the Mac OS X people (with a CC to the CVS people and the SSH people.
BTW, which SSH do you use ?).

> <#part type="application/octet-stream" filename="~/x" disposition=attachment description="cvs-tmp buffer">

Looks like something didn't work ;-)


	Stefan

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

* Re: pcl-cvs help
  2003-01-27 17:39       ` Stefan Monnier
@ 2003-01-27 19:16         ` Jim Hourihan
  2003-01-27 23:43           ` David Caldwell
  0 siblings, 1 reply; 12+ messages in thread
From: Jim Hourihan @ 2003-01-27 19:16 UTC (permalink / raw)
  Cc: emacs-devel

"Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes:

> Thank you for testing it.  I suggested you report the above problem
> to the Mac OS X people (with a CC to the CVS people and the SSH people.
> BTW, which SSH do you use ?).

No problem.

Linux CVS version: 1.11.2
OS X CVS version:  1.11.2 (same problems with shipped 1.10 CVS version)

uname -a (osx):

    Darwin corn 6.3 Darwin Kernel Version 6.3: Sat Dec 14 03:11:25 PST
    2002; root:xnu/xnu-344.23.obj~4/RELEASE_PPC Power Macintosh powerpc

OS X Emacs (compiled by me): 

    GNU Emacs 21.2.1 (powerpc-apple-darwin, X toolkit)

The OS X dropped process ouput problem is also exhibited by the nox emacs
shipped with OS X. The easiest way to see it is try something like "df" in
eshell (it usually outputs nothing). I have not seen this behavior on any
other unix-ish software on OS X. 

   -Jim

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

* Re: pcl-cvs help
  2003-01-27 19:16         ` Jim Hourihan
@ 2003-01-27 23:43           ` David Caldwell
  2003-01-28  0:14             ` Andrew Choi
  2003-01-29  6:36             ` Richard Stallman
  0 siblings, 2 replies; 12+ messages in thread
From: David Caldwell @ 2003-01-27 23:43 UTC (permalink / raw)


On 01/27/03 11:16:52 -0800 Jim Hourihan wrote:

> The OS X dropped process ouput problem is also exhibited by the nox emacs
> shipped with OS X. The easiest way to see it is try something like "df" in
> eshell (it usually outputs nothing). I have not seen this behavior on any
> other unix-ish software on OS X.

This seemed to eliminate the problem for me (from Andrew's FAQ):

(setq process-connection-type nil)

-David

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

* Re: pcl-cvs help
  2003-01-27 23:43           ` David Caldwell
@ 2003-01-28  0:14             ` Andrew Choi
  2003-01-28 17:26               ` Stefan Monnier
  2003-01-29  6:36             ` Richard Stallman
  1 sibling, 1 reply; 12+ messages in thread
From: Andrew Choi @ 2003-01-28  0:14 UTC (permalink / raw)


David Caldwell <david@porkrind.org> writes:

> This seemed to eliminate the problem for me (from Andrew's FAQ):
> 
> (setq process-connection-type nil)

There is a problem with the implementation of ptys on the Mac OS X.
That was why I set process-connection-type to nil by default in
lisp/term/mac-win.el.  At some point, this was conditioned out without
my knowledge.  If no one can provide a good reason for doing this, I
propose to change it back the way it was.

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

* Re: pcl-cvs help
  2003-01-28  0:14             ` Andrew Choi
@ 2003-01-28 17:26               ` Stefan Monnier
  2003-01-28 19:28                 ` Jim Hourihan
  0 siblings, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2003-01-28 17:26 UTC (permalink / raw)
  Cc: emacs-devel

> David Caldwell <david@porkrind.org> writes:
> 
> > This seemed to eliminate the problem for me (from Andrew's FAQ):
> > 
> > (setq process-connection-type nil)
> 
> There is a problem with the implementation of ptys on the Mac OS X.
> That was why I set process-connection-type to nil by default in
> lisp/term/mac-win.el.  At some point, this was conditioned out without
> my knowledge.  If no one can provide a good reason for doing this, I
> propose to change it back the way it was.

Hmmmm so if CVS' output is a pipe, PCL-CVS hits the CVS+SSH+libc+pipe problem
and if it's a pty, it hits the other problem.

IIRC, one way to get things working is to use a pipe (as it should,
and as it was doing in Emacs-21.2) and to set CVS_RSH not to `ssh'
but to a script like

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

that runs ssh's stderr through `cat'.  Jim, can you try that ?


	Stefan

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

* Re: pcl-cvs help
  2003-01-28 17:26               ` Stefan Monnier
@ 2003-01-28 19:28                 ` Jim Hourihan
  0 siblings, 0 replies; 12+ messages in thread
From: Jim Hourihan @ 2003-01-28 19:28 UTC (permalink / raw)
  Cc: emacs-devel

"Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes:

>> David Caldwell <david@porkrind.org> writes:
>> 
>> > This seemed to eliminate the problem for me (from Andrew's FAQ):
>> > 
>> > (setq process-connection-type nil)
>> 
>> There is a problem with the implementation of ptys on the Mac OS X.
>> That was why I set process-connection-type to nil by default in
>> lisp/term/mac-win.el.  At some point, this was conditioned out without
>> my knowledge.  If no one can provide a good reason for doing this, I
>> propose to change it back the way it was.
>
> Hmmmm so if CVS' output is a pipe, PCL-CVS hits the CVS+SSH+libc+pipe problem
> and if it's a pty, it hits the other problem.
>
> IIRC, one way to get things working is to use a pipe (as it should,
> and as it was doing in Emacs-21.2) and to set CVS_RSH not to `ssh'
> but to a script like
>
> 	#!/bin/sh
> 	(ssh "$@" 2>&1 1>&3 | cat) 3>&1 1>&2
>
> that runs ssh's stderr through `cat'.  Jim, can you try that ?

It works! Both OS X and Linux are now working flawlessly (fingers
crossed). Thank god too because this has been driving me nuts! I reverted
the pcvs.el file to its shipped state by uncommenting out this line in
cvs-run-process:

          (process-connection-type nil) 

That fixed the problem. I tried cvs-status on our entire source tree and it
worked. If something goes wrong with it I'll know in the next couple of
days. 

          -Jim

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

* Re: pcl-cvs help
  2003-01-27 23:43           ` David Caldwell
  2003-01-28  0:14             ` Andrew Choi
@ 2003-01-29  6:36             ` Richard Stallman
  2003-01-29  7:05               ` Andrew Choi
  1 sibling, 1 reply; 12+ messages in thread
From: Richard Stallman @ 2003-01-29  6:36 UTC (permalink / raw)
  Cc: emacs-devel

    > The OS X dropped process ouput problem is also exhibited by the nox emacs
    > shipped with OS X. The easiest way to see it is try something like "df" in
    > eshell (it usually outputs nothing). I have not seen this behavior on any
    > other unix-ish software on OS X.

    This seemed to eliminate the problem for me (from Andrew's FAQ):

    (setq process-connection-type nil)

This could be a good work-around, but it would be better
if we could fix the underlying Emacs code to make this unnecessary.
However, that would depend on someone who works on Emacs on Mac OS
to figure out the right fix.

Andrew Choi wrote:

    There is a problem with the implementation of ptys on the Mac OS X.
    That was why I set process-connection-type to nil by default in
    lisp/term/mac-win.el.

It's better to do this in Emacs than to advise every user to do it.
Is this a bug in ptys such that Emacs can't make them work,
or is it a bug in Emacs's pty support that could theoretically be
fixed in Emacs?

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

* Re: pcl-cvs help
  2003-01-29  6:36             ` Richard Stallman
@ 2003-01-29  7:05               ` Andrew Choi
  2003-01-30 15:20                 ` Richard Stallman
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew Choi @ 2003-01-29  7:05 UTC (permalink / raw)
  Cc: David Caldwell

Richard Stallman <rms@gnu.org> writes:

> Andrew Choi wrote:
> 
>     There is a problem with the implementation of ptys on the Mac OS X.
>     That was why I set process-connection-type to nil by default in
>     lisp/term/mac-win.el.
> 
> It's better to do this in Emacs than to advise every user to do it.
> Is this a bug in ptys such that Emacs can't make them work,
> or is it a bug in Emacs's pty support that could theoretically be
> fixed in Emacs?

I believe there is a bug in Mac OS X's implementation of ptys that
causes characters to be lost.

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

* Re: pcl-cvs help
  2003-01-29  7:05               ` Andrew Choi
@ 2003-01-30 15:20                 ` Richard Stallman
  2003-01-30 15:54                   ` Andrew Choi
  0 siblings, 1 reply; 12+ messages in thread
From: Richard Stallman @ 2003-01-30 15:20 UTC (permalink / raw)
  Cc: david

    I believe there is a bug in Mac OS X's implementation of ptys that
    causes characters to be lost.

Could you add a comment to that effect next to the setq?
That will help prevent confusion later.

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

* Re: pcl-cvs help
  2003-01-30 15:20                 ` Richard Stallman
@ 2003-01-30 15:54                   ` Andrew Choi
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew Choi @ 2003-01-30 15:54 UTC (permalink / raw)
  Cc: david

Richard Stallman <rms@gnu.org> writes:

>     I believe there is a bug in Mac OS X's implementation of ptys that
>     causes characters to be lost.
> 
> Could you add a comment to that effect next to the setq?
> That will help prevent confusion later.

A comment has been there all along.

  ;; Tell Emacs to use pipes instead of pty's for processes because the
  ;; latter sometimes lose characters.  Pty support is compiled in since
  ;; ange-ftp will not work without it.
  (setq process-connection-type nil))

Perhaps I will add an item to etc/PROBLEMS.

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

end of thread, other threads:[~2003-01-30 15:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-23 19:18 pcl-cvs help Jim Hourihan
2003-01-23 23:01 ` Stefan Monnier <foo@acm.com>
     [not found]   ` <200301232349.h0NNnWo09694@rum.cs.yale.edu>
     [not found]     ` <200301240123.h0O1NK022670@champion.sslsecure.com>
2003-01-27 17:39       ` Stefan Monnier
2003-01-27 19:16         ` Jim Hourihan
2003-01-27 23:43           ` David Caldwell
2003-01-28  0:14             ` Andrew Choi
2003-01-28 17:26               ` Stefan Monnier
2003-01-28 19:28                 ` Jim Hourihan
2003-01-29  6:36             ` Richard Stallman
2003-01-29  7:05               ` Andrew Choi
2003-01-30 15:20                 ` Richard Stallman
2003-01-30 15:54                   ` Andrew Choi

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.