emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/vc-svn.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/vc-svn.el
Date: Mon, 13 Dec 2004 01:42:17 -0500

Index: emacs/lisp/vc-svn.el
diff -c emacs/lisp/vc-svn.el:1.15 emacs/lisp/vc-svn.el:1.16
*** emacs/lisp/vc-svn.el:1.15   Mon Aug 23 18:23:52 2004
--- emacs/lisp/vc-svn.el        Mon Dec 13 06:30:40 2004
***************
*** 447,456 ****
        (vc-insert-file (expand-file-name ".svn/entries" dirname)))
      (goto-char (point-min))
      (when (re-search-forward
!          (concat "name=\"svn:this_dir\"[\n\t ]*"
!                  "\\([-a-z]+=\"[^\"]*\"[\n\t ]*\\)*?"
                   "url=\"\\([^\"]+\\)\"") nil t)
!       (match-string 2))))
  
  (defun vc-svn-parse-status (localp)
    "Parse output of \"svn status\" command in the current buffer.
--- 447,460 ----
        (vc-insert-file (expand-file-name ".svn/entries" dirname)))
      (goto-char (point-min))
      (when (re-search-forward
!          ;; Old `svn' used name="svn:dir", newer use just name="".
!          (concat "name=\"\\(?:svn:this_dir\\)?\"[\n\t ]*"
!                  "\\(?:[-a-z]+=\"[^\"]*\"[\n\t ]*\\)*?"
                   "url=\"\\([^\"]+\\)\"") nil t)
!       ;; This is not a hostname but a URL.  This may actually be considered
!       ;; as a feature since it allows vc-svn-stay-local to specify different
!       ;; behavior for different modules on the same server.
!       (match-string 1))))
  
  (defun vc-svn-parse-status (localp)
    "Parse output of \"svn status\" command in the current buffer.
***************
*** 505,510 ****
--- 509,538 ----
    (and (string-match "^[0-9]" tag)
         (not (string-match "[^0-9]" tag))))
  
+ ;; Support for `svn annotate'
+ 
+ (defun vc-svn-annotate-command (file buf &optional rev)
+   (vc-svn-command buf 0 file "annotate" (if rev (concat "-r" rev))))
+ 
+ (defun vc-svn-annotate-time-of-rev (rev)
+   ;; Arbitrarily assume 10 commmits per day.
+   (/ (string-to-number rev) 10.0))
+ 
+ (defun vc-svn-annotate-current-time ()
+   (vc-svn-annotate-time-of-rev vc-annotate-parent-rev))
+ 
+ (defconst vc-svn-annotate-re "[ \t]*\\([0-9]+\\)[ \t]+[^\t ]+ ")
+ 
+ (defun vc-svn-annotate-time ()
+   (when (looking-at vc-svn-annotate-re)
+     (goto-char (match-end 0))
+     (vc-svn-annotate-time-of-rev (match-string 1))))
+ 
+ (defun vc-svn-annotate-extract-revision-at-line ()
+   (save-excursion
+     (beginning-of-line)
+     (if (looking-at vc-svn-annotate-re) (match-string 1))))
+ 
  (provide 'vc-svn)
  
  ;; arch-tag: 02f10c68-2b4d-453a-90fc-1eee6cfb268d




reply via email to

[Prev in Thread] Current Thread [Next in Thread]