From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#21383: Static revisions in vc-working-revision Date: Thu, 03 Sep 2015 12:04:35 -0400 Message-ID: References: <55E41499.5030501@yandex.ru> <55E5094A.3010108@yandex.ru> <55E59487.1050804@yandex.ru> <55E5CA42.1080005@yandex.ru> <55E5DF1A.9010902@yandex.ru> <55E6D426.10105@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1441296942 31271 80.91.229.3 (3 Sep 2015 16:15:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Sep 2015 16:15:42 +0000 (UTC) Cc: 21383-done@debbugs.gnu.org, Jonathan H To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 03 18:15:32 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZXXAg-0008Pr-1X for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Sep 2015 18:15:30 +0200 Original-Received: from localhost ([::1]:49937 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXXAf-0000Xo-UE for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Sep 2015 12:15:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXX0c-0007aU-6t for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2015 12:05:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXX0Z-0003BT-1Y for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2015 12:05:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55609) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXX0Y-0003BH-Ta for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2015 12:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZXX0Y-0005R7-F9 for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2015 12:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Sep 2015 16:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21383 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21383-done@debbugs.gnu.org id=D21383.144129628020846 (code D ref 21383); Thu, 03 Sep 2015 16:05:02 +0000 Original-Received: (at 21383-done) by debbugs.gnu.org; 3 Sep 2015 16:04:40 +0000 Original-Received: from localhost ([127.0.0.1]:47819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZXX0C-0005Q8-Er for submit@debbugs.gnu.org; Thu, 03 Sep 2015 12:04:40 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:43363) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZXX09-0005Pz-Q1 for 21383-done@debbugs.gnu.org; Thu, 03 Sep 2015 12:04:38 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t83G4ZwF010505; Thu, 3 Sep 2015 12:04:36 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 0EC5466110; Thu, 3 Sep 2015 12:04:35 -0400 (EDT) In-Reply-To: <55E6D426.10105@yandex.ru> (Dmitry Gutov's message of "Wed, 2 Sep 2015 13:49:10 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5418=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5418> : inlines <3752> : streams <1499229> : uri <2031713> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:106113 Archived-At: > Yes. But as long as its only limited to the backends (and can be fixed > there), as opposed to being inherently present in vc.el, log-edit.el, etc, > it's less of a problem. I think the problem is in the contract between VC itself and the backends, because VC mostly assumes that default-directory doesn't matter and uses absolute file names instead (that was the original design), whereas for many backends this is sometimes inconvenient so they occasionally rely on default-directory instead, which happens to work as well, tho it's mostly an accident. > vc-file-setprop won't work on a relative path. Or shouldn't, at least. Clearly, what I suggest would require changes in the core VC code, yes. > And are you talking about FILE arg to vc-status, or e.g. vc-git-status? vc-git-status (and other backend operations). > And vc-git-working-revision won't care if FILE is absolute or relative, > which is the crux of the problem. I'd rather backends like Git, if we're > going to fix this, used FILE's parent directory to change default-directory > temporarily before calling Git. Right, we could fix the problem by keeping the original design and making sure the backends actually follow it, but I'm not sure it's the better design nowadays (and since using default-directory happens to work in 99% of the cases, it's hard to make sure we really fix all cases where we incorrectly rely on default-directory being the right parent of the absolute file names we get). Stefan