From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.bugs Subject: bug#3807: 23.1.50; vc-dir ignores .gitignore Date: Fri, 10 Jul 2009 12:29:55 -0700 (PDT) Message-ID: <200907101929.n6AJTt7v025635@godzilla.ics.uci.edu> References: Reply-To: Dan Nicolaescu , 3807@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1247255869 15870 80.91.229.12 (10 Jul 2009 19:57:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 Jul 2009 19:57:49 +0000 (UTC) Cc: 3807@emacsbugs.donarmstrong.com To: Helmut Eller Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 10 21:57:42 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MPME0-0001ks-Mm for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Jul 2009 21:57:41 +0200 Original-Received: from localhost ([127.0.0.1]:48694 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MPME0-0001Ed-7K for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Jul 2009 15:57:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MPMDu-0001CB-ND for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2009 15:57:34 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MPMDq-00019q-0N for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2009 15:57:34 -0400 Original-Received: from [199.232.76.173] (port=36888 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MPMDp-00019c-Ra for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2009 15:57:29 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:52672) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MPMDp-0000E0-Ah for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2009 15:57:29 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6AJvRbx016845; Fri, 10 Jul 2009 12:57:27 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n6AJe6cb013818; Fri, 10 Jul 2009 12:40:06 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 10 Jul 2009 19:40:06 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3807 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3807-submit@emacsbugs.donarmstrong.com id=B3807.124725421312325 (code B ref 3807); Fri, 10 Jul 2009 19:40:06 +0000 Original-Received: (at 3807) by emacsbugs.donarmstrong.com; 10 Jul 2009 19:30:13 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from sallyv2.ics.uci.edu (sallyv2.ics.uci.edu [128.195.1.120]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6AJU9NY012172 for <3807@emacsbugs.donarmstrong.com>; Fri, 10 Jul 2009 12:30:10 -0700 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by sallyv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n6AJTu7u022804; Fri, 10 Jul 2009 12:29:56 -0700 (PDT) Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n6AJTt7v025635; Fri, 10 Jul 2009 12:29:55 -0700 (PDT) In-Reply-To: (Helmut Eller's message of "Fri, 10 Jul 2009 11:20:20 +0200") Original-Lines: 31 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n6AJTu7u022804 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.03, required 5, autolearn=disabled, ALL_TRUSTED -1.44, SUBJECT_FUZZY_TION 0.41) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Fri, 10 Jul 2009 15:57:34 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:29301 Archived-At: Helmut Eller 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?