(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
(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))
;;; 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
(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)
(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))
;; 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))