emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#37182: closed (24.5; 24.5.1: C-u vc-dir-mark-all-files should not ma


From: GNU bug Tracking System
Subject: bug#37182: closed (24.5; 24.5.1: C-u vc-dir-mark-all-files should not mark directories)
Date: Tue, 11 Feb 2020 22:32:01 +0000

Your message dated Wed, 12 Feb 2020 00:31:30 +0200
with message-id <address@hidden>
and subject line Re: bug#37182: Acknowledgement (24.5; 24.5.1: C-u 
vc-dir-mark-all-files should not mark directories)
has caused the debbugs.gnu.org bug report #37182,
regarding 24.5; 24.5.1: C-u vc-dir-mark-all-files should not mark directories
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden.)


-- 
37182: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=37182
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.5; 24.5.1: C-u vc-dir-mark-all-files should not mark directories Date: Sun, 25 Aug 2019 19:54:22 +0200 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2
In a *vc-dir* buffer of a mercurial or git repository, it appears to be
the intention, that marking both a directory and files inside the
directory is invalid.

1. When a directory is marked,

   - trying to mark a file in the directory raises the error:

       vc-dir-mark-file: Parent directory `./' is already marked

   - trying to mark all files with `C-u M' raises the error:

       Cannot mark all files, directory `./' marked

2. When a file is marked,

   - trying to mark the parent directory raises the error:

       vc-dir-mark-file: File `xx' in this directory is already marked

3. However, when no directories are marked,

   - marking all files with the key sequence `C-u M', results in all
     directories and all files to be marked

   - trying to mark all files again with `C-u M' raises the error:

       Cannot mark all files, directory `./' marked

This behavior is inconsistent.

The following patch against the savannah repository fixes it:

diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 9a6f6bb..567da65 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -667,7 +667,8 @@ share the same state."
      vc-ewoc)
     (ewoc-map
      (lambda (filearg)
-       (unless (vc-dir-fileinfo->marked filearg)
+       (unless (or (vc-dir-fileinfo->directory filearg)
+               (vc-dir-fileinfo->marked filearg))
          (setf (vc-dir-fileinfo->marked filearg) t)
          t))
      vc-ewoc))




--- End Message ---
--- Begin Message --- Subject: Re: bug#37182: Acknowledgement (24.5; 24.5.1: C-u vc-dir-mark-all-files should not mark directories) Date: Wed, 12 Feb 2020 00:31:30 +0200 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0
Version: 27.1

On 05.02.2020 16:24, Eli Zaretskii wrote:
Yes, but please also fix the doc string to clearly say what happens
with directories.

Done, I think.


--- End Message ---

reply via email to

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