* bug#3807: 23.1.50; vc-dir ignores .gitignore
@ 2009-07-10 9:20 Helmut Eller
2009-07-10 19:29 ` Dan Nicolaescu
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Helmut Eller @ 2009-07-10 9:20 UTC (permalink / raw)
To: emacs-pretest-bug
I use git to manage some files (.emacs, .bashrc etc.) in my home
directory and hg for a project in a directory named ~/lisp/slime/.
I have both, a ~/.git and a ~/lisp/slime/.hg directory
and my ~/.gitignore contains a line with: lisp*
However when I invoke C-x v d on ~/lisp/slime, a buffer
pops up with the first (wrong) line: VC backend : Git
and lists most of the files from the ~/lisp/slime directory
as "unregistered". Obviously, I would prefer to use the hg backend
for the ~/lisp/slime directory.
On the other hand: if I open a file in ~/lisp/slime the modeline
correctly displays hg and commands like C-x v l or C-x v = correctly
use the hg backend.
Helmut.
In GNU Emacs 23.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.12.11)
of 2009-07-10 on ix
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
configured using `configure '--with-xpm=no' '--with-gif=no' '--with-tiff=no' '--with-sound=no''
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#3807: 23.1.50; vc-dir ignores .gitignore
2009-07-10 9:20 bug#3807: 23.1.50; vc-dir ignores .gitignore Helmut Eller
@ 2009-07-10 19:29 ` Dan Nicolaescu
2009-07-15 19:06 ` Stefan Monnier
2009-07-14 18:54 ` Dan Nicolaescu
2020-10-26 20:14 ` bug#3807: (no subject) Lars Ingebrigtsen
2 siblings, 1 reply; 6+ messages in thread
From: Dan Nicolaescu @ 2009-07-10 19:29 UTC (permalink / raw)
To: Helmut Eller; +Cc: 3807
Helmut Eller <eller.helmut@gmail.com> writes:
> I use git to manage some files (.emacs, .bashrc etc.) in my home
> directory and hg for a project in a directory named ~/lisp/slime/.
> I have both, a ~/.git and a ~/lisp/slime/.hg directory
> and my ~/.gitignore contains a line with: lisp*
>
> However when I invoke C-x v d on ~/lisp/slime, a buffer
> pops up with the first (wrong) line: VC backend : Git
> and lists most of the files from the ~/lisp/slime directory
> as "unregistered". Obviously, I would prefer to use the hg backend
> for the ~/lisp/slime directory.
>
> On the other hand: if I open a file in ~/lisp/slime the modeline
> correctly displays hg and commands like C-x v l or C-x v = correctly
> use the hg backend.
What happens here is: vc-dir calls (vc-responsible-backend "~/lisp/slime"),
which calls (vc-git-responsible-p "~/lisp/slime")
and that returns t because all vc-git-responsible-p does is to see if
~/lisp/slime is dominated by a .git directory. And it is.
You can easily work around this by changing the order of git and hg in
vc-handled-backends in your .emacs, like this:
(setq vc-handled-backends '(RCS CVS SVN SCCS Bzr Hg Git Mtn Arch))
We could make `vc-git-responsible-p' (and all the other functions that
do the same) not return t in this case, but I doubt it's worth the added
extra complexity.
Stefan, what do you think?
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#3807: 23.1.50; vc-dir ignores .gitignore
2009-07-10 19:29 ` Dan Nicolaescu
@ 2009-07-15 19:06 ` Stefan Monnier
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2009-07-15 19:06 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: 3807, Helmut Eller
> We could make `vc-git-responsible-p' (and all the other functions that
> do the same) not return t in this case, but I doubt it's worth the added
> extra complexity.
> Stefan, what do you think?
I think that rather than having an external loop for all backends which
inside walks up the diretory hierarchy, we need an external loop which
walks up the directory hierarchy and inside loops over all backends.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#3807: 23.1.50; vc-dir ignores .gitignore
2009-07-10 9:20 bug#3807: 23.1.50; vc-dir ignores .gitignore Helmut Eller
2009-07-10 19:29 ` Dan Nicolaescu
@ 2009-07-14 18:54 ` Dan Nicolaescu
2009-07-14 21:13 ` Helmut Eller
2020-10-26 20:14 ` bug#3807: (no subject) Lars Ingebrigtsen
2 siblings, 1 reply; 6+ messages in thread
From: Dan Nicolaescu @ 2009-07-14 18:54 UTC (permalink / raw)
To: Helmut Eller; +Cc: 3807
Helmut Eller <eller.helmut@gmail.com> writes:
> I use git to manage some files (.emacs, .bashrc etc.) in my home
> directory and hg for a project in a directory named ~/lisp/slime/.
> I have both, a ~/.git and a ~/lisp/slime/.hg directory
> and my ~/.gitignore contains a line with: lisp*
>
> However when I invoke C-x v d on ~/lisp/slime, a buffer
> pops up with the first (wrong) line: VC backend : Git
> and lists most of the files from the ~/lisp/slime directory
> as "unregistered". Obviously, I would prefer to use the hg backend
> for the ~/lisp/slime directory.
>
> On the other hand: if I open a file in ~/lisp/slime the modeline
> correctly displays hg and commands like C-x v l or C-x v = correctly
> use the hg backend.
There's a generic workaround for problems like this: use
C-u C-x v d
to start vc-dir, it will prompt for the VC backend to use.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#3807: 23.1.50; vc-dir ignores .gitignore
2009-07-14 18:54 ` Dan Nicolaescu
@ 2009-07-14 21:13 ` Helmut Eller
0 siblings, 0 replies; 6+ messages in thread
From: Helmut Eller @ 2009-07-14 21:13 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: 3807
* Dan Nicolaescu [2009-07-14 20:54+0200] writes:
> > However when I invoke C-x v d on ~/lisp/slime, a buffer
> > pops up with the first (wrong) line: VC backend : Git
> > and lists most of the files from the ~/lisp/slime directory
> > as "unregistered". Obviously, I would prefer to use the hg backend
> > for the ~/lisp/slime directory.
> >
> > On the other hand: if I open a file in ~/lisp/slime the modeline
> > correctly displays hg and commands like C-x v l or C-x v = correctly
> > use the hg backend.
>
> There's a generic workaround for problems like this: use
> C-u C-x v d
> to start vc-dir, it will prompt for the VC backend to use.
It's kinda inconsistent that vc-find-file-hook and vc-dir choose
different backends, but fair enough, I can live with the prefix arg.
Helmut.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#3807: (no subject)
2009-07-10 9:20 bug#3807: 23.1.50; vc-dir ignores .gitignore Helmut Eller
2009-07-10 19:29 ` Dan Nicolaescu
2009-07-14 18:54 ` Dan Nicolaescu
@ 2020-10-26 20:14 ` Lars Ingebrigtsen
2 siblings, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-26 20:14 UTC (permalink / raw)
To: Helmut Eller; +Cc: 3807
Helmut Eller <eller.helmut@gmail.com> writes:
> I use git to manage some files (.emacs, .bashrc etc.) in my home
> directory and hg for a project in a directory named ~/lisp/slime/.
> I have both, a ~/.git and a ~/lisp/slime/.hg directory
> and my ~/.gitignore contains a line with: lisp*
>
> However when I invoke C-x v d on ~/lisp/slime, a buffer
> pops up with the first (wrong) line: VC backend : Git
> and lists most of the files from the ~/lisp/slime directory
> as "unregistered". Obviously, I would prefer to use the hg backend
> for the ~/lisp/slime directory.
This has now been fixed in Emacs 28 in bug#42966, I think.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-10-26 20:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-10 9:20 bug#3807: 23.1.50; vc-dir ignores .gitignore Helmut Eller
2009-07-10 19:29 ` Dan Nicolaescu
2009-07-15 19:06 ` Stefan Monnier
2009-07-14 18:54 ` Dan Nicolaescu
2009-07-14 21:13 ` Helmut Eller
2020-10-26 20:14 ` bug#3807: (no subject) Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).