Hot answers tagged

3

These are from my limited knowledge and research. Options for minimal functionality inside the svn project directory emacs -nw -f vc-root-diff -> C-c C-e for opening multiple diff in ediff. I actualy think this is not bad. Can't I skip the vc-root-diff step in any way? ediff-directory-revisions doesn't quite do the trick. An alternative way is using ...


2

Something like this: (defun open-status () (interactive) (if vc-mode (if (string-match "^ Git" (substring-no-properties vc-mode)) (magit-status) (if (string-match "^ SVN" (substring-no-properties vc-mode)) (call-interactively 'svn-status ) (if (string-match "^ HG" (substring-no-properties vc-mode)) ...


2

I use psvn.el. You will have to download and place this file into a folder which is in the search path of your Emacs: (add-to-list 'load-path "~/.emacs.d/lisp") Further you will have to compile this file to an .elc file. If you run svn-status and select the root of your SVN checked out folder, you will get a nice overview in a separate buffer (*svn-status*)...


2

You can use M-x vc-revert. or use this function: (defun revert-svn() (interactive) (vc-revert) (revert-buffer t t)) (global-set-key (kbd "C-x v u") 'revert-svn)


2

SVN is supported by Emacs' built-in version control system. I don't think there's anything comparable to magit for SVN, partly because git is much more capable than SVN, and partly because fewer and fewer people have been using SVN since git came along.


1

The Foundation I work for also uses Subversion exclusively, since quite a few features they need would not be handled as easily using git (some of them: huge monorepos, centralised workflow, excellent TortoiseSvn client). Some of the engineers use dsvn. Some use psvn. I personally use the built in Emacs VC system. See also Subversion on EmacsWiki.


1

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)


1

You can use the command ediff-revision, see the the manual for details.


1

I came up with something like this. (defun vc-status () (interactive) (let ((backend (vc-responsible-backend default-directory))) (cond ((equal 'Git backend) (magit-status)) ((equal 'Hg backend) (ahg-status)))))


1

As @djangoliv has mentioned, M-x vc-revert works (C-x v u on Emacs 24.5.1). When doing it over a file on a *vc-dir* buffer (opened by vc-directory command), another buffer with the differences is opened and a prompt message appears in the mini-buffer to confirm it. Just like this image:


Only top voted, non community-wiki answers of a minimum length are eligible