Package: subversion Version: 1.1.3-1 Severity: normal Tags: patch
I have not reported this upstream. Please let me know if you would like me to do so. The attached patch relative to vc-svn.el as installed in subversion_1.1.3-1 enhances the vc-svn-checkout function to allow destfile to be specified. In particular, this enables C-x v ~ to work as well as M-x ediff-revision with subversion files. Personally I find these functions to be indispensible, so I hope you will consider accepting this patch and/or forwarding it upstream and encouraging them to do so. I basically ripped the code from vc-cvs.el and changed the cvs command to the appropriate svn command. Although there's no "-p" flag to svn update, you can use svn cat and get the same result. Note that my patch also includes a fix to the documentation string. Personally, I would rather see this code ignore the condition of editable being set instead of raising an error, but that's neither here nor there. My code explicitly ignores editable when destfile is given. The result is just fine, and the temporary buffer is still read-only even if the file isn't. -- Jay Berkenbilt <[EMAIL PROTECTED]> -----------8<------------ --- vc-svn.el.qdist 2005-01-20 02:57:32.000000000 -0500 +++ vc-svn.el 2005-02-12 13:22:33.000000000 -0500 @@ -293,15 +293,43 @@ check out the head of the trunk. For Subversion, that's equivalent to passing nil. If optional arg DESTFILE is given, it is an alternate filename to -write the contents to; we raise an error." - (unless editable - (error "VC asked Subversion to check out a read-only copy of file")) - (when destfile - (error "VC asked Subversion to check out a file under another name")) - (when (equal rev "") - (setq rev nil)) - (apply 'vc-do-command nil 0 vc-svn-program-name file - "update" (if rev (list "-r" rev) '())) +write the contents to. EDITABLE is ignored in this case." + (if destfile + (let ((failed t) + (backup-name (if (string= file destfile) + (car (find-backup-file-name destfile))))) + (when backup-name + (copy-file destfile backup-name + 'ok-if-already-exists 'keep-date) + (unless (file-writable-p destfile) + (set-file-modes destfile + (logior (file-modes destfile) 128)))) + (unwind-protect + (progn + (let ((coding-system-for-read 'no-conversion) + (coding-system-for-write 'no-conversion)) + (with-temp-file destfile + (apply 'vc-do-command + (current-buffer) 0 vc-svn-program-name file + "cat" + (if rev (list "-r" rev))))) + (setq failed nil)) + (if failed + (if backup-name + (rename-file backup-name destfile + 'ok-if-already-exists) + (if (file-exists-p destfile) + (delete-file destfile))) + (and backup-name + (not vc-make-backup-files) + (delete-file backup-name))))) + (unless editable + (error "VC asked Subversion to check out a read-only copy of file")) + (when (equal rev "") + (setq rev nil)) + (apply 'vc-do-command (current-buffer) 0 vc-svn-program-name file + "update" (if rev (list "-r" rev) '())) + ) (vc-file-setprop file 'vc-workfile-version nil)) -----------8<------------ -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.10-1-k7 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages subversion depends on: ii db4.2-util 4.2.52-18 Berkeley v4.2 Database Utilities ii libapr0 2.0.53-3 the Apache Portable Runtime ii libc6 2.3.2.ds1-20 GNU C Library: Shared libraries an ii libdb4.2 4.2.52-18 Berkeley v4.2 Database Libraries [ ii libexpat1 1.95.8-1 XML parsing C library - runtime li ii libldap2 2.1.30-3 OpenLDAP libraries ii libneon24 0.24.7.dfsg-0.2 An HTTP and WebDAV client library ii libssl0.9.7 0.9.7e-3 SSL shared libraries ii libsvn0 1.1.3-1 shared libraries used by Subversio ii libxml2 2.6.16-2 GNOME XML library ii patch 2.5.9-2 Apply a diff file to an original ii zlib1g 1:1.2.2-4 compression library - runtime -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]