GNU bug report logs - #16254
24.3.50; bzr error on emacs trunk using vc-print-log

Previous Next

Package: emacs;

Reported by: Christoph <cschol2112 <at> gmail.com>

Date: Wed, 25 Dec 2013 17:27:02 UTC

Severity: normal

Found in version 24.3.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Christoph <cschol2112 <at> gmail.com>
To: 16254 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#16254: 24.3.50; [PATCH] bzr error on emacs trunk using vc-print-log
Date: Mon, 30 Dec 2013 08:53:39 -0700
[Message part 1 (text/plain, inline)]
It would be nice if a fix for this issue made it into 24.4. Or do you think
that this is too intrusive of a change?

I'll add Changelog entries etc. and commit it if someone can look it over.

Thanks.

On Thu, Dec 26, 2013 at 7:47 PM, Christoph <cschol2112 <at> gmail.com> wrote:

> This issue seems to be that when deducing the fileset in dired mode, the
> code does not distinguish between files that are under version control and
> files that aren't.
>
> The following patch adds detection (and filtering) of unregistered members
> to vc-dired-deduce-fileset.
> If the marked files have any unregistered files among them, the
> unregistered files are filtered out.
> If all files are unregistered, an error is shown. This also covers the
> main case of selecting just one unregistered file/directory.
>
> Thoughts?
>
> === modified file 'lisp/vc/vc.el'
> --- lisp/vc/vc.el 2013-11-26 19:17:55 +0000
> +++ lisp/vc/vc.el 2013-12-27 02:40:38 +0000
> @@ -1014,10 +1014,19 @@
>       (t (error "File is not under version control")))))
>
>  (defun vc-dired-deduce-fileset ()
> -  (let ((backend (vc-responsible-backend default-directory)))
> -    (unless backend (error "Directory not under VC"))
> -    (list backend
> -          (dired-map-over-marks (dired-get-filename nil t) nil))))
> +  "Deduce a set of files and a backend to which to apply an
> +operation from all the marked items in a dired buffer. Resulting
> +fileset only includes items that are version controlled."
> +  (let ((backend (vc-responsible-backend default-directory))
> +        (fileset
> +         (delq nil (mapcar
> +                    (lambda (x) (if (not (equal (vc-backend x) nil)) x))
> +                    (dired-map-over-marks
> +                     (dired-get-filename nil t)
> +                     nil)))))
> +    (if (not fileset)
> +        (error "Marked fileset is not under version control")
> +      (list backend fileset))))
>
>  (defun vc-ensure-vc-buffer ()
>    "Make sure that the current buffer visits a version-controlled file."
>
[Message part 2 (text/html, inline)]

This bug report was last modified 4 years and 312 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.