all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#16254: 24.3.50; bzr error on emacs trunk using vc-print-log
@ 2013-12-25 17:25 Christoph
  2013-12-25 17:54 ` Christoph
  2013-12-30 15:53 ` bug#16254: 24.3.50; [PATCH] " Christoph
  0 siblings, 2 replies; 9+ messages in thread
From: Christoph @ 2013-12-25 17:25 UTC (permalink / raw)
  To: 16254


Running `vc-print-log` on a directory containing the Emacs trunk gives
the following error:

bzr: ERROR: Path unknown at end or start of revision range: aclocal.m4



In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.2)
 of 2013-12-14 on marvin
Bzr revision: 115528 tzz@lifelogs.com-20131214195519-pi759t6a59vg9b1i
Windowing system distributor `The X.Org Foundation', version 11.0.11103000
System Description:	Linux Mint 13 Maya





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#16254: 24.3.50; bzr error on emacs trunk using vc-print-log
  2013-12-25 17:25 bug#16254: 24.3.50; bzr error on emacs trunk using vc-print-log Christoph
@ 2013-12-25 17:54 ` Christoph
  2013-12-25 18:22   ` Christoph
  2013-12-30 15:53 ` bug#16254: 24.3.50; [PATCH] " Christoph
  1 sibling, 1 reply; 9+ messages in thread
From: Christoph @ 2013-12-25 17:54 UTC (permalink / raw)
  To: 16254

[-- Attachment #1: Type: text/plain, Size: 870 bytes --]

Some more information on this issue:

`vc-print-log` works find in a sub-directory of the tree, e.g. admin.
It looks like aclocal.m4 is ignored via .bzrignore and it is the first file
in the root tree (after running configure and such).

I seem to remember we had a similar problem before that was fixed at some
point.


On Wed, Dec 25, 2013 at 10:25 AM, Christoph <cschol2112@gmail.com> wrote:

>
> Running `vc-print-log` on a directory containing the Emacs trunk gives
> the following error:
>
> bzr: ERROR: Path unknown at end or start of revision range: aclocal.m4
>
>
>
> In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.2)
>  of 2013-12-14 on marvin
> Bzr revision: 115528 tzz@lifelogs.com-20131214195519-pi759t6a59vg9b1i
> Windowing system distributor `The X.Org Foundation', version 11.0.11103000
> System Description:     Linux Mint 13 Maya
>

[-- Attachment #2: Type: text/html, Size: 1281 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#16254: 24.3.50; bzr error on emacs trunk using vc-print-log
  2013-12-25 17:54 ` Christoph
@ 2013-12-25 18:22   ` Christoph
  2013-12-25 18:35     ` Christoph
  0 siblings, 1 reply; 9+ messages in thread
From: Christoph @ 2013-12-25 18:22 UTC (permalink / raw)
  To: 16254, Stefan Monnier

[-- Attachment #1: Type: text/plain, Size: 1714 bytes --]

vc-print-log was executed from a dired buffer when this happened.
vc-print-root-log works correctly and prints the Emacs bzr logs.

vc.el has the following code in vc-print-log:

  (let* ((vc-fileset (vc-deduce-fileset t)) ;FIXME: Why t? --Stef
 (backend (car vc-fileset))
 (files (cadr vc-fileset))
;; (working-revision (or working-revision (vc-working-revision (car
files))))
         )
    (vc-print-log-internal backend files working-revision nil limit)))

The t in vc-decude-fileset allows unregistered files per the documentation.
To follow Stefan's questions, why would we want unregistered files to be
included in the fileset for the log command?

I think this should be changed to disallow unregistered files.

Christoph


On Wed, Dec 25, 2013 at 10:54 AM, Christoph <cschol2112@gmail.com> wrote:

> Some more information on this issue:
>
> `vc-print-log` works find in a sub-directory of the tree, e.g. admin.
> It looks like aclocal.m4 is ignored via .bzrignore and it is the first
> file in the root tree (after running configure and such).
>
> I seem to remember we had a similar problem before that was fixed at some
> point.
>
>
> On Wed, Dec 25, 2013 at 10:25 AM, Christoph <cschol2112@gmail.com> wrote:
>
>>
>> Running `vc-print-log` on a directory containing the Emacs trunk gives
>> the following error:
>>
>> bzr: ERROR: Path unknown at end or start of revision range: aclocal.m4
>>
>>
>>
>> In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.2)
>>  of 2013-12-14 on marvin
>> Bzr revision: 115528 tzz@lifelogs.com-20131214195519-pi759t6a59vg9b1i
>> Windowing system distributor `The X.Org Foundation', version 11.0.11103000
>> System Description:     Linux Mint 13 Maya
>>
>
>

[-- Attachment #2: Type: text/html, Size: 2828 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#16254: 24.3.50; bzr error on emacs trunk using vc-print-log
  2013-12-25 18:22   ` Christoph
@ 2013-12-25 18:35     ` Christoph
  2013-12-27  2:47       ` Christoph
  0 siblings, 1 reply; 9+ messages in thread
From: Christoph @ 2013-12-25 18:35 UTC (permalink / raw)
  To: 16254, Stefan Monnier

[-- Attachment #1: Type: text/plain, Size: 1957 bytes --]

I was wrong. The t argument in vc-deduce-fileset does something else. Sorry
for the noise.



On Wed, Dec 25, 2013 at 11:22 AM, Christoph <cschol2112@gmail.com> wrote:

> vc-print-log was executed from a dired buffer when this happened.
> vc-print-root-log works correctly and prints the Emacs bzr logs.
>
> vc.el has the following code in vc-print-log:
>
>   (let* ((vc-fileset (vc-deduce-fileset t)) ;FIXME: Why t? --Stef
>  (backend (car vc-fileset))
>  (files (cadr vc-fileset))
> ;; (working-revision (or working-revision (vc-working-revision (car
> files))))
>          )
>     (vc-print-log-internal backend files working-revision nil limit)))
>
> The t in vc-decude-fileset allows unregistered files per the
> documentation. To follow Stefan's questions, why would we want unregistered
> files to be included in the fileset for the log command?
>
> I think this should be changed to disallow unregistered files.
>
> Christoph
>
>
> On Wed, Dec 25, 2013 at 10:54 AM, Christoph <cschol2112@gmail.com> wrote:
>
>> Some more information on this issue:
>>
>> `vc-print-log` works find in a sub-directory of the tree, e.g. admin.
>> It looks like aclocal.m4 is ignored via .bzrignore and it is the first
>> file in the root tree (after running configure and such).
>>
>> I seem to remember we had a similar problem before that was fixed at some
>> point.
>>
>>
>> On Wed, Dec 25, 2013 at 10:25 AM, Christoph <cschol2112@gmail.com> wrote:
>>
>>>
>>> Running `vc-print-log` on a directory containing the Emacs trunk gives
>>> the following error:
>>>
>>> bzr: ERROR: Path unknown at end or start of revision range: aclocal.m4
>>>
>>>
>>>
>>> In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.2)
>>>  of 2013-12-14 on marvin
>>> Bzr revision: 115528 tzz@lifelogs.com-20131214195519-pi759t6a59vg9b1i
>>> Windowing system distributor `The X.Org Foundation', version
>>> 11.0.11103000
>>> System Description:     Linux Mint 13 Maya
>>>
>>
>>
>

[-- Attachment #2: Type: text/html, Size: 3315 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#16254: 24.3.50; bzr error on emacs trunk using vc-print-log
  2013-12-25 18:35     ` Christoph
@ 2013-12-27  2:47       ` Christoph
  2020-09-09 13:01         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Christoph @ 2013-12-27  2:47 UTC (permalink / raw)
  To: 16254, Stefan Monnier

[-- Attachment #1: Type: text/plain, Size: 3775 bytes --]

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."



On Wed, Dec 25, 2013 at 11:35 AM, Christoph <cschol2112@gmail.com> wrote:

> I was wrong. The t argument in vc-deduce-fileset does something
> else. Sorry for the noise.
>
>
>
> On Wed, Dec 25, 2013 at 11:22 AM, Christoph <cschol2112@gmail.com> wrote:
>
>> vc-print-log was executed from a dired buffer when this happened.
>> vc-print-root-log works correctly and prints the Emacs bzr logs.
>>
>> vc.el has the following code in vc-print-log:
>>
>>   (let* ((vc-fileset (vc-deduce-fileset t)) ;FIXME: Why t? --Stef
>>  (backend (car vc-fileset))
>>  (files (cadr vc-fileset))
>> ;; (working-revision (or working-revision (vc-working-revision (car
>> files))))
>>          )
>>     (vc-print-log-internal backend files working-revision nil limit)))
>>
>> The t in vc-decude-fileset allows unregistered files per the
>> documentation. To follow Stefan's questions, why would we want unregistered
>> files to be included in the fileset for the log command?
>>
>> I think this should be changed to disallow unregistered files.
>>
>> Christoph
>>
>>
>> On Wed, Dec 25, 2013 at 10:54 AM, Christoph <cschol2112@gmail.com> wrote:
>>
>>> Some more information on this issue:
>>>
>>> `vc-print-log` works find in a sub-directory of the tree, e.g. admin.
>>> It looks like aclocal.m4 is ignored via .bzrignore and it is the first
>>> file in the root tree (after running configure and such).
>>>
>>> I seem to remember we had a similar problem before that was fixed at
>>> some point.
>>>
>>>
>>> On Wed, Dec 25, 2013 at 10:25 AM, Christoph <cschol2112@gmail.com>wrote:
>>>
>>>>
>>>> Running `vc-print-log` on a directory containing the Emacs trunk gives
>>>> the following error:
>>>>
>>>> bzr: ERROR: Path unknown at end or start of revision range: aclocal.m4
>>>>
>>>>
>>>>
>>>> In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.2)
>>>>  of 2013-12-14 on marvin
>>>> Bzr revision: 115528 tzz@lifelogs.com-20131214195519-pi759t6a59vg9b1i
>>>> Windowing system distributor `The X.Org Foundation', version
>>>> 11.0.11103000
>>>> System Description:     Linux Mint 13 Maya
>>>>
>>>
>>>
>>
>

[-- Attachment #2: Type: text/html, Size: 5938 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#16254: 24.3.50; [PATCH] bzr error on emacs trunk using vc-print-log
  2013-12-25 17:25 bug#16254: 24.3.50; bzr error on emacs trunk using vc-print-log Christoph
  2013-12-25 17:54 ` Christoph
@ 2013-12-30 15:53 ` Christoph
  2013-12-30 18:41   ` Glenn Morris
  1 sibling, 1 reply; 9+ messages in thread
From: Christoph @ 2013-12-30 15:53 UTC (permalink / raw)
  To: 16254, Stefan Monnier

[-- Attachment #1: Type: text/plain, Size: 2028 bytes --]

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@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."
>

[-- Attachment #2: Type: text/html, Size: 2880 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#16254: 24.3.50; [PATCH] bzr error on emacs trunk using vc-print-log
  2013-12-30 15:53 ` bug#16254: 24.3.50; [PATCH] " Christoph
@ 2013-12-30 18:41   ` Glenn Morris
  2013-12-30 19:03     ` Christoph
  0 siblings, 1 reply; 9+ messages in thread
From: Glenn Morris @ 2013-12-30 18:41 UTC (permalink / raw)
  To: Christoph; +Cc: 16254

Christoph wrote:

> 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?

24.4 is still some way off. BTW, it does not work correctly in 23.4 or
24.1, so it does not seem that urgent to me. It works fine from a vc-dir
buffer, just not a dired buffer.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#16254: 24.3.50; [PATCH] bzr error on emacs trunk using vc-print-log
  2013-12-30 18:41   ` Glenn Morris
@ 2013-12-30 19:03     ` Christoph
  0 siblings, 0 replies; 9+ messages in thread
From: Christoph @ 2013-12-30 19:03 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 16254

[-- Attachment #1: Type: text/plain, Size: 705 bytes --]

OK. I has bugged me long enough though that I finally sat down to work out
a fix.

It does work in vc-dir for edited files. vc-dir is not really an equivalent
use case though since it does not allow to show a full listing of
(up-to-date) files and hence to see their logs. Or am I missing something?


On Mon, Dec 30, 2013 at 11:41 AM, Glenn Morris <rgm@gnu.org> wrote:

> Christoph wrote:
>
> > 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?
>
> 24.4 is still some way off. BTW, it does not work correctly in 23.4 or
> 24.1, so it does not seem that urgent to me. It works fine from a vc-dir
> buffer, just not a dired buffer.
>

[-- Attachment #2: Type: text/html, Size: 1050 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#16254: 24.3.50; bzr error on emacs trunk using vc-print-log
  2013-12-27  2:47       ` Christoph
@ 2020-09-09 13:01         ` Lars Ingebrigtsen
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-09 13:01 UTC (permalink / raw)
  To: Christoph; +Cc: 16254, Stefan Monnier

Christoph <cschol2112@gmail.com> writes:

> 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.

[...]

>  (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)))))

The code in question has changed substantially since this patch was
proposed six years ago.  It's now:

(defun dired-vc-deduce-fileset (&optional state-model-only-files not-state-changing)
  (let ((backend (vc-responsible-backend default-directory))
        (files (dired-get-marked-files nil nil nil nil t))
        only-files-list
        state
        model)

If I'm reading it correctly, it...  more or less covers the same things
that this patch was supposed to do (but in a totally different way?), so
I guess this patch is no longer necessary.

So I'm closing this bug report.  If there still is something here that
needs fixing, please respond to the debbugs address, and we'll reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-09-09 13:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-25 17:25 bug#16254: 24.3.50; bzr error on emacs trunk using vc-print-log Christoph
2013-12-25 17:54 ` Christoph
2013-12-25 18:22   ` Christoph
2013-12-25 18:35     ` Christoph
2013-12-27  2:47       ` Christoph
2020-09-09 13:01         ` Lars Ingebrigtsen
2013-12-30 15:53 ` bug#16254: 24.3.50; [PATCH] " Christoph
2013-12-30 18:41   ` Glenn Morris
2013-12-30 19:03     ` Christoph

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.