From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#39704: 28.0.50; vc-print-branch-log data loss Date: Fri, 21 Feb 2020 01:32:35 +0200 Organization: LINKOV.NET Message-ID: <871rqoj0mk.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="94439"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) To: 39704@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 21 01:11:15 2020 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 1j4vuU-000OSj-Pn for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 21 Feb 2020 01:11:15 +0100 Original-Received: from localhost ([::1]:50682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4vuT-00089o-Mb for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Feb 2020 19:11:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:61000) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4vuJ-00089N-Iz for bug-gnu-emacs@gnu.org; Thu, 20 Feb 2020 19:11:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j4vuI-0007WN-Kp for bug-gnu-emacs@gnu.org; Thu, 20 Feb 2020 19:11:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40155) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j4vuI-0007WI-Hy for bug-gnu-emacs@gnu.org; Thu, 20 Feb 2020 19:11:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j4vuI-0005CV-Bv for bug-gnu-emacs@gnu.org; Thu, 20 Feb 2020 19:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Feb 2020 00:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39704 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.158224383519913 (code B ref -1); Fri, 21 Feb 2020 00:11:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Feb 2020 00:10:35 +0000 Original-Received: from localhost ([127.0.0.1]:46119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j4vtr-0005B7-73 for submit@debbugs.gnu.org; Thu, 20 Feb 2020 19:10:35 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:43003) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j4vtp-0005B0-Ra for submit@debbugs.gnu.org; Thu, 20 Feb 2020 19:10:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60958) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4vto-00082v-Qs for bug-gnu-emacs@gnu.org; Thu, 20 Feb 2020 19:10:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j4vtn-0007A6-Hv for bug-gnu-emacs@gnu.org; Thu, 20 Feb 2020 19:10:32 -0500 Original-Received: from elephant.ash.relay.mailchannels.net ([23.83.222.57]:11200) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j4vtm-000745-MN for bug-gnu-emacs@gnu.org; Thu, 20 Feb 2020 19:10:31 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id BA7C820C39 for ; Fri, 21 Feb 2020 00:10:25 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a86.g.dreamhost.com (100-96-0-7.trex.outbound.svc.cluster.local [100.96.0.7]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 37EB420B78 for ; Fri, 21 Feb 2020 00:10:25 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a86.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Fri, 21 Feb 2020 00:10:25 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Attack-Dime: 25251ba374d46d0c_1582243825446_1818334750 X-MC-Loop-Signature: 1582243825445:2144076842 X-MC-Ingress-Time: 1582243825445 Original-Received: from pdx1-sub0-mail-a86.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a86.g.dreamhost.com (Postfix) with ESMTP id 714D37EFDF for ; Thu, 20 Feb 2020 16:10:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to :subject:date:message-id:mime-version:content-type; s= linkov.net; bh=w7u6nHGFlW8yKiGD8iAyzIZQduY=; b=ibAcyRiCGYOLY0oba VgVcFcEo99vIXF6xpooOiWrwIpyTA86ux4hfOW1iyD9YvmO3bwAcrikQnPis9PRt I0xUYI6XjBAy2OHlHFrgrsyzZy5SfBnsm8Yekm04C/vc9Gj4egZIQNnsVkxCCBJL /C9uFAgFF3TUSkeCbIV7dQ51TU= Original-Received: from localhost.linkov.net (m91-129-103-27.cust.tele2.ee [91.129.103.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a86.g.dreamhost.com (Postfix) with ESMTPSA id 3B3887F048 for ; Thu, 20 Feb 2020 16:10:22 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a86 X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: 0 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrkeefgddvtdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufhofffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrddvjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehlohgtrghlhhhoshhtrdhlihhnkhhovhdrnhgvthdpihhnvghtpeeluddruddvledruddtfedrvdejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepsghughdqghhnuhdqvghmrggtshesghhnuhdrohhrgh X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:176326 Archived-At: Tags: patch Accidentally I noticed that vc-print-branch-log prints a narrower log than it should. I don't remember any damage from this data loss but this is not the right thing to do - by default it should show logs from the repository root, not logs limited to a subdirectory when this command happens to be called from a subdirectory. Am I correct to expect that vc-print-branch-log should print log from branch's root like vc-print-root-log does, and not from a subdirectory like vc-print-log does? diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index f7d651fac6..13d60b6fcf 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2559,9 +2590,11 @@ vc-print-branch-log (vc-read-revision "Branch to log: "))) (when (equal branch "") (error "No branch specified")) - (vc-print-log-internal (vc-responsible-backend default-directory) - (list default-directory) branch t - (when (> vc-log-show-limit 0) vc-log-show-limit))) + (let* ((backend (vc-responsible-backend default-directory)) + (rootdir (vc-call-backend backend 'root default-directory))) + (vc-print-log-internal backend + (list rootdir) branch t + (when (> vc-log-show-limit 0) vc-log-show-limit)))) ;;;###autoload (defun vc-log-incoming (&optional remote-location)