diff options
| author | Sam Steingold | 2009-11-18 19:12:23 +0000 |
|---|---|---|
| committer | Sam Steingold | 2009-11-18 19:12:23 +0000 |
| commit | efa3639b409f71f0ec60607ceae9473ad6958751 (patch) | |
| tree | 91deb69b71d271ae1c1ea53e2d9b5635ce8cc1e3 | |
| parent | e0620570f063b501dc65cda433c483e5471e4a44 (diff) | |
| download | emacs-efa3639b409f71f0ec60607ceae9473ad6958751.tar.gz emacs-efa3639b409f71f0ec60607ceae9473ad6958751.zip | |
(vc-hg-diff): Fix last patch: do not change directory.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/vc-hg.el | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d8b01c73c03..fee3587d90d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2009-11-18 Bernhard Herzog <bernhard.herzog@intevation.de> | ||
| 2 | |||
| 3 | * vc-hg.el (vc-hg-diff): Fix last patch: do not change directory. | ||
| 4 | |||
| 1 | 2009-11-18 Juanma Barranquero <lekktu@gmail.com> | 5 | 2009-11-18 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 6 | ||
| 3 | * font-setting.el (font-use-system-font): Declare for byte-compiler. | 7 | * 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." | |||
| 276 | (defun vc-hg-diff (files &optional oldvers newvers buffer) | 276 | (defun vc-hg-diff (files &optional oldvers newvers buffer) |
| 277 | "Get a difference report using hg between two revisions of FILES." | 277 | "Get a difference report using hg between two revisions of FILES." |
| 278 | (let* ((firstfile (car files)) | 278 | (let* ((firstfile (car files)) |
| 279 | (cwd (if firstfile (file-name-directory firstfile) | ||
| 280 | (expand-file-name default-directory))) | ||
| 281 | (working (and firstfile (vc-working-revision firstfile)))) | 279 | (working (and firstfile (vc-working-revision firstfile)))) |
| 282 | (when (and (equal oldvers working) (not newvers)) | 280 | (when (and (equal oldvers working) (not newvers)) |
| 283 | (setq oldvers nil)) | 281 | (setq oldvers nil)) |
| 284 | (when (and (not oldvers) newvers) | 282 | (when (and (not oldvers) newvers) |
| 285 | (setq oldvers working)) | 283 | (setq oldvers working)) |
| 286 | (apply #'vc-hg-command (or buffer "*vc-diff*") nil | 284 | (apply #'vc-hg-command (or buffer "*vc-diff*") nil files "diff" |
| 287 | (mapcar (lambda (file) (file-relative-name file cwd)) files) | ||
| 288 | "diff" | ||
| 289 | (append | 285 | (append |
| 290 | (vc-switches 'hg 'diff) | 286 | (vc-switches 'hg 'diff) |
| 291 | (when oldvers | 287 | (when oldvers |