From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#55871: Acknowledgement (27.1; vc-git.el log view 'a', 'f', 'd' do not work when following renames) Date: Fri, 15 Dec 2023 22:45:24 +0200 Message-ID: <91c5ddd8-f351-8762-abca-a577acdb942d@yandex.ru> References: <78f97339-2aca-0dbd-4cb4-3532af78a895@yandex.ru> <1b16a642-8a85-e693-66fc-41c37df24908@yandex.ru> <36b48587-a723-73ae-fefb-886d69d04ec8@yandex.ru> <83y1dvobun.fsf@gnu.org> <83o7ero61t.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13118"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: 55871-done@debbugs.gnu.org, n.oje.bar@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 15 21:46:26 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rEF4j-0003Bt-Fj for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Dec 2023 21:46:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rEF4O-0006X8-Fx; Fri, 15 Dec 2023 15:46:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rEF4M-0006Wa-8C for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2023 15:46:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rEF4L-0000Nn-Qs for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2023 15:46:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rEF4L-0008Tr-Sj for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2023 15:46:01 -0500 Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Dec 2023 20:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 55871 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 55871@debbugs.gnu.org, dgutov@yandex.ru, n.oje.bar@gmail.com Original-Received: via spool by 55871-done@debbugs.gnu.org id=D55871.170267313829967 (code D ref 55871); Fri, 15 Dec 2023 20:46:01 +0000 Original-Received: (at 55871-done) by debbugs.gnu.org; 15 Dec 2023 20:45:38 +0000 Original-Received: from localhost ([127.0.0.1]:53617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEF3y-0007lf-1s for submit@debbugs.gnu.org; Fri, 15 Dec 2023 15:45:38 -0500 Original-Received: from forward501c.mail.yandex.net ([178.154.239.209]:49502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEF3u-0007ZE-DJ for 55871-done@debbugs.gnu.org; Fri, 15 Dec 2023 15:45:36 -0500 Original-Received: from mail-nwsmtp-smtp-production-main-91.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-91.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:8193:0:640:59c7:0]) by forward501c.mail.yandex.net (Yandex) with ESMTP id A1FD26104C; Fri, 15 Dec 2023 23:45:31 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-91.iva.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id TjsFhjGOm4Y0-TNUI1zUR; Fri, 15 Dec 2023 23:45:31 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1702673131; bh=sePrBRgr0cQUhugwjDMJlVlJ5gLnMizQqvsJIZMIqwU=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=eATK/U4zY7Kjuaz+8tq727zyKcoWQ3j+AkeqFnXGQibGTIGi1ADcnJ2TNGpN807tL aT2/VWufBBT4iITaHE1aB204x9FviK9meODwUcygAbwPJsMsm3JBohPoId6f3ZXB7t m3SIlh8W1nluGUfF3Z6qAcfkxZlleOJSk79m1F5U= Authentication-Results: mail-nwsmtp-smtp-production-main-91.iva.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id D544B27C0054; Fri, 15 Dec 2023 15:45:28 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 15 Dec 2023 15:45:28 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvddtvddgudeflecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughguhhtohhvseihrghnuggvgidrrhhuqeenucggtffrrg htthgvrhhnpeduhfefueduveefgfdtieegtedutefgheelueegfefgkeehhfeljefgheff tdelhfenucffohhmrghinhepghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpegughhuthhovhdomhgvshhmthhprghuthhhphgv rhhsohhnrghlihhthidqudeffeefleelheehvddqvdelgeejjeejjeeiqdgughhuthhovh eppeihrghnuggvgidrrhhusehfrghsthhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 15 Dec 2023 15:45:27 -0500 (EST) Content-Language: en-US In-Reply-To: <83o7ero61t.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:276288 Archived-At: Version: 30.1 On 15/12/2023 17:10, Eli Zaretskii wrote: >> Date: Fri, 15 Dec 2023 16:39:04 +0200 >> Cc: 55871@debbugs.gnu.org, n.oje.bar@gmail.com >> From: Dmitry Gutov >> >>> FYI: 'd' and 'f' work with bzr without any changes. >> >> To my understanding, Bazaar doesn't really exist in this day and age, so >> should we pay extra attention to it in this NEWS entry? > > Bazaar is still being developed, but I don't know how important it is > nowadays. I do use it here, FWIW (and keep the old repository under > Bazaar, from before the switch, for the rare occasion I need to look > up or try something there). I'm hoping this change will make it easier to investigate old changesets, so you won't need to keep a separate repository (I do have several worktrees for Emacs around, but they're all managed by Git). >> We could say that the problem is relevant to Git and Hg, and the current >> solution only helps Git. I'm not sure what's the best phrasing, however, >> which won't bloat the NEWS entry too much. > > That'd be fine, and the wording could just use what you say above. Ah well, while investigating what Hg does and does not, I ended up implementing the change for it as well. Problem is, while it "natively tracks renames", it likewise requires a "--follow" flag, which is only supported in "hg log" but not "hg diff". So we just as well have to dig around to find what were the previous names. That's what the new vc-hg-file-name-changes does, except in a less reliable way than the Git solution (WRT odd file names). >>> 'a' doesn't work >>> (evidently, "bzr annotate -r REVISION FILE" doesn't work when FILE did >>> not exist in REVISION, but was renamed by a later revision, and one >>> needs to run "bzr status -Sr REVISION" and look for the "renamed" >>> report in the result, which will then provide the previous name). >> >> But when we're asking for 'annotate' for a file in some old revision >> (under old name), it won't be the same revision where it had been >> renamed, 99% of the time. > > It doesn't matter. The above-mentioned bzr command will show the > telltale "RM old => new" status. Keep in mind that "-r REVISION" in > bzr means "since REVISION till the current head". Ah, you mean some code will need to search through the changes up until revision to find all renames anyway? I suppose that could be implemented in vc-bzr-annotate (independent of this changeset). >>> (FTR: I used src/unexcoff.c file to test this.) >>> >>>> +*** Support for viewing file change history across renames. >>>> +When a fileset's VC change history ends at a rename, we now print the >>>> +old name(s) and a button which jumps to their history. Only supported >>>> +with Git at the moment. >>> >>> I think this should at least tell that for files under Bazaar, the VC >>> change history will always include the renames. Looks like Mercurial >>> is in the same department as Git? >> >> More or less, yes, here's an even older bug report: >> https://debbugs.gnu.org/13004 >> >>> If so, I think the text should say >>> that this is not supported for Mercurial yet, and that Bazaar shows >>> the entire history, including renames, by default. Or something like >>> that. >> >> I don't want to make it a sticking point, but according to the wiki >> entry Monotone also tracks renames. We won't be mentioning it here, will we? > > vc-monotone is not part of Emacs, right? We do have vc-mtn.el in lisp/obsolete. Anyway... I've pushed the change to master (5b80894d0a7) to encourage wider testing. There are some potential follow-ups remaining (e.g. the question whether the "old" log should start with the exact same revision as the one that the "new" log ended at -- that makes a difference in some edge cases), but they should be small enough. Either way, looking forward to the feedback (and if you want to do any edits to the NEWS entry, please go ahead).