# HG changeset patch # User Eric S. Raymond # Date 1210961726 0 # Node ID 883c17cb4544bbaa30bc2e4235d7e95b97cd53d5 # Parent c02467eb5926bad0598396f2accb5c7663c3a57b Add extra-headers method for SVN. diff -r c02467eb5926 -r 883c17cb4544 lisp/ChangeLog --- a/lisp/ChangeLog Fri May 16 11:12:48 2008 +0000 +++ b/lisp/ChangeLog Fri May 16 18:15:26 2008 +0000 @@ -5,6 +5,8 @@ stale since 1995 and may now be actively misleading. * vc-cvs.el (vc-cvs-status-extra-headers): Extract and display the CVS repository. + * vc-svn.el (vc-svn-status-extra-headers): Extract and display the + SVN repository. 2008-05-16 Juanma Barranquero diff -r c02467eb5926 -r 883c17cb4544 lisp/vc-svn.el --- a/lisp/vc-svn.el Fri May 16 11:12:48 2008 +0000 +++ b/lisp/vc-svn.el Fri May 16 18:15:26 2008 +0000 @@ -173,6 +173,23 @@ (vc-exec-after `(vc-svn-after-dir-status (quote ,callback)))) +(defun vc-svn-status-extra-headers (dir) + "Generate extra status headers for a Subversion working copy." + (vc-svn-command "*vc*" 0 nil "info") + (let ((repo + (save-excursion + (and (progn + (set-buffer "*vc*") + (goto-char (point-min)) + (re-search-forward "Repository Root: *\\(.*\\)" nil t)) + (match-string 1))))) + (concat + (cond (repo + (concat + (propertize "Repository : " 'face 'font-lock-type-face) + (propertize repo 'face 'font-lock-variable-name-face))) + (t ""))))) + (defun vc-svn-working-revision (file) "SVN-specific version of `vc-working-revision'." ;; There is no need to consult RCS headers under SVN, because we