* bug#993: 23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin
@ 2008-09-17 20:14 Eric Hanchrow
2008-09-18 1:21 ` Stefan Monnier
0 siblings, 1 reply; 10+ messages in thread
From: Eric Hanchrow @ 2008-09-17 20:14 UTC (permalink / raw
To: emacs-pretest-bug
I visited a file that was in a git working tree, and expected to see
"Git-master" in the mode line, but didn't.
Some investigation revealed that the file I visited was owned by
"Administrator", whereas the ".git" directory was owned by "erich".
(It's not clear why these two related files have different owners, but
this happens rather a lot when I use Cygwin). Anyway, the code in
vc-find-root explicitly stops looking for a .git directory once it's
determined that some parent of the file in question has a different
owner. This heuristic probably works fine on every other platform, but
perhaps it should be disabled on Windows, since the situation it's
trying to prevent -- namely, "looking in things like /net and /afs" --
is unlikely to occur on that platform anyway.
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
c:/cygwin/usr/local/src/emacs-via-git/etc/DEBUG for instructions.
In GNU Emacs 23.0.60.1 (i386-mingw-nt6.0.6001)
of 2008-09-17 on ERICH-DEV
Windowing system distributor `Microsoft Corp.', version 6.0.6001
configured using `configure --with-gcc (3.4)'
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: nil
value of $XMODIFIERS: nil
locale-coding-system: cp1252
default-enable-multibyte-characters: t
Major mode: Emacs-Lisp
Minor modes in effect:
eldoc-mode: t
erc-autojoin-mode: t
erc-match-mode: t
erc-log-mode: t
erc-services-mode: t
erc-networks-mode: t
desktop-save-mode: t
recentf-mode: t
display-time-mode: t
global-auto-revert-mode: t
diff-auto-refine-mode: t
shell-dirtrack-mode: t
iswitchb-mode: t
tooltip-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-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:
SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC
SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC
SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC
SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC c c c c c c
C-x o C-M-x C-x b s h e <return> l l SPC . SPC d e
<tab> m <tab> C-a C-f C-f C-SPC - d C-b C-b SPC C-f
C-f C-f C-k c : / SPC c : / d e <tab> m <tab> SPC c
: / d e <tab> m <tab> i <tab> <return> m v SPC c :
/ d e <tab> m <tab> SPC ~ / <return> c d <return> c
v h o <backspace> <backspace> <backspace> <backspace>
l l SPC - d <return> l l SPC - d SPC d e m o <return>
c h o w n SPC - R SPC e r i c h SPC d e m o <return>
C-x b . t x <return> C-x C-v C-a C-d C-d ~ <return>
C-x v l C-x 1 q M-x M-p M-p M-p <return> C-x v l q
C-x 0 C-x b i n i <return> C-x b w i n <return> C-s
c y g C-w - m C-a C-n C-e C-n C-a C-M-n C-x C-e C-x
b C-s <return> C-x d / u s r / l o c <tab> s r <tab>
<return> q C-c C-a C-x b . e l C-s C-s C-s <return>
C-s C-w C-w C-w C-s C-s C-s C-s M-b C-x F <return>
C-x n d C-x C-n w C-x C-u C-g C-x u C-x n w M-x r e
p o r t - e m <tab> <return>
Recent messages:
Menu-bar mode disabled. Use M-x menu-bar-mode to make the menu bar appear.
Mark saved where search started
Activating cygwin-mount ... done
"Activating cygwin-mount ... done"
Mark saved where search started
Mark set
Type y, n, ! or SPC (the space bar):
Quit
Undo!
Scanning for dabbrevs...100%
--
I don't care where he was born. He's one of us, in all the ways
that matter most. (Even, perhaps, in the groping.)
-- Steven Den Beste, on Arnold Schwarzenegger
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#993: 23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin
2008-09-17 20:14 bug#993: 23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin Eric Hanchrow
@ 2008-09-18 1:21 ` Stefan Monnier
2008-10-29 2:18 ` Glenn Morris
0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2008-09-18 1:21 UTC (permalink / raw
To: Eric Hanchrow; +Cc: emacs-pretest-bug, 993
> Some investigation revealed that the file I visited was owned by
> "Administrator", whereas the ".git" directory was owned by "erich".
The owner of the .git directory is irrelevant, IIUC. What matter is the
owner of the directory in which is the .git subdirectory.
> this happens rather a lot when I use Cygwin). Anyway, the code in
> vc-find-root explicitly stops looking for a .git directory once it's
> determined that some parent of the file in question has a different
> owner. This heuristic probably works fine on every other platform, but
> perhaps it should be disabled on Windows, since the situation it's
> trying to prevent -- namely, "looking in things like /net and /afs" --
> is unlikely to occur on that platform anyway.
Actually, some of the problems that the owner-heuristic tries to address
are major slowdowns under w32 because of //<hostname>/ samba shares
(it's never been quite clear from where exactly does the slowdown come,
tho).
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#993: 23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin
2008-09-18 1:21 ` Stefan Monnier
@ 2008-10-29 2:18 ` Glenn Morris
2008-10-29 3:02 ` Glenn Morris
0 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2008-10-29 2:18 UTC (permalink / raw
To: Stefan Monnier; +Cc: Eric Hanchrow, 993
Presumably this is now fixed, owing to these changes:
2008-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
* files.el (locate-dominating-stop-dir-regexp): New var.
(locate-dominating-file): Change arg from a regexp to a file name.
Rewrite using the vc-find-root code to avoid directory-files which is
too slow. Obey locate-dominating-stop-dir-regexp.
Don't pay attention to changes in owner.
[...]
* vc-hooks.el (vc-find-root): Use locate-dominating-file.
(vc-ignore-dir-regexp): Use locate-dominating-stop-dir-regexp.
Though now I have a bunch of bogus automounter queries cluttering up
my logs again, which I have some vague memory was the reason for the
change of ownership test in the first place...
Oct 28 18:39:02 foo automount[2831]: lookup_mount: lookup(yp): key
".hg" not found in map
Oct 28 18:39:02 foo automount[2831]: lookup_mount: lookup(yp): key
"_MTN" not found in map
Oct 28 18:39:02 foo automount[2831]: lookup_mount: lookup(yp): key
"{arch}" not found in map
Oct 28 18:39:03 foo automount[2831]: lookup_mount: lookup(yp): key
".dir-settings.el" not found in map
Time to customize locate-dominating-stop-dir-regexp I suppose...
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#993: 23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin
2008-10-29 2:18 ` Glenn Morris
@ 2008-10-29 3:02 ` Glenn Morris
2008-10-29 14:49 ` Stefan Monnier
2008-10-29 15:05 ` Stefan Monnier
0 siblings, 2 replies; 10+ messages in thread
From: Glenn Morris @ 2008-10-29 3:02 UTC (permalink / raw
To: 993; +Cc: Eric Hanchrow
Glenn Morris wrote:
> Time to customize locate-dominating-stop-dir-regexp I suppose...
BTW, it seems you are stopping one directory too late, in that in
order to stop Emacs looking up things like "/afs/.hg", I have to an
add an element of the form "\\`/afs/[^/]+\\'".
In other words, locate-dominating-stop-dir-regexp is the last
directory in which you _do_ scan, whereas it might be simpler if it
were the first _not_ scanned.
I would also suggest adding /home and perhaps /nfs, as well as /afs
and /net, to the default. Actually, I don't see why the default stop
should not just match "\\`/[^/]+\\'".
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#993: 23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin
2008-10-29 3:02 ` Glenn Morris
@ 2008-10-29 14:49 ` Stefan Monnier
2008-10-29 16:42 ` Glenn Morris
2008-10-29 15:05 ` Stefan Monnier
1 sibling, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2008-10-29 14:49 UTC (permalink / raw
To: Glenn Morris; +Cc: Eric Hanchrow, 993
>> Time to customize locate-dominating-stop-dir-regexp I suppose...
> BTW, it seems you are stopping one directory too late, in that in
> order to stop Emacs looking up things like "/afs/.hg", I have to an
> add an element of the form "\\`/afs/[^/]+\\'".
Looks like a bug, then.
> In other words, locate-dominating-stop-dir-regexp is the last
> directory in which you _do_ scan, whereas it might be simpler if it
> were the first _not_ scanned.
That was the intention, and it worked like that at some point.
> I would also suggest adding /home and perhaps /nfs, as well as /afs
> and /net, to the default. Actually, I don't see why the default stop
> should not just match "\\`/[^/]+\\'".
/home might be OK. "\\`/[^/]+\\'" is not, because several people use
revision control for /etc.
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#993: 23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin
2008-10-29 3:02 ` Glenn Morris
2008-10-29 14:49 ` Stefan Monnier
@ 2008-10-29 15:05 ` Stefan Monnier
1 sibling, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2008-10-29 15:05 UTC (permalink / raw
To: Glenn Morris; +Cc: Eric Hanchrow, 993
>> Time to customize locate-dominating-stop-dir-regexp I suppose...
> BTW, it seems you are stopping one directory too late, in that in
> order to stop Emacs looking up things like "/afs/.hg", I have to an
> add an element of the form "\\`/afs/[^/]+\\'".
I just tried it and it seems to work correctly for me (/net/toto was
not tried in (l-d-f "/net/foo/bar" "toto")). Can you take a closer look?
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#993: 23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin
2008-10-29 14:49 ` Stefan Monnier
@ 2008-10-29 16:42 ` Glenn Morris
2008-10-29 18:58 ` Glenn Morris
0 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2008-10-29 16:42 UTC (permalink / raw
To: Stefan Monnier; +Cc: Eric Hanchrow, 993
Stefan Monnier wrote:
>> In other words, locate-dominating-stop-dir-regexp is the last
>> directory in which you _do_ scan, whereas it might be simpler if it
>> were the first _not_ scanned.
>
> That was the intention, and it worked like that at some point.
I will check to see if I was talking rubbish when I said it was not...
> "\\`/[^/]+\\'" is not, because several people use revision control
> for /etc.
Yes, you are right.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#993: 23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin
2008-10-29 16:42 ` Glenn Morris
@ 2008-10-29 18:58 ` Glenn Morris
2008-10-29 19:11 ` Glenn Morris
[not found] ` <18696.46415.755564.556955@fencepost.gnu.org>
0 siblings, 2 replies; 10+ messages in thread
From: Glenn Morris @ 2008-10-29 18:58 UTC (permalink / raw
To: 993; +Cc: Eric Hanchrow
Glenn Morris wrote:
> I will check to see if I was talking rubbish when I said it was not...
I'm sorry, that was my mistake. (When I customized
l-d-stop-dir-regexp, I forgot to add a trailing "/".)
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#993: 23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin
2008-10-29 18:58 ` Glenn Morris
@ 2008-10-29 19:11 ` Glenn Morris
[not found] ` <18696.46415.755564.556955@fencepost.gnu.org>
1 sibling, 0 replies; 10+ messages in thread
From: Glenn Morris @ 2008-10-29 19:11 UTC (permalink / raw
To: 993, Stefan Monnier
BTW, is the "\\\." in the default value for
locate-dominating-stop-dir-regexp a typo?
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#993: 23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin
[not found] ` <18696.46415.755564.556955@fencepost.gnu.org>
@ 2008-10-30 1:07 ` Stefan Monnier
0 siblings, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2008-10-30 1:07 UTC (permalink / raw
To: Glenn Morris; +Cc: 993
> BTW, is the "\\\." in the default value for
> locate-dominating-stop-dir-regexp a typo?
Indeed.
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-10-30 1:07 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-17 20:14 bug#993: 23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin Eric Hanchrow
2008-09-18 1:21 ` Stefan Monnier
2008-10-29 2:18 ` Glenn Morris
2008-10-29 3:02 ` Glenn Morris
2008-10-29 14:49 ` Stefan Monnier
2008-10-29 16:42 ` Glenn Morris
2008-10-29 18:58 ` Glenn Morris
2008-10-29 19:11 ` Glenn Morris
[not found] ` <18696.46415.755564.556955@fencepost.gnu.org>
2008-10-30 1:07 ` Stefan Monnier
2008-10-29 15:05 ` Stefan Monnier
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.