[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch to make vc-hg.el work with remote files
From: |
Bernhard Herzog |
Subject: |
Re: Patch to make vc-hg.el work with remote files |
Date: |
Wed, 28 Oct 2009 19:05:11 +0100 |
User-agent: |
KMail/1.9.10 (enterprise35 20091010.1035632) |
On 28.10.2009, Stefan Monnier wrote:
> > Indeed. Here's a new patch.
>
> Thanks, installed.
Great!
> But I wonder about the last hunk of your patch:
> > @@ -286,7 +288,6 @@
> > (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)
>
> What is the reason for it?
The reason I changed vc-hg-diff at all was that it doesn't work correctly with
tramp. cwd is the name of the directory containing the file to diff and if
file is on a remote system it's a tramp filename which mercurial doesn't
understand, of course.
I've looked a bit closer at it now and AFAICT vc-hg-diff can be made even
simpler and probably more correct by passing files unmodified to
vc-hg-command. I don't have the time right now to test and produce a better
patch, though. I hope to get around to that tomorrow.
Does anybody know why in vc-hg.el vc-hg-command is sometimes called directly
and sometimes via apply?
Regards
Bernhard