# HG changeset patch # User Stefan Monnier # Date 1167236794 0 # Node ID f0d812b53a7667fdc18ba0b6c2a1428c079c2000 # Parent e58390f88130f2adedfc871de1de4f47c91bfbdf (vc-arch-find-version): New function. diff -r e58390f88130 -r f0d812b53a76 lisp/ChangeLog --- a/lisp/ChangeLog Wed Dec 27 16:25:42 2006 +0000 +++ b/lisp/ChangeLog Wed Dec 27 16:26:34 2006 +0000 @@ -1,3 +1,10 @@ +2006-12-27 Stefan Monnier + + * 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 * international/mule-cmds.el (select-safe-coding-system-interactively): diff -r e58390f88130 -r f0d812b53a76 lisp/vc-arch.el --- a/lisp/vc-arch.el Wed Dec 27 16:25:42 2006 +0000 +++ b/lisp/vc-arch.el Wed Dec 27 16:26:34 2006 +0000 @@ -406,6 +406,20 @@ (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