From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bernhard Herzog Newsgroups: gmane.emacs.devel Subject: Re: Patch to make vc-hg.el work with remote files Date: Wed, 28 Oct 2009 19:05:11 +0100 Message-ID: <200910281905.12147.bernhard.herzog@intevation.de> References: <200910251856.04156.bernhard.herzog@intevation.de> <200910271301.24348.bernhard.herzog@intevation.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1256755884 7765 80.91.229.12 (28 Oct 2009 18:51:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Oct 2009 18:51:24 +0000 (UTC) Cc: Stefan Monnier To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 28 19:51:17 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N3Dbq-0003Nj-Si for ged-emacs-devel@m.gmane.org; Wed, 28 Oct 2009 19:51:11 +0100 Original-Received: from localhost ([127.0.0.1]:56734 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N3Dbn-0006M4-Sz for ged-emacs-devel@m.gmane.org; Wed, 28 Oct 2009 14:50:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N3Ctd-0001Ln-VB for emacs-devel@gnu.org; Wed, 28 Oct 2009 14:05:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N3CtZ-0001HT-9Y for emacs-devel@gnu.org; Wed, 28 Oct 2009 14:05:21 -0400 Original-Received: from [199.232.76.173] (port=49983 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N3CtY-0001HD-S1 for emacs-devel@gnu.org; Wed, 28 Oct 2009 14:05:16 -0400 Original-Received: from aktaia.intevation.org ([212.95.126.10]:56283 helo=kolab.intevation.de) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N3CtY-0007nH-AR for emacs-devel@gnu.org; Wed, 28 Oct 2009 14:05:16 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by kolab.intevation.de (Postfix) with ESMTP id 9F5F694D145; Wed, 28 Oct 2009 19:05:13 +0100 (CET) X-Virus-Scanned: by amavisd-new at intevation.de Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by kolab.intevation.de (Postfix) with ESMTP id 0E27E94D147; Wed, 28 Oct 2009 19:05:13 +0100 (CET) Original-Received: from euarne.hq.intevation.de (euarne.hq.intevation.de [192.168.11.56]) (Authenticated sender: bernhard.herzog@intevation.de) by kolab.intevation.de (Postfix) with ESMTP id E47CE94D145; Wed, 28 Oct 2009 19:05:12 +0100 (CET) User-Agent: KMail/1.9.10 (enterprise35 20091010.1035632) In-Reply-To: X-KMail-QuotePrefix: > Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:116443 Archived-At: 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