Mercurial > emacs
changeset 82000:066eaef90bfb
(vc-arch-diff): Fix last change.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 20 Jul 2007 20:02:32 +0000 |
parents | c0fc8e3cb6b4 |
children | b450385acac9 |
files | lisp/ChangeLog lisp/vc-arch.el |
diffstat | 2 files changed, 32 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Fri Jul 20 18:54:57 2007 +0000 +++ b/lisp/ChangeLog Fri Jul 20 20:02:32 2007 +0000 @@ -1,5 +1,7 @@ 2007-07-20 Stefan Monnier <monnier@iro.umontreal.ca> + * vc-arch.el (vc-arch-diff): Fix last change. + * progmodes/compile.el (compilation-start): Remember the original directory in a buffer-local compilation-directory. (compile): Set the global value of compilation-directory. @@ -100,7 +102,7 @@ * vc-hooks.el: Generalize stay-local-p to operate on lists of files. Change two keybindings to point to new function names. - * vc.arch.el, vc-bzr.el, vc-cvs.el, vc-hg.el, vc-mcvs.el, vc-rcs.el, + * vc-arch.el, vc-bzr.el, vc-cvs.el, vc-hg.el, vc-mcvs.el, vc-rcs.el, vc-sccs.el, vc-svn.el: These now implement the NewVC-fileset. * vc.el: Adapted for NewVC-fileset, but no functional changes yet.
--- a/lisp/vc-arch.el Fri Jul 20 18:54:57 2007 +0000 +++ b/lisp/vc-arch.el Fri Jul 20 20:02:32 2007 +0000 @@ -386,30 +386,35 @@ (defun vc-arch-diff (files &optional oldvers newvers buffer) "Get a difference report using Arch between two versions of FILES." - ;; FIXME: This implementation probably only works for singleton filesets - (if (and newvers - (vc-up-to-date-p file) - (equal newvers (vc-workfile-version (car files)))) - ;; Newvers is the base revision and the current file is unchanged, - ;; so we can diff with the current file. - (setq newvers nil)) - (if newvers - (error "Diffing specific revisions not implemented") - (let* ((async (and (not vc-disable-async-diff) (fboundp 'start-process))) - ;; Run the command from the root dir. - (default-directory (vc-arch-root (car files))) - (status - (vc-arch-command - (or buffer "*vc-diff*") - (if async 'async 1) - nil "file-diffs" - ;; Arch does not support the typical flags. - ;; (vc-switches 'Arch 'diff) - (mapcar 'file-relative-name files) - (if (equal oldvers (vc-workfile-version (car files))) - nil - oldvers)))) - (if async 1 status)))) ; async diff, pessimistic assumption. + ;; FIXME: This implementation only works for singleton filesets. To make + ;; it work for more cases, we have to either call `file-diffs' manually on + ;; each and every `file' in the fileset, or use `changes --diffs' (and + ;; variants) and maybe filter the output with `filterdiff' to only include + ;; the files in which we're interested. + (let ((file (car files))) + (if (and newvers + (vc-up-to-date-p file) + (equal newvers (vc-workfile-version file))) + ;; Newvers is the base revision and the current file is unchanged, + ;; so we can diff with the current file. + (setq newvers nil)) + (if newvers + (error "Diffing specific revisions not implemented") + (let* ((async (and (not vc-disable-async-diff) (fboundp 'start-process))) + ;; Run the command from the root dir. + (default-directory (vc-arch-root file)) + (status + (vc-arch-command + (or buffer "*vc-diff*") + (if async 'async 1) + nil "file-diffs" + ;; Arch does not support the typical flags. + ;; (vc-switches 'Arch 'diff) + (file-relative-name file) + (if (equal oldvers (vc-workfile-version file)) + nil + oldvers)))) + (if async 1 status))))) ; async diff, pessimistic assumption. (defun vc-arch-delete-file (file) (vc-arch-command nil 0 file "rm"))