mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
(vc-hg-diff): Fix last patch: do not change directory.
This commit is contained in:
parent
e0620570f0
commit
efa3639b40
2 changed files with 5 additions and 5 deletions
|
|
@ -1,3 +1,7 @@
|
|||
2009-11-18 Bernhard Herzog <bernhard.herzog@intevation.de>
|
||||
|
||||
* vc-hg.el (vc-hg-diff): Fix last patch: do not change directory.
|
||||
|
||||
2009-11-18 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* font-setting.el (font-use-system-font): Declare for byte-compiler.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue