diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2006-12-27 16:26:34 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2006-12-27 16:26:34 +0000 |
commit | 544bdc401a830937e6954365bb7806ea062205cb (patch) | |
tree | 167928e71f38e7f81db6c080f115b9aef03711a3 /lisp | |
parent | d4c813e9885ac389910b6a2c29bf7369389cb92d (diff) | |
download | emacs-544bdc401a830937e6954365bb7806ea062205cb.tar.gz |
(vc-arch-find-version): New function.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 7 | ||||
-rw-r--r-- | lisp/vc-arch.el | 14 |
2 files changed, 21 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 20380257d1d..915034d4538 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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): diff --git a/lisp/vc-arch.el b/lisp/vc-arch.el index a0fc8af8345..bac6c26cc93 100644 --- a/lisp/vc-arch.el +++ b/lisp/vc-arch.el @@ -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 |