1 ;;; vc-svn.el --- non-resident support for Subversion version-control
3 ;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 ;; Author: FSF (see vc.el for full credits)
6 ;; Maintainer: Stefan Monnier <monnier@gnu.org>
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 3, or (at your option)
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23 ;; Boston, MA 02110-1301, USA.
27 ;; Sync'd with Subversion's vc-svn.el as of revision 5801. but this version
28 ;; has been extensively modified since to handle filesets.
36 ;;; Customization options
39 (defcustom vc-svn-global-switches nil
40 "*Global switches to pass to any SVN command."
41 :type
'(choice (const :tag
"None" nil
)
42 (string :tag
"Argument String")
43 (repeat :tag
"Argument List"
49 (defcustom vc-svn-register-switches nil
50 "*Extra switches for registering a file into SVN.
51 A string or list of strings passed to the checkin program by
53 :type
'(choice (const :tag
"None" nil
)
54 (string :tag
"Argument String")
55 (repeat :tag
"Argument List"
61 (defcustom vc-svn-diff-switches
62 t
;`svn' doesn't support common args like -c or -b.
63 "String or list of strings specifying extra switches for svn diff under VC.
64 If nil, use the value of `vc-diff-switches'.
65 If you want to force an empty list of arguments, use t."
66 :type
'(choice (const :tag
"Unspecified" nil
)
68 (string :tag
"Argument String")
69 (repeat :tag
"Argument List"
75 (defcustom vc-svn-header
(or (cdr (assoc 'SVN vc-header-alist
)) '("\$Id\$"))
76 "*Header keywords to be inserted by `vc-insert-headers'."
78 :type
'(repeat string
)
81 ;; We want to autoload it for use by the autoloaded version of
82 ;; vc-svn-registered, but we want the value to be compiled at startup, not
85 (defconst vc-svn-admin-directory
86 (cond ((and (memq system-type
'(cygwin windows-nt ms-dos
))
87 (getenv "SVN_ASP_DOT_NET_HACK"))
90 "The name of the \".svn\" subdirectory or its equivalent.")
92 ;;; Properties of the backend
94 (defun vc-svn-revision-granularity ()
97 ;;; State-querying functions
100 ;;; vc-svn-admin-directory is generally not defined when the
101 ;;; autoloaded function is called.
103 ;;;###autoload (defun vc-svn-registered (f)
104 ;;;###autoload (let ((admin-dir (cond ((and (eq system-type 'windows-nt)
105 ;;;###autoload (getenv "SVN_ASP_DOT_NET_HACK"))
106 ;;;###autoload "_svn")
107 ;;;###autoload (t ".svn"))))
108 ;;;###autoload (when (file-readable-p (expand-file-name
109 ;;;###autoload (concat admin-dir "/entries")
110 ;;;###autoload (file-name-directory f)))
111 ;;;###autoload (load "vc-svn")
112 ;;;###autoload (vc-svn-registered f))))
115 (add-to-list 'completion-ignored-extensions
".svn/")
117 (defun vc-svn-registered (file)
118 "Check if FILE is SVN registered."
119 (when (file-readable-p (expand-file-name (concat vc-svn-admin-directory
121 (file-name-directory file
)))
123 (cd (file-name-directory file
))
126 ;; Ignore all errors.
127 (vc-svn-command t t file
"status" "-v")
128 ;; Some problem happened. E.g. We can't find an `svn'
129 ;; executable. We used to only catch `file-error' but when
130 ;; the process is run on a remote host via Tramp, the error
131 ;; is only reported via the exit status which is turned into
132 ;; an `error' by vc-do-command.
135 (let ((parsed (vc-svn-parse-status file
)))
136 (and parsed
(not (memq parsed
'(ignored unregistered
))))))))))
138 (defun vc-svn-state (file &optional localp
)
139 "SVN-specific version of `vc-state'."
140 (setq localp
(or localp
(vc-stay-local-p file
)))
142 (cd (file-name-directory file
))
143 (vc-svn-command t
0 file
"status" (if localp
"-v" "-u"))
144 (vc-svn-parse-status file
)))
146 (defun vc-svn-state-heuristic (file)
147 "SVN-specific state heuristic."
148 (vc-svn-state file
'local
))
150 (defun vc-svn-dir-state (dir &optional localp
)
151 "Find the SVN state of all files in DIR and its subdirectories."
152 (setq localp
(or localp
(vc-stay-local-p dir
)))
153 (let ((default-directory dir
))
154 ;; Don't specify DIR in this command, the default-directory is
155 ;; enough. Otherwise it might fail with remote repositories.
157 (buffer-disable-undo) ;; Because these buffers can get huge
158 (vc-svn-command t
0 nil
"status" (if localp
"-v" "-u"))
159 (vc-svn-parse-status))))
161 (defun vc-svn-after-dir-status (callback buffer
)
162 (let ((state-map '((?A . added
)
169 ;; This is what vc-svn-parse-status does.
172 (goto-char (point-min))
173 (while (re-search-forward "^\\(.\\)..... \\(.*\\)$" nil t
)
174 (let ((state (cdr (assq (aref (match-string 1) 0) state-map
)))
175 (filename (match-string 2)))
177 (setq result
(cons (cons filename state
) result
)))))
178 (kill-buffer (current-buffer))
179 (funcall callback result buffer
)))
181 (defun vc-svn-dir-status (dir callback buffer
)
182 "Run 'svn status' for DIR and update BUFFER via CALLBACK.
183 CALLBACK is called as (CALLBACK RESULT BUFFER), where
184 RESULT is a list of conses (FILE . STATE) for directory DIR."
185 (with-current-buffer (get-buffer-create
186 (generate-new-buffer-name " *vc svn status*"))
187 (vc-svn-command (current-buffer) 'async nil
"status")
189 `(vc-svn-after-dir-status (quote ,callback
) ,buffer
))
192 (defun vc-svn-working-revision (file)
193 "SVN-specific version of `vc-working-revision'."
194 ;; There is no need to consult RCS headers under SVN, because we
195 ;; get the workfile version for free when we recognize that a file
196 ;; is registered in SVN.
197 (vc-svn-registered file
)
198 (vc-file-getprop file
'vc-working-revision
))
200 (defun vc-svn-checkout-model (file)
201 "SVN-specific version of `vc-checkout-model'."
202 ;; It looks like Subversion has no equivalent of CVSREAD.
205 ;; vc-svn-mode-line-string doesn't exist because the default implementation
208 (defun vc-svn-previous-revision (file rev
)
209 (let ((newrev (1- (string-to-number rev
))))
211 (number-to-string newrev
))))
213 (defun vc-svn-next-revision (file rev
)
214 (let ((newrev (1+ (string-to-number rev
))))
215 ;; The "working revision" is an uneasy conceptual fit under Subversion;
216 ;; we use it as the upper bound until a better idea comes along. If the
217 ;; workfile version W coincides with the tree's latest revision R, then
218 ;; this check prevents a "no such revision: R+1" error. Otherwise, it
219 ;; inhibits showing of W+1 through R, which could be considered anywhere
220 ;; from gracious to impolite.
221 (unless (< (string-to-number (vc-file-getprop file
'vc-working-revision
))
223 (number-to-string newrev
))))
227 ;;; State-changing functions
230 (defun vc-svn-create-repo ()
231 "Create a new SVN repository."
232 (vc-do-command nil
0 "svnadmin" '("create" "SVN"))
233 (vc-do-command nil
0 "svn" '(".")
234 "checkout" (concat "file://" default-directory
"SVN")))
236 (defun vc-svn-register (files &optional rev comment
)
237 "Register FILES into the SVN version-control system.
238 The COMMENT argument is ignored This does an add but not a commit.
240 `vc-register-switches' and `vc-svn-register-switches' are passed to
241 the SVN command (in that order)."
242 (apply 'vc-svn-command nil
0 files
"add" (vc-switches 'SVN
'register
)))
244 (defun vc-svn-responsible-p (file)
245 "Return non-nil if SVN thinks it is responsible for FILE."
246 (file-directory-p (expand-file-name vc-svn-admin-directory
247 (if (file-directory-p file
)
249 (file-name-directory file
)))))
251 (defalias 'vc-svn-could-register
'vc-svn-responsible-p
252 "Return non-nil if FILE could be registered in SVN.
253 This is only possible if SVN is responsible for FILE's directory.")
255 (defun vc-svn-checkin (files rev comment
)
256 "SVN-specific version of `vc-backend-checkin'."
257 (if rev
(error "Committing to a specific revision is unsupported in SVN"))
259 'vc-svn-command nil
1 files
"ci"
260 (nconc (list "-m" comment
) (vc-switches 'SVN
'checkin
)))))
262 (goto-char (point-min))
263 (unless (equal status
0)
264 ;; Check checkin problem.
266 ((search-forward "Transaction is out of date" nil t
)
267 (mapc (lambda (file) (vc-file-setprop file
'vc-state
'needs-merge
))
269 (error (substitute-command-keys
270 (concat "Up-to-date check failed: "
271 "type \\[vc-next-action] to merge in changes"))))
273 (pop-to-buffer (current-buffer))
274 (goto-char (point-min))
275 (shrink-window-if-larger-than-buffer)
276 (error "Check-in failed"))))
277 ;; Update file properties
279 ;; file 'vc-working-revision
280 ;; (vc-parse-buffer "^\\(new\\|initial\\) revision: \\([0-9.]+\\)" 2))
283 (defun vc-svn-find-revision (file rev buffer
)
284 "SVN-specific retrieval of a specified version into a buffer."
285 (apply 'vc-svn-command
288 (and rev
(not (string= rev
""))
290 (vc-switches 'SVN
'checkout
)))
292 (defun vc-svn-checkout (file &optional editable rev
)
293 (message "Checking out %s..." file
)
294 (with-current-buffer (or (get-file-buffer file
) (current-buffer))
295 (vc-call update file editable rev
(vc-switches 'SVN
'checkout
)))
297 (message "Checking out %s...done" file
))
299 (defun vc-svn-update (file editable rev switches
)
300 (if (and (file-exists-p file
) (not rev
))
301 ;; If no revision was specified, there's nothing to do.
303 ;; Check out a particular version (or recreate the file).
304 (vc-file-setprop file
'vc-working-revision nil
)
305 (apply 'vc-svn-command nil
0 file
307 ;; default for verbose checkout: clear the sticky tag so
308 ;; that the actual update will get the head of the trunk
310 ((null rev
) "-rBASE")
311 ((or (eq rev t
) (equal rev
"")) nil
)
312 (t (concat "-r" rev
)))
315 (defun vc-svn-delete-file (file)
316 (vc-svn-command nil
0 file
"remove"))
318 (defun vc-svn-rename-file (old new
)
319 (vc-svn-command nil
0 new
"move" (file-relative-name old
)))
321 (defun vc-svn-revert (file &optional contents-done
)
322 "Revert FILE to the version it was based on."
323 (unless contents-done
324 (vc-svn-command nil
0 file
"revert")))
326 (defun vc-svn-merge (file first-version
&optional second-version
)
327 "Merge changes into current working copy of FILE.
328 The changes are between FIRST-VERSION and SECOND-VERSION."
329 (vc-svn-command nil
0 file
331 "-r" (if second-version
332 (concat first-version
":" second-version
)
334 (vc-file-setprop file
'vc-state
'edited
)
335 (with-current-buffer (get-buffer "*vc*")
336 (goto-char (point-min))
337 (if (looking-at "C ")
339 0))) ; signal success
341 (defun vc-svn-merge-news (file)
342 "Merge in any new changes made to FILE."
343 (message "Merging changes into %s..." file
)
344 ;; (vc-file-setprop file 'vc-working-revision nil)
345 (vc-file-setprop file
'vc-checkout-time
0)
346 (vc-svn-command nil
0 file
"update")
347 ;; Analyze the merge result reported by SVN, and set
348 ;; file properties accordingly.
349 (with-current-buffer (get-buffer "*vc*")
350 (goto-char (point-min))
351 ;; get new working revision
352 (if (re-search-forward
353 "^\\(Updated to\\|At\\) revision \\([0-9]+\\)" nil t
)
354 (vc-file-setprop file
'vc-working-revision
(match-string 2))
355 (vc-file-setprop file
'vc-working-revision nil
))
357 (goto-char (point-min))
359 (if (looking-at "At revision")
360 0 ;; there were no news; indicate success
361 (if (re-search-forward
362 ;; Newer SVN clients have 3 columns of chars (one for the
363 ;; file's contents, then second for its properties, and the
364 ;; third for lock-grabbing info), before the 2 spaces.
365 ;; We also used to match the filename in column 0 without any
366 ;; meta-info before it, but I believe this can never happen.
367 (concat "^\\(\\([ACGDU]\\)\\(.[B ]\\)? \\)"
368 (regexp-quote (file-name-nondirectory file
)))
371 ;; Merge successful, we are in sync with repository now
372 ((string= (match-string 2) "U")
373 (vc-file-setprop file
'vc-state
'up-to-date
)
374 (vc-file-setprop file
'vc-checkout-time
375 (nth 5 (file-attributes file
)))
376 0);; indicate success to the caller
377 ;; Merge successful, but our own changes are still in the file
378 ((string= (match-string 2) "G")
379 (vc-file-setprop file
'vc-state
'edited
)
380 0);; indicate success to the caller
381 ;; Conflicts detected!
383 (vc-file-setprop file
'vc-state
'edited
)
384 1);; signal the error to the caller
386 (pop-to-buffer "*vc*")
387 (error "Couldn't analyze svn update result")))
388 (message "Merging changes into %s...done" file
))))
390 (defun vc-svn-modify-change-comment (files rev comment
)
391 "Modify the change comments for a specified REV.
392 You must have ssh access to the repository host, and the directory Emacs
393 uses locally for temp files must also be writeable by you on that host."
394 (vc-do-command nil
0 "svn" nil
"info")
396 (goto-char (point-min))
397 (unless (re-search-forward "Repository Root: svn\\+ssh://\\([^/]+\\)\\(/.*\\)" nil t
)
398 (error "Repository information is unavailable."))
399 (let* ((tempfile (make-temp-file user-mail-address
))
400 (host (match-string 1))
401 (directory (match-string 2))
402 (remotefile (concat host
":" tempfile
)))
405 (write-region (point-min) (point-max) tempfile
))
406 (unless (vc-do-command nil
0 "scp" nil
"-q" tempfile remotefile
)
407 (error "Copy of comment to %s failed" remotefile
))
408 (unless (vc-do-command nil
0 "ssh" nil
410 (format "svnadmin setlog --bypass-hooks %s -r %s %s; rm %s"
411 directory rev tempfile tempfile
))
412 (error "Log edit failed"))
416 ;;; History functions
419 (defun vc-svn-print-log (files &optional buffer
)
420 "Get change log(s) associated with FILES."
422 (vc-setup-buffer buffer
)
423 (let ((inhibit-read-only t
))
424 (goto-char (point-min))
427 (insert "Working file: " file
"\n")
431 ;; (if (and (= (length files) 1) (vc-stay-local-p file)) 'async 0)
434 ;; By default Subversion only shows the log up to the
435 ;; working revision, whereas we also want the log of the
436 ;; subsequent commits. At least that's what the
437 ;; vc-cvs.el code does.
439 ;; Dump log for the entire directory.
440 (vc-svn-command buffer
0 nil
"log" "-rHEAD:0")))))
442 (defun vc-svn-wash-log ()
443 "Remove all non-comment information from log output."
444 ;; FIXME: not implemented for SVN
447 (defun vc-svn-diff (files &optional oldvers newvers buffer
)
448 "Get a difference report using SVN between two revisions of fileset FILES."
452 (or (equal oldvers
(vc-working-revision f
))
455 ;; Use nil rather than the current revision because svn handles
456 ;; it better (i.e. locally). Note that if _any_ of the files
457 ;; has a different revision, we fetch the lot, which is
458 ;; obviously sub-optimal.
461 (if vc-svn-diff-switches
462 (vc-switches 'SVN
'diff
)
463 (list "-x" (mapconcat 'identity
(vc-switches nil
'diff
) " "))))
464 (async (and (not vc-disable-async-diff
)
465 (vc-stay-local-p files
)
466 (or oldvers newvers
)))) ; Svn diffs those locally.
467 (apply 'vc-svn-command buffer
473 (list "-r" (if newvers
(concat oldvers
":" newvers
)
475 (if async
1 ; async diff => pessimistic assumption
476 ;; For some reason `svn diff' does not return a useful
477 ;; status w.r.t whether the diff was empty or not.
478 (buffer-size (get-buffer buffer
)))))
484 (defun vc-svn-create-snapshot (dir name branchp
)
485 "Assign to DIR's current revision a given NAME.
486 If BRANCHP is non-nil, the name is created as a branch (and the current
487 workspace is immediately moved to that new branch).
488 NAME is assumed to be a URL."
489 (vc-svn-command nil
0 dir
"copy" name
)
490 (when branchp
(vc-svn-retrieve-snapshot dir name nil
)))
492 (defun vc-svn-retrieve-snapshot (dir name update
)
493 "Retrieve a snapshot at and below DIR.
494 NAME is the name of the snapshot; if it is empty, do a `svn update'.
495 If UPDATE is non-nil, then update (resynch) any affected buffers.
496 NAME is assumed to be a URL."
497 (vc-svn-command nil
0 dir
"switch" name
)
498 ;; FIXME: parse the output and obey `update'.
505 ;; Subversion makes backups for us, so don't bother.
506 ;; (defalias 'vc-svn-make-version-backups-p 'vc-stay-local-p
507 ;; "Return non-nil if version backups should be made for FILE.")
509 (defun vc-svn-check-headers ()
510 "Check if the current file has any headers in it."
512 (goto-char (point-min))
513 (re-search-forward "\\$[A-Za-z\300-\326\330-\366\370-\377]+\
514 \\(: [\t -#%-\176\240-\377]*\\)?\\$" nil t
)))
518 ;;; Internal functions
521 (defcustom vc-svn-program
"svn"
522 "Name of the SVN executable."
526 (defun vc-svn-root (dir)
527 (vc-find-root dir vc-svn-admin-directory t
))
529 (defun vc-svn-command (buffer okstatus file-or-list
&rest flags
)
530 "A wrapper around `vc-do-command' for use in vc-svn.el.
531 The difference to vc-do-command is that this function always invokes `svn',
532 and that it passes `vc-svn-global-switches' to it before FLAGS."
533 (apply 'vc-do-command buffer okstatus vc-svn-program file-or-list
534 (if (stringp vc-svn-global-switches
)
535 (cons vc-svn-global-switches flags
)
536 (append vc-svn-global-switches
539 (defun vc-svn-repository-hostname (dirname)
541 (let ((coding-system-for-read
542 (or file-name-coding-system
543 default-file-name-coding-system
)))
544 (vc-insert-file (expand-file-name (concat vc-svn-admin-directory
547 (goto-char (point-min))
548 (when (re-search-forward
549 ;; Old `svn' used name="svn:this_dir", newer use just name="".
550 (concat "name=\"\\(?:svn:this_dir\\)?\"[\n\t ]*"
551 "\\(?:[-a-z]+=\"[^\"]*\"[\n\t ]*\\)*?"
552 "url=\"\\(?1:[^\"]+\\)\""
553 ;; Yet newer ones don't use XML any more.
554 "\\|^\ndir\n[0-9]+\n\\(?1:.*\\)") nil t
)
555 ;; This is not a hostname but a URL. This may actually be considered
556 ;; as a feature since it allows vc-svn-stay-local to specify different
557 ;; behavior for different modules on the same server.
560 (defun vc-svn-resolve-when-done ()
561 "Call \"svn resolved\" if the conflict markers have been removed."
563 (goto-char (point-min))
564 (unless (re-search-forward "^<<<<<<< " nil t
)
565 (vc-svn-command nil
0 buffer-file-name
"resolved")
566 ;; Remove the hook so that it is not called multiple times.
567 (remove-hook 'after-save-hook
'vc-svn-resolve-when-done t
))))
569 ;; Inspired by vc-arch-find-file-hook.
570 (defun vc-svn-find-file-hook ()
571 (when (eq ?C
(vc-file-getprop buffer-file-name
'vc-svn-status
))
572 ;; If the file is marked as "conflicted", then we should try and call
573 ;; "svn resolved" when applicable.
575 (goto-char (point-min))
576 (re-search-forward "^<<<<<<< " nil t
))
577 ;; There are conflict markers.
579 (smerge-start-session)
580 (add-hook 'after-save-hook
'vc-svn-resolve-when-done nil t
))
581 ;; There are no conflict markers. This is problematic: maybe it means
582 ;; the conflict has been resolved and we should immediately call "svn
583 ;; resolved", or it means that the file's type does not allow Svn to
584 ;; use conflict markers in which case we don't really know what to do.
585 ;; So let's just punt for now.
587 (message "There are unresolved conflicts in this file")))
589 (defun vc-svn-parse-status (&optional filename
)
590 "Parse output of \"svn status\" command in the current buffer.
591 Set file properties accordingly. Unless FILENAME is non-nil, parse only
592 information about FILENAME and return its status."
594 (goto-char (point-min))
595 (while (re-search-forward
596 ;; Ignore the files with status X.
597 "^\\(\\?\\|[ ACDGIMR!~][ MC][ L][ +][ S]..\\([ *]\\) +\\([-0-9]+\\) +\\([0-9?]+\\) +\\([^ ]+\\)\\) +" nil t
)
598 ;; If the username contains spaces, the output format is ambiguous,
599 ;; so don't trust the output's filename unless we have to.
600 (setq file
(or filename
602 (buffer-substring (point) (line-end-position)))))
603 (setq status
(char-after (line-beginning-position)))
605 (vc-file-setprop file
'vc-state
'unregistered
)
606 ;; `vc-BACKEND-registered' must not set vc-backend,
607 ;; which is instead set in vc-registered.
608 (unless filename
(vc-file-setprop file
'vc-backend
'SVN
))
609 ;; Use the last-modified revision, so that searching in vc-print-log
611 (vc-file-setprop file
'vc-working-revision
(match-string 3))
612 ;; Remember Svn's own status.
613 (vc-file-setprop file
'vc-svn-status status
)
618 (if (eq (char-after (match-beginning 1)) ?
*)
620 (vc-file-setprop file
'vc-checkout-time
621 (nth 5 (file-attributes file
)))
624 ;; If the file was actually copied, (match-string 2) is "-".
625 (vc-file-setprop file
'vc-working-revision
"0")
626 (vc-file-setprop file
'vc-checkout-time
0)
628 ((memq status
'(?M ?C
))
629 (if (eq (char-after (match-beginning 1)) ?
*)
633 (vc-file-setprop file
'vc-state
'ignored
))
635 (vc-file-setprop file
'vc-state
'removed
))
637 (if filename
(vc-file-getprop filename
'vc-state
))))
639 (defun vc-svn-dir-state-heuristic (dir)
640 "Find the SVN state of all files in DIR, using only local information."
641 (vc-svn-dir-state dir
'local
))
643 (defun vc-svn-valid-symbolic-tag-name-p (tag)
644 "Return non-nil if TAG is a valid symbolic tag name."
645 ;; According to the SVN manual, a valid symbolic tag must start with
646 ;; an uppercase or lowercase letter and can contain uppercase and
647 ;; lowercase letters, digits, `-', and `_'.
648 (and (string-match "^[a-zA-Z]" tag
)
649 (not (string-match "[^a-z0-9A-Z-_]" tag
))))
651 (defun vc-svn-valid-revision-number-p (tag)
652 "Return non-nil if TAG is a valid revision number."
653 (and (string-match "^[0-9]" tag
)
654 (not (string-match "[^0-9]" tag
))))
656 ;; Support for `svn annotate'
658 (defun vc-svn-annotate-command (file buf
&optional rev
)
659 (vc-svn-command buf
0 file
"annotate" (if rev
(concat "-r" rev
))))
661 (defun vc-svn-annotate-time-of-rev (rev)
662 ;; Arbitrarily assume 10 commmits per day.
663 (/ (string-to-number rev
) 10.0))
665 (defun vc-svn-annotate-current-time ()
666 (vc-svn-annotate-time-of-rev vc-annotate-parent-rev
))
668 (defconst vc-svn-annotate-re
"[ \t]*\\([0-9]+\\)[ \t]+[^\t ]+ ")
670 (defun vc-svn-annotate-time ()
671 (when (looking-at vc-svn-annotate-re
)
672 (goto-char (match-end 0))
673 (vc-svn-annotate-time-of-rev (match-string 1))))
675 (defun vc-svn-annotate-extract-revision-at-line ()
678 (if (looking-at vc-svn-annotate-re
) (match-string 1))))
682 ;; arch-tag: 02f10c68-2b4d-453a-90fc-1eee6cfb268d
683 ;;; vc-svn.el ends here