[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] psvn: Fix bogus comparisons of buffers to strings.

From: Stefan Reichör <stefan_at_xsteve.at>
Date: 2005-08-29 22:31:49 CEST

Kalle Olavi Niemitalo <kon@iki.fi> writes:

> The current code is obviously wrong, and this is the right fix
> (at least until psvn is changed to support multiple svn-status
> buffers, in which case the major mode should be checked instead).
> However, I am not sure the code *should* be fixed: I don't
> understand its purpose, it has apparently never worked, and
> nobody has complained, so perhaps it should be just removed
> instead.

I have applied that patch now.

> [[[
> Fix bogus comparisons of buffers to strings.
>
> * contrib/client-side/psvn/psvn.el
> (svn-status-show-process-output): Don't compare the current buffer to
> the value of svn-status-buffer-name; it'd never match, because the
> buffer object is not a string. Compare the name of the buffer instead.
> (svn-status-show-process-buffer-internal): Likewise, except the original
> code compared the buffer to a *constant* string.
> ]]]
>
> --- contrib/client-side/psvn/psvn.el (revision 15831 at svn.collab.net)
> +++ contrib/client-side/psvn/psvn.el (local)
> @@ -2133,7 +2133,7 @@ (defun svn-status-create-arg-file (file-
> (insert postfix))))
>
> (defun svn-status-show-process-buffer-internal (&optional scroll-to-top)
> - (when (eq (current-buffer) "`svn-status-buffer-name'")
> + (when (string= (buffer-name) svn-status-buffer-name)
> (delete-other-windows))
> (pop-to-buffer "*svn-process*")
> (when svn-status-wash-control-M-in-process-buffers

That wrong code slipped in with a change in the docstrings from svn-status-buffer-name
`to svn-status-buffer-name'. I replaced it in a wrong place.

> @@ -2157,7 +2157,7 @@ (defun svn-status-show-process-output (c
> (when svn-status-last-output-buffer-name
> (if window-mode
> (progn
> - (when (eq (current-buffer) svn-status-buffer-name)
> + (when (string= (buffer-name) svn-status-buffer-name)
> (delete-other-windows))
> (pop-to-buffer "*svn-process*")
> (switch-to-buffer (get-buffer-create svn-status-last-output-buffer-name))

I committed that also, although I have no idea at the moment why that was used there :-|

Stefan.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Aug 29 22:38:58 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.