GNU bug report logs -
#4206
23.1; vc-dir bug with git
Previous Next
Reported by: Tom Tromey <tromey <at> redhat.com>
Date: Thu, 20 Aug 2009 20:34:59 UTC
Severity: normal
Tags: moreinfo
Fixed in version 23.2
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4206 in the body.
You can then email your comments to 4206 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4206
; Package
emacs
.
(Thu, 20 Aug 2009 20:34:59 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Tom Tromey <tromey <at> redhat.com>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Thu, 20 Aug 2009 20:35:00 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.
Your bug report will be posted to the bug-gnu-emacs <at> gnu.org mailing list,
and to the gnu.emacs.bug news group.
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
I ran vc-dir on a git checkout that I have.
I have some unregistered subdirectories in this checkout,
for example autom4te.cache (created by autoconf).
In the *vc-dir* buffer I see:
gdb/testsuite/autom4te.cache/
unregistered gdb/testsuite/autom4te.cache/
That is, the directory is listed twice.
This seems weird to me. Is this intentional?
I think it should only be listed once.
If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
`bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/23.1/etc/DEBUG for instructions.
In GNU Emacs 23.1.1 (i386-redhat-linux-gnu, GTK+ Version 2.16.5)
of 2009-08-03 on x86-5.fedora.phx.redhat.com
Windowing system distributor `The X.Org Foundation', version 11.0.10601901
configured using `configure '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--target=i586-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm' '--with-x-toolkit=gtk' 'build_alias=i386-redhat-linux-gnu' 'host_alias=i386-redhat-linux-gnu' 'target_alias=i586-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i586 -mtune=generic -fasynchronous-unwind-tables''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default-enable-multibyte-characters: t
Major mode: Group
Minor modes in effect:
erc-list-mode: t
erc-menu-mode: t
erc-autojoin-mode: t
erc-ring-mode: t
erc-pcomplete-mode: t
erc-track-mode: t
erc-track-minor-mode: t
erc-match-mode: t
erc-button-mode: t
erc-fill-mode: t
erc-stamp-mode: t
erc-netsplit-mode: t
erc-spelling-mode: t
erc-truncate-mode: t
diff-auto-refine-mode: t
shell-dirtrack-mode: t
gnus-undo-mode: t
highlight-changes-visible-mode: t
erc-status-mode: t
erc-services-mode: t
erc-networks-mode: t
erc-irccontrols-mode: t
erc-noncommands-mode: t
erc-move-to-prompt-mode: t
erc-readonly-mode: t
tooltip-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<return> C-x o C-x 1 M-> <f10> <f10> <f10> <f10> <f10>
<f10> <help-echo> <f10> <f10> <f10> <f10> <switch-frame>
<help-echo> <switch-frame> " s e t SPC v a r i a b
l e " <return> I SPC u s u a l l y SPC j u s t SPC
u s e SPC " p r i n t " SPC s h o <M-backspace> t h
o u g h <return> l i k e SPC <backspace> : S-SPC SPC
p SPC x SPC = SPC 5 <return> <f10> <f10> <f10> <f10>
<f10> <f10> <f10> <help-echo> <f10> <f10> <help-echo>
<f10> <f10> <f10> C-c b <f10> C-c b <f10> <f10> <f10>
<f10> <f10> <f10> <f10> <f10> C-z o C-x b * g u <tab>
<return> q <return> y <return> C-c b C-e C-a C-p C-p
C-k C-k C-k C-o C-n C-e M-b M-b M-b M-b <M-backspace>
<M-backspace> TAB C-n TAB C-a C-n C-p C-p C-e C-k M-SPC
C-n C-a C-M-SPC C-M-\ C-M-f <return> } C-a C-u C-u
C-p C-l C-p C-p C-p C-s = C-b <return> C-a C-u C-u
C-p C-l C-x C-s <switch-frame> <switch-frame> <switch-frame>
<f10> <f10> <f10> <f10> <f10> <f10> <f10> <f10> <f10>
C-c b <f10> <f10> <f10> <f10> <f10> <f10> <f10> C-z
o C-x b * G <tab> <return> 1 g C-z o <f10> <f10> <f10>
C-x v d <M-backspace> <M-backspace> <M-backspace> a
r <tab> <return> C-x 1 C-u C-n C-n C-n C-n C-h c i
C-h c I C-h w v c - i g <tab> <tab> C-g C-g C-g C-h
c d C-u C-n C-n C-n C-n f C-v C-v C-v C-v C-v C-v C-v
C-v C-v C-v C-x k <return> <f10> <f10> <switch-frame>
C-z o <f10> <f10> <f10> <f10> C-z o M-x r e p o r t
- e m <tab> <return>
Recent messages:
Wrote /home/tromey/Mail/mail/other/275197
Wrote /home/tromey/Mail/mail/other/275198
nnml: Reading incoming mail (15 new)...done
Opening nnml server on private...done
Opening nnml server...done
Checking new news...done
i runs the command vc-register
I is undefined
Quit [3 times]
d is undefined
call-interactively: End of buffer
Tom
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4206
; Package
emacs
.
(Fri, 21 Aug 2009 04:20:05 GMT)
Full text and
rfc822 format available.
Message #8 received at 4206 <at> emacsbugs.donarmstrong.com (full text, mbox):
Tom Tromey <tromey <at> redhat.com> writes:
> Please write in English if possible, because the Emacs maintainers
> usually do not have translators to read other languages for them.
>
> Your bug report will be posted to the bug-gnu-emacs <at> gnu.org mailing list,
> and to the gnu.emacs.bug news group.
>
> Please describe exactly what actions triggered the bug
> and the precise symptoms of the bug:
>
>
> I ran vc-dir on a git checkout that I have.
> I have some unregistered subdirectories in this checkout,
> for example autom4te.cache (created by autoconf).
>
> In the *vc-dir* buffer I see:
>
> gdb/testsuite/autom4te.cache/
> unregistered gdb/testsuite/autom4te.cache/
>
> That is, the directory is listed twice.
>
> This seems weird to me. Is this intentional?
> I think it should only be listed once.
Not really intentional.
vc-dir assumes that vc-git-dir-status returns only files, that's why it
gets confused when it gets a directory with the "unregistered" state.
What's the right thing to do here?
vc-git-register does not support (yet?) passing directories as an
argument.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4206
; Package
emacs
.
(Fri, 21 Aug 2009 17:50:07 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Tom Tromey <tromey <at> redhat.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Fri, 21 Aug 2009 17:50:07 GMT)
Full text and
rfc822 format available.
Message #13 received at 4206 <at> emacsbugs.donarmstrong.com (full text, mbox):
>>>>> "Dan" == Dan Nicolaescu <dann <at> ics.uci.edu> writes:
Dan> What's the right thing to do here?
Dan> vc-git-register does not support (yet?) passing directories as an
Dan> argument.
I think the best situation would be for vc-dir to understand
unregistered directories (and not display them twice), and for
vc-git-register to be able to run "git add" on a directory. "git add
DIR" usually does the right thing and in any case if it "overshoots" it
can be corrected.
Tom
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4206
; Package
emacs
.
(Sun, 23 Aug 2009 12:05:05 GMT)
Full text and
rfc822 format available.
Message #16 received at 4206 <at> emacsbugs.donarmstrong.com (full text, mbox):
Tom Tromey <tromey <at> redhat.com> writes:
> >>>>> "Dan" == Dan Nicolaescu <dann <at> ics.uci.edu> writes:
>
> Dan> What's the right thing to do here?
> Dan> vc-git-register does not support (yet?) passing directories as an
> Dan> argument.
>
> I think the best situation would be for vc-dir to understand
> unregistered directories (and not display them twice), and for
> vc-git-register to be able to run "git add" on a directory.
The patch below helps.
But the *vc-dir* buffer does not get updated correctly.
Maybe vc-git-dir-status-files does not work quite right, but it's hard
to tell without being a low level git expert.
> "git add DIR" usually does the right thing and in any case if it "overshoots" it
> can be corrected.
It seems that vc-git-revert does not revert files in the 'added state to
'unregistered state. It does not seem that all VC backends behave
consistently in this situation :-(
--- vc-dir.el.~1.40.~ 2009-08-20 23:40:25.000000000 -0700
+++ vc-dir.el 2009-08-23 04:02:01.000000000 -0700
@@ -326,8 +326,9 @@ If BODY uses EVENT, it should be a varia
(or (vc-dir-fileinfo->directory data)
;; Otherwise compute it from the file name.
(file-name-directory
- (expand-file-name
- (vc-dir-fileinfo->name data))))))
+ (directory-file-name
+ (expand-file-name
+ (vc-dir-fileinfo->name data)))))))
(defun vc-dir-update (entries buffer &optional noinsert)
"Update BUFFER's ewoc from the list of ENTRIES.
@@ -343,8 +344,10 @@ If NOINSERT, ignore elements on ENTRIES
;; names too many times
(sort entries
(lambda (entry1 entry2)
- (let ((dir1 (file-name-directory (expand-file-name (car entry1))))
- (dir2 (file-name-directory (expand-file-name (car entry2)))))
+ (let ((dir1 (file-name-directory
+ (directory-file-name (expand-file-name (car entry1)))))
+ (dir2 (file-name-directory
+ (directory-file-name (expand-file-name (car entry2))))))
(cond
((string< dir1 dir2) t)
((not (string= dir1 dir2)) nil)
@@ -362,7 +365,8 @@ If NOINSERT, ignore elements on ENTRIES
(while (and entry node)
(let* ((entryfile (car entry))
- (entrydir (file-name-directory (expand-file-name entryfile)))
+ (entrydir (file-name-directory (directory-file-name
+ (expand-file-name entryfile))))
(nodedir (vc-dir-node-directory node)))
(cond
;; First try to find the directory.
@@ -406,7 +410,8 @@ If NOINSERT, ignore elements on ENTRIES
(unless (or node noinsert)
(let ((lastdir (vc-dir-node-directory (ewoc-nth vc-ewoc -1))))
(dolist (entry entries)
- (let ((entrydir (file-name-directory (expand-file-name (car entry)))))
+ (let ((entrydir (file-name-directory
+ (directory-file-name (expand-file-name (car entry))))))
;; Insert a directory node if needed.
(unless (string-equal lastdir entrydir)
(setq lastdir entrydir)
Index: vc-git.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc-git.el,v
retrieving revision 1.86
diff -u -3 -p -u -p -r1.86 vc-git.el
--- vc-git.el 21 Aug 2009 03:37:37 -0000 1.86
+++ vc-git.el 23 Aug 2009 11:06:39 -0000
@@ -425,7 +425,15 @@ If nil, use the value of `vc-diff-switch
(defun vc-git-register (files &optional rev comment)
"Register FILE into the git version-control system."
- (vc-git-command nil 0 files "update-index" "--add" "--"))
+ (let (flist dlist)
+ (dolist (crt files)
+ (if (file-directory-p crt)
+ (push crt dlist)
+ (push crt flist)))
+ (when flist
+ (vc-git-command nil 0 flist "update-index" "--add" "--"))
+ (when dlist
+ (vc-git-command nil 0 dlist "add"))))
(defalias 'vc-git-responsible-p 'vc-git-root)
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4206
; Package
emacs
.
(Tue, 25 Aug 2009 18:00:05 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> IRO.UMontreal.CA>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Tue, 25 Aug 2009 18:00:05 GMT)
Full text and
rfc822 format available.
Message #21 received at 4206 <at> emacsbugs.donarmstrong.com (full text, mbox):
> It seems that vc-git-revert does not revert files in the 'added state to
> 'unregistered state. It does not seem that all VC backends behave
> consistently in this situation :-(
The first thing to do is to decide which behavior is preferable, and
to document it in the leading comments of vc.el.
Stefan
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4206
; Package
emacs
.
(Tue, 25 Aug 2009 18:55:08 GMT)
Full text and
rfc822 format available.
Message #24 received at 4206 <at> emacsbugs.donarmstrong.com (full text, mbox):
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:
> > It seems that vc-git-revert does not revert files in the 'added state to
> > 'unregistered state. It does not seem that all VC backends behave
> > consistently in this situation :-(
>
> The first thing to do is to decide which behavior is preferable, and
> to document it in the leading comments of vc.el.
IMO it would be better if vc-revert of a file in 'added state should
put it to 'unregistered. We don't have another way to do this in VC,
and this is a very intuitive UI.
WDYT?
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4206
; Package
emacs
.
(Tue, 25 Aug 2009 21:20:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> IRO.UMontreal.CA>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Tue, 25 Aug 2009 21:20:04 GMT)
Full text and
rfc822 format available.
Message #29 received at 4206 <at> emacsbugs.donarmstrong.com (full text, mbox):
>> > It seems that vc-git-revert does not revert files in the 'added state to
>> > 'unregistered state. It does not seem that all VC backends behave
>> > consistently in this situation :-(
>>
>> The first thing to do is to decide which behavior is preferable, and
>> to document it in the leading comments of vc.el.
> IMO it would be better if vc-revert of a file in 'added state should
> put it to 'unregistered. We don't have another way to do this in VC,
> and this is a very intuitive UI.
Agreed.
Stefan
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4206
; Package
emacs
.
(Thu, 10 Dec 2009 19:50:06 GMT)
Full text and
rfc822 format available.
Message #32 received at 4206 <at> emacsbugs.donarmstrong.com (full text, mbox):
Is this still a problem with the current CVS?
Added tag(s) moreinfo.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Wed, 20 Jan 2010 01:41:02 GMT)
Full text and
rfc822 format available.
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Tue, 27 Mar 2012 19:01:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Tom Tromey <tromey <at> redhat.com>
:
bug acknowledged by developer.
(Tue, 27 Mar 2012 19:01:02 GMT)
Full text and
rfc822 format available.
Message #39 received at 4206-done <at> debbugs.gnu.org (full text, mbox):
Version: 23.2
Dan Nicolaescu wrote:
> Is this still a problem with the current CVS?
AFAICS, this is fixed in 23.2 and later.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 25 Apr 2012 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 56 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.