]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-arch-find-version): New function.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 27 Dec 2006 16:26:34 +0000 (16:26 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 27 Dec 2006 16:26:34 +0000 (16:26 +0000)
lisp/ChangeLog
lisp/vc-arch.el

index 20380257d1dd47d81495259d37830271001c18b5..915034d4538c707174bf61181ade3cf9ebd36433 100644 (file)
@@ -1,3 +1,10 @@
+2006-12-27  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * vc-arch.el (vc-arch-find-version): New function.
+
+       * vc-hooks.el (vc-version-backup-file-name): Revision names may be
+       composed of arbitrary characters (even /) in some systems.
+
 2006-12-27  Eli Zaretskii  <eliz@gnu.org>
 
        * international/mule-cmds.el (select-safe-coding-system-interactively):
index a0fc8af83456a0ff2513f0230c2e2665fe132b4d..bac6c26cc9395cb092ad9a6f31316376a268bcef 100644 (file)
@@ -406,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