]> code.delx.au - gnu-emacs/blobdiff - lisp/vc-svn.el
* xmenu.c: Revert last change.
[gnu-emacs] / lisp / vc-svn.el
index 44f7e8eb44d6976cfb0bc75d2f32baed83dce4d4..30bf8d4ccf9f2dd8b5ba123c5686ad07b74c6953 100644 (file)
@@ -173,6 +173,23 @@ RESULT is a list of conses (FILE . STATE) for directory DIR."
   (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
@@ -390,7 +407,7 @@ or svn+ssh://."
        (progn
          (unless (vc-do-command
                   "*vc*" 0 "svnadmin" nil
-                  "setlog" "--bypass-hooks" directory 
+                  "setlog" "--bypass-hooks" directory
                   "-r" rev (format "%s" tempfile))
            (error "Log edit failed"))
          (delete-file tempfile))
@@ -408,6 +425,12 @@ or svn+ssh://."
 ;;; History functions
 ;;;
 
+(defvar log-view-per-file-logs)
+
+(define-derived-mode vc-svn-log-view-mode log-view-mode "SVN-Log-View"
+  (require 'add-log)
+  (set (make-local-variable 'log-view-per-file-logs) nil))
+
 (defun vc-svn-print-log (files &optional buffer)
   "Get change log(s) associated with FILES."
   (save-current-buffer
@@ -465,20 +488,20 @@ or svn+ssh://."
        (buffer-size (get-buffer buffer)))))
 
 ;;;
-;;; Snapshot system
+;;; Tag system
 ;;;
 
-(defun vc-svn-create-snapshot (dir name branchp)
+(defun vc-svn-create-tag (dir name branchp)
   "Assign to DIR's current revision a given NAME.
 If BRANCHP is non-nil, the name is created as a branch (and the current
 workspace is immediately moved to that new branch).
 NAME is assumed to be a URL."
   (vc-svn-command nil 0 dir "copy" name)
-  (when branchp (vc-svn-retrieve-snapshot dir name nil)))
+  (when branchp (vc-svn-retrieve-tag dir name nil)))
 
-(defun vc-svn-retrieve-snapshot (dir name update)
-  "Retrieve a snapshot at and below DIR.
-NAME is the name of the snapshot; if it is empty, do a `svn update'.
+(defun vc-svn-retrieve-tag (dir name update)
+  "Retrieve a tag at and below DIR.
+NAME is the name of the tag; if it is empty, do a `svn update'.
 If UPDATE is non-nil, then update (resynch) any affected buffers.
 NAME is assumed to be a URL."
   (vc-svn-command nil 0 dir "switch" name)
@@ -590,9 +613,6 @@ information about FILENAME and return its status."
       (setq status (char-after (line-beginning-position)))
       (if (eq status ??)
          (vc-file-setprop file 'vc-state 'unregistered)
-       ;; `vc-BACKEND-registered' must not set vc-backend,
-       ;; which is instead set in vc-registered.
-       (unless filename (vc-file-setprop file 'vc-backend 'SVN))
        ;; Use the last-modified revision, so that searching in vc-print-log
        ;; output works.
        (vc-file-setprop file 'vc-working-revision (match-string 3))
@@ -647,6 +667,8 @@ information about FILENAME and return its status."
   ;; Arbitrarily assume 10 commmits per day.
   (/ (string-to-number rev) 10.0))
 
+(defvar vc-annotate-parent-rev)
+
 (defun vc-svn-annotate-current-time ()
   (vc-svn-annotate-time-of-rev vc-annotate-parent-rev))