GNU bug report logs - #993
23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin

Previous Next

Package: emacs;

Reported by: Eric Hanchrow <offby1 <at> blarg.net>

Date: Wed, 17 Sep 2008 20:20:03 UTC

Severity: normal

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 993 in the body.
You can then email your comments to 993 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#993; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Eric Hanchrow <offby1 <at> blarg.net>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Eric Hanchrow <offby1 <at> blarg.net>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin
Date: Wed, 17 Sep 2008 13:14:48 -0700
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




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#993; Package emacs. 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>. Full text and rfc822 format available.

Message #10 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eric Hanchrow <offby1 <at> blarg.net>
Cc: 993 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
Subject: Re: bug#993: 23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin
Date: Wed, 17 Sep 2008 21:21:18 -0400
> 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





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#993; Package emacs. 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>. Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#993; Package emacs. Full text and rfc822 format available.

Message #18 received at 993 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Eric Hanchrow <offby1 <at> blarg.net>, 993 <at> debbugs.gnu.org
Subject: Re: bug#993: 23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin
Date: Tue, 28 Oct 2008 22:18:27 -0400
Presumably this is now fixed, owing to these changes:


2008-10-25  Stefan Monnier  <monnier <at> 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...




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#993; Package emacs. Full text and rfc822 format available.

Message #21 received at 993 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 993 <at> debbugs.gnu.org
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>,
        Eric Hanchrow <offby1 <at> blarg.net>
Subject: Re: bug#993: 23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin
Date: Tue, 28 Oct 2008 23:02:14 -0400
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 "\\`/[^/]+\\'".




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#993; Package emacs. 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>. Full text and rfc822 format available.

Message #26 received at 993 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 993 <at> debbugs.gnu.org, Eric Hanchrow <offby1 <at> blarg.net>
Subject: Re: bug#993: 23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin
Date: Wed, 29 Oct 2008 10:49:21 -0400
>> 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




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#993; Package emacs. 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>. Full text and rfc822 format available.

Message #31 received at 993 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 993 <at> debbugs.gnu.org, Eric Hanchrow <offby1 <at> blarg.net>
Subject: Re: bug#993: 23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin
Date: Wed, 29 Oct 2008 11:05:58 -0400
>> 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




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#993; Package emacs. Full text and rfc822 format available.

Message #34 received at 993 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 993 <at> debbugs.gnu.org, Eric Hanchrow <offby1 <at> blarg.net>
Subject: Re: bug#993: 23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin
Date: Wed, 29 Oct 2008 12:42:26 -0400
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.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#993; Package emacs. Full text and rfc822 format available.

Message #37 received at 993 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 993 <at> debbugs.gnu.org
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>,
        Eric Hanchrow <offby1 <at> blarg.net>
Subject: Re: bug#993: 23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin
Date: Wed, 29 Oct 2008 14:58:14 -0400
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 "/".)




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#993; Package emacs. Full text and rfc822 format available.

Message #40 received at 993 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 993 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#993: 23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin
Date: Wed, 29 Oct 2008 15:11:55 -0400
BTW, is the "\\\." in the default value for
locate-dominating-stop-dir-regexp a typo?




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#993; Package emacs. 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>. Full text and rfc822 format available.

Message #45 received at 993 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 993 <at> debbugs.gnu.org
Subject: Re: bug#993: 23.0.60; vc-find-root heuristic unreliable on Windows with Cygwin
Date: Wed, 29 Oct 2008 21:07:16 -0400
> BTW, is the "\\\." in the default value for
> locate-dominating-stop-dir-regexp a typo?

Indeed.


        Stefan




bug closed, send any further explanations to Eric Hanchrow <offby1 <at> blarg.net> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Thu, 30 Oct 2008 06:40:04 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <don <at> donarmstrong.com> to internal_control <at> emacsbugs.donarmstrong.com. (Thu, 27 Nov 2008 15:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 265 days ago.

Previous Next


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