diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-10-28 02:05:46 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-10-28 02:05:46 +0000 |
commit | cc63d28f93ad7a2da75d9368d61e7fcd758f3eb3 (patch) | |
tree | 40147e0810e8a5f6d941cda0fa7372fcec4daa0d /lisp/vc-hg.el | |
parent | 3064457307967db23a5c2636100901fee37cf7ef (diff) | |
download | emacs-cc63d28f93ad7a2da75d9368d61e7fcd758f3eb3.tar.gz |
(vc-hg-state, vc-hg-working-revision): Use process-file so
it works on remote files.
(vc-hg-diff): Don't pass any `--cwd' argument.
Diffstat (limited to 'lisp/vc-hg.el')
-rw-r--r-- | lisp/vc-hg.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el index 8443257efa2..b5c55d783f6 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el @@ -159,6 +159,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." "Hg-specific version of `vc-state'." (let* ((status nil) + (default-directory (file-name-directory file)) (out (with-output-to-string (with-current-buffer @@ -166,9 +167,9 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (setq status (condition-case nil ;; Ignore all errors. - (call-process - "hg" nil t nil "--cwd" (file-name-directory file) - "status" "-A" (file-name-nondirectory file)) + (process-file + "hg" nil t nil + "status" "-A" (file-relative-name file)) ;; Some problem happened. E.g. We can't find an `hg' ;; executable. (error nil))))))) @@ -190,6 +191,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." "Hg-specific version of `vc-working-revision'." (let* ((status nil) + (default-directory (file-name-directory file)) (out (with-output-to-string (with-current-buffer @@ -197,9 +199,9 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (setq status (condition-case nil ;; Ignore all errors. - (call-process - "hg" nil t nil "--cwd" (file-name-directory file) - "log" "-l1" (file-name-nondirectory file)) + (process-file + "hg" nil t nil + "log" "-l1" (file-relative-name file)) ;; Some problem happened. E.g. We can't find an `hg' ;; executable. (error nil))))))) @@ -286,7 +288,6 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (setq oldvers working)) (apply #'vc-hg-command (or buffer "*vc-diff*") nil (mapcar (lambda (file) (file-relative-name file cwd)) files) - "--cwd" cwd "diff" (append (vc-switches 'hg 'diff) |