From: Sam Steingold Date: Wed, 18 Nov 2009 19:12:23 +0000 (+0000) Subject: (vc-hg-diff): Fix last patch: do not change directory. X-Git-Tag: emacs-pretest-23.1.90~359 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=efa3639b409f71f0ec60607ceae9473ad6958751;p=emacs.git (vc-hg-diff): Fix last patch: do not change directory. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d8b01c73c03..fee3587d90d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2009-11-18 Bernhard Herzog + + * vc-hg.el (vc-hg-diff): Fix last patch: do not change directory. + 2009-11-18 Juanma Barranquero * font-setting.el (font-use-system-font): Declare for byte-compiler. diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el index 42bdd4185e3..ab4bdab8c50 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el @@ -276,16 +276,12 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (defun vc-hg-diff (files &optional oldvers newvers buffer) "Get a difference report using hg between two revisions of FILES." (let* ((firstfile (car files)) - (cwd (if firstfile (file-name-directory firstfile) - (expand-file-name default-directory))) (working (and firstfile (vc-working-revision firstfile)))) (when (and (equal oldvers working) (not newvers)) (setq oldvers nil)) (when (and (not oldvers) newvers) (setq oldvers working)) - (apply #'vc-hg-command (or buffer "*vc-diff*") nil - (mapcar (lambda (file) (file-relative-name file cwd)) files) - "diff" + (apply #'vc-hg-command (or buffer "*vc-diff*") nil files "diff" (append (vc-switches 'hg 'diff) (when oldvers