;;; vc-arch.el --- VC backend for the Arch version-control system
-;; Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+;; Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Stefan Monnier <monnier@gnu.org>
(with-temp-buffer
(insert-file-contents idfile)
(looking-at ".*[^ \n\t]")
- (match-string 0)))
+ (match-string 0))
(with-current-buffer (find-file-noselect file)
(save-excursion
(goto-char (point-max))
(goto-char (point-min))
(re-search-forward vc-arch-tagline-re (+ (point) 1000) t)))
(match-string 1)
- (concat "./" (file-relative-name file (vc-arch-root file))))))))
+ (concat "./" (file-relative-name file (vc-arch-root file)))))))))
(defun vc-arch-tagging-method (file)
(with-current-buffer
(defun vc-arch-init-version () nil)
+;;; Less obvious implementations.
+
+(defun vc-arch-find-version (file rev buffer)
+ (let ((out (make-temp-file "vc-out")))
+ (unwind-protect
+ (progn
+ (with-temp-buffer
+ (vc-arch-command (current-buffer) 1 nil "file-diffs" file rev)
+ (call-process-region (point-min) (point-max)
+ "patch" nil nil nil "-R" "-o" out file))
+ (with-current-buffer buffer
+ (insert-file-contents out)))
+ (delete-file out))))
+
(provide 'vc-arch)
;; arch-tag: a35c7c1c-5237-429d-88ef-3d718fd2e704