I have Subversion exclusive-locking enabled to increase SVN performance. If I commit a file the svn command line client opens Emacs so I can enter a commit message. But Emacs VC tries to determine the SVN status of the commit message file svn-commit.tmp with the command svn --non-interactive status -v svn-commit.tmp
. That blocks because the commit command has the exclusive lock and I have to wait for the status timeout (10 seconds) until I can type my commit message. How can I disable version control for *.tmp files in Emacs to prevent that wait time? I didn't find an option to exclude files from VC.
1 Answer
You can override VC handled backends for specific file based on filename:
(defun my/find-file-hook ()
(when (string-match-p "^svn-commit.*tmp$" (file-name-nondirectory (buffer-file-name)))
(set (make-local-variable 'vc-handled-backends) nil)))
(add-hook 'find-file-hook #'my/find-file-hook)
*.tmp
tosvn:ignore
help?svn status
for any file it opens.