]> code.delx.au - gnu-emacs/blobdiff - lisp/vc-arch.el
(image-mode): Revert 2007-01-30 changes.
[gnu-emacs] / lisp / vc-arch.el
index 569f864c0ea6d8e44179a4ae430ed37237dba734..0f02db0ba969f6fda01c3d663e8672c9cef9cf94 100644 (file)
@@ -1,7 +1,6 @@
 ;;; vc-arch.el --- VC backend for the Arch version-control system
 
-;; Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-;;           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>
@@ -20,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -153,7 +152,7 @@ Only the value `maybe' can be trusted :-(."
        (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))
@@ -162,7 +161,7 @@ Only the value `maybe' can be trusted :-(."
                    (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
@@ -407,6 +406,20 @@ Return non-nil if FILE is unchanged."
 
 (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