aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2007-07-20 20:02:32 +0000
committerStefan Monnier2007-07-20 20:02:32 +0000
commitf3b8feb4fb8380c16dee7a628fe26aad05912800 (patch)
tree9d27b8a1d293da4b1dac96150b644afd80baf6dd
parent091525d5d7077bb6e955874d15d943fe43dfacd4 (diff)
downloademacs-f3b8feb4fb8380c16dee7a628fe26aad05912800.tar.gz
emacs-f3b8feb4fb8380c16dee7a628fe26aad05912800.zip
(vc-arch-diff): Fix last change.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/vc-arch.el53
2 files changed, 32 insertions, 25 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8ce759c5e30..1bf0ce52e57 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
12007-07-20 Stefan Monnier <monnier@iro.umontreal.ca> 12007-07-20 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * vc-arch.el (vc-arch-diff): Fix last change.
4
3 * progmodes/compile.el (compilation-start): Remember the original 5 * progmodes/compile.el (compilation-start): Remember the original
4 directory in a buffer-local compilation-directory. 6 directory in a buffer-local compilation-directory.
5 (compile): Set the global value of compilation-directory. 7 (compile): Set the global value of compilation-directory.
@@ -100,7 +102,7 @@
100 102
101 * vc-hooks.el: Generalize stay-local-p to operate on lists of 103 * vc-hooks.el: Generalize stay-local-p to operate on lists of
102 files. Change two keybindings to point to new function names. 104 files. Change two keybindings to point to new function names.
103 * vc.arch.el, vc-bzr.el, vc-cvs.el, vc-hg.el, vc-mcvs.el, vc-rcs.el, 105 * vc-arch.el, vc-bzr.el, vc-cvs.el, vc-hg.el, vc-mcvs.el, vc-rcs.el,
104 vc-sccs.el, vc-svn.el: These now implement the NewVC-fileset. 106 vc-sccs.el, vc-svn.el: These now implement the NewVC-fileset.
105 * vc.el: Adapted for NewVC-fileset, but no functional changes yet. 107 * vc.el: Adapted for NewVC-fileset, but no functional changes yet.
106 108
diff --git a/lisp/vc-arch.el b/lisp/vc-arch.el
index 7f673e935f3..eb55506ed63 100644
--- a/lisp/vc-arch.el
+++ b/lisp/vc-arch.el
@@ -386,30 +386,35 @@ Return non-nil if FILE is unchanged."
386 386
387(defun vc-arch-diff (files &optional oldvers newvers buffer) 387(defun vc-arch-diff (files &optional oldvers newvers buffer)
388 "Get a difference report using Arch between two versions of FILES." 388 "Get a difference report using Arch between two versions of FILES."
389 ;; FIXME: This implementation probably only works for singleton filesets 389 ;; FIXME: This implementation only works for singleton filesets. To make
390 (if (and newvers 390 ;; it work for more cases, we have to either call `file-diffs' manually on
391 (vc-up-to-date-p file) 391 ;; each and every `file' in the fileset, or use `changes --diffs' (and
392 (equal newvers (vc-workfile-version (car files)))) 392 ;; variants) and maybe filter the output with `filterdiff' to only include
393 ;; Newvers is the base revision and the current file is unchanged, 393 ;; the files in which we're interested.
394 ;; so we can diff with the current file. 394 (let ((file (car files)))
395 (setq newvers nil)) 395 (if (and newvers
396 (if newvers 396 (vc-up-to-date-p file)
397 (error "Diffing specific revisions not implemented") 397 (equal newvers (vc-workfile-version file)))
398 (let* ((async (and (not vc-disable-async-diff) (fboundp 'start-process))) 398 ;; Newvers is the base revision and the current file is unchanged,
399 ;; Run the command from the root dir. 399 ;; so we can diff with the current file.
400 (default-directory (vc-arch-root (car files))) 400 (setq newvers nil))
401 (status 401 (if newvers
402 (vc-arch-command 402 (error "Diffing specific revisions not implemented")
403 (or buffer "*vc-diff*") 403 (let* ((async (and (not vc-disable-async-diff) (fboundp 'start-process)))
404 (if async 'async 1) 404 ;; Run the command from the root dir.
405 nil "file-diffs" 405 (default-directory (vc-arch-root file))
406 ;; Arch does not support the typical flags. 406 (status
407 ;; (vc-switches 'Arch 'diff) 407 (vc-arch-command
408 (mapcar 'file-relative-name files) 408 (or buffer "*vc-diff*")
409 (if (equal oldvers (vc-workfile-version (car files))) 409 (if async 'async 1)
410 nil 410 nil "file-diffs"
411 oldvers)))) 411 ;; Arch does not support the typical flags.
412 (if async 1 status)))) ; async diff, pessimistic assumption. 412 ;; (vc-switches 'Arch 'diff)
413 (file-relative-name file)
414 (if (equal oldvers (vc-workfile-version file))
415 nil
416 oldvers))))
417 (if async 1 status))))) ; async diff, pessimistic assumption.
413 418
414(defun vc-arch-delete-file (file) 419(defun vc-arch-delete-file (file)
415 (vc-arch-command nil 0 file "rm")) 420 (vc-arch-command nil 0 file "rm"))