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

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

Re: vc-svn.el, emacs21, and subversion1.7


From: Richard Copley
Subject: Re: vc-svn.el, emacs21, and subversion1.7
Date: Wed, 26 Jun 2013 20:30:58 +0100

On 25 June 2013 20:08, Glenn Morris <rgm@gnu.org> wrote:
> Karl Berry wrote:
>
>> Does anyone happen to have a vc-svn.el that works with
>> (a) emacs21, and
>> (b) subversion 1.7/1.8?

I used to have this in my "site-start.el" (I can't tell you what
version of Emacs this was, your mileage may vary):

(defadvice vc-svn-registered (around no-admin-dir-check (file) activate)
  "As of Subversion 1.7, it is no longer the case that each
subdirectory in a working copy contains the \".svn\" directory.
Don't test for it before invoking the Subversion client."
  (require 'vc-svn) ;; I don't care about autoloads!
  (setq ad-return-value
        ;; This is just the guts of the original function,
        ;; as defined in "vc-svn.el".
        (with-temp-buffer
          (cd (file-name-directory file))
          (let* (process-file-side-effects
                 (status
                  (condition-case nil
                  ;; Ignore all errors.
                  (vc-svn-command t t file "status" "-v")
                  ;; Some problem happened.  E.g. We can't find an `svn'
                  ;; executable.  We used to only catch `file-error' but when
                  ;; the process is run on a remote host via Tramp, the error
                  ;; is only reported via the exit status which is turned into
                  ;; an `error' by vc-do-command.
                  (error nil))))
            (when (eq 0 status)
              (let ((parsed (vc-svn-parse-status file)))
                (and parsed (not (memq parsed '(ignored unregistered))))))))))



reply via email to

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