You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by David Glasser <gl...@davidglasser.net> on 2007/10/11 15:54:05 UTC

[PATCH] [psvn] allow use of svn-status-use-history with no *svn-status* buffer

I use session.el to save my svn-status-directory-history (among other
things), so it would be nice to be able to run 'C-x M-s h' as soon as
I start emacs to pop back to one of those checkouts.  I think the
following patch allows that.  I can commit it if you approve.

--dave

[[[
* contrib/client-side/emacs/psvn.el
  Allow history command to work even without an svn-status buffer open.
]]]


Index: contrib/client-side/emacs/psvn.el
===================================================================
--- contrib/client-side/emacs/psvn.el	(revision 27077)
+++ contrib/client-side/emacs/psvn.el	(working copy)
@@ -1101,7 +1101,9 @@ If there is no .svn directory, examine i
   (let* ((in-status-buffer (eq major-mode 'svn-status-mode))
          (hist (if in-status-buffer (cdr
svn-status-directory-history) svn-status-directory-history))
          (dir (funcall svn-status-completing-read-function
"svn-status on directory: " hist))
-         (svn-buffer-available (with-current-buffer (get-buffer
svn-status-buffer-name) (string= default-directory dir))))
+         (svn-buffer-available (and (get-buffer svn-status-buffer-name)
+                                    (with-current-buffer (get-buffer
svn-status-buffer-name)
+                                      (string= default-directory dir)))))
     (if (file-directory-p dir)
         (if svn-buffer-available
             (svn-status-switch-to-status-buffer)

-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org