emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch to make vc-hg.el work with remote files


From: Dan Nicolaescu
Subject: Re: Patch to make vc-hg.el work with remote files
Date: Mon, 2 Nov 2009 13:58:07 -0800 (PST)

Bernhard Herzog <address@hidden> writes:

  > On 28.10.2009, Bernhard Herzog wrote:
  > > 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.
  > 
  > It took a while longer, but here's the new patch:

Was this tested with filesets that contain: multiple files, multiple
directories and a mix of files and directories.  And starting
from a subdirectory of the Hg root?
The previous change caused this regression:
 http://permalink.gmane.org/gmane.emacs.devel/116585
does this patch fix it?

  > Index: lisp/vc-hg.el
  > ===================================================================
  > RCS file: /sources/emacs/emacs/lisp/vc-hg.el,v
  > retrieving revision 1.105
  > diff -u -r1.105 vc-hg.el
  > --- lisp/vc-hg.el   28 Oct 2009 02:05:50 -0000      1.105
  > +++ lisp/vc-hg.el   2 Nov 2009 21:16:15 -0000
  > @@ -279,16 +279,12 @@
  >  (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
  > 
  > regards
  > 
  >   Bernhard





reply via email to

[Prev in Thread] Current Thread [Next in Thread]