From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 30 18:43:42 2013 Received: (at submit) by debbugs.gnu.org; 30 Jul 2013 22:43:42 +0000 Received: from localhost ([127.0.0.1]:59223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V4Idp-0000jL-RR for submit@debbugs.gnu.org; Tue, 30 Jul 2013 18:43:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43281) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V4Idn-0000j5-Ar for submit@debbugs.gnu.org; Tue, 30 Jul 2013 18:43:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4IdY-0005mG-RS for submit@debbugs.gnu.org; Tue, 30 Jul 2013 18:43:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4IdY-0005m7-Dd for submit@debbugs.gnu.org; Tue, 30 Jul 2013 18:43:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4IdP-0004p0-VI for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2013 18:43:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4IdH-0005iz-Ag for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2013 18:43:15 -0400 Received: from mail-we0-x229.google.com ([2a00:1450:400c:c03::229]:45157) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4IdH-0005ic-4o for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2013 18:43:07 -0400 Received: by mail-we0-f169.google.com with SMTP id n5so4939027wev.28 for ; Tue, 30 Jul 2013 15:43:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=rwAVQRcqoYoZxPFUXrNO0ohdUiQgQSftFEHnugNAj5A=; b=mYY3xIhOeTmYDc+yzArElrohTs2bhb2ysnwUc+lw9H3iTsth8M25FJM9D7xeZGspWQ iVAl9XbiKttvbTiVY9Y6gMkWqQcXfQJNjl6YvsUFzOmG/kP4kT5rh4VXVrj4UvUc+32U a3XwaB7dpjkbwvgdun1NSmQxkLYK7qhQmxKWCIM12o1Mi4mqz+BCVehVg24Dct6rqv9j zhJnNGWQxFWtFKIcesJCDp3c7lN4EV5TZrsXj8hYKGL7G32VZpA75LeqaCgSiCMJziim nyD/XsZMtBNkyE0SHUn/GKFsso1XYuJLTkKyRUVYKnnOAWP+Q5vgHgv8C4soi+2XI/VK c1xg== X-Received: by 10.180.208.17 with SMTP id ma17mr2417100wic.7.1375224186130; Tue, 30 Jul 2013 15:43:06 -0700 (PDT) Received: from axl (93-67-220.netrun.cytanet.com.cy. [93.109.67.220]) by mx.google.com with ESMTPSA id fd3sm31536915wic.10.2013.07.30.15.43.04 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 30 Jul 2013 15:43:05 -0700 (PDT) From: Dmitry Gutov To: bug-gnu-emacs@gnu.org Subject: 24.3.50; log-view-diff and log-view-diff-changeset default to different `to' revisions for git merge commits Date: Wed, 31 Jul 2013 01:42:57 +0300 Message-ID: <8738qv8ya6.fsf@axl.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) To reproduce: Have a merge commit where the second branch (merged from) has a newer last commit than the first branch (merged to). `vc-print-root-log' buffer would look like this: * (HEAD, devel)b044fba..: Some Guy 2013-07-25 foo foo * 2152d76..: Dmitry Gutov 2013-07-25 Merge branch 'bar' into devel |\ | * (bar)1554943..: Another Guy 2013-07-25 Abc | * f92770a..: Another Guy 2013-07-25 Def * | 5f5c068..: Another Guy 2013-07-25 Ghi If I move to commit 2152d76 and press `d', it will show the diff against 1554943. If I press `D', if will show the diff against 5f5c068, which is *the* parent commit, as far as Git is concerned (the first parent, to be more exact), because it belongs to the branch `devel', and the merge was done from `bar' to `devel'. Since this is a `vc-print-root-log' buffer, both commands will show the full changesets, not just changes in an individual file. But the behavior in `vc-print-log' is the same in this respect, except the diff `d' shows is just for the current file. `log-view-diff' behavior makes certain amount of sense (it always diffs against the revision on the line below), but it's inconsistent with `log-view-diff-changeset', and it also backfires when the current commit is not a child of the commit on the previous line. Example: f92770a and 5f5c068. As a result, we get a meaningless diff. This fix is simple enough. Apply? === modified file 'lisp/vc/log-view.el' --- lisp/vc/log-view.el 2013-06-11 06:36:06 +0000 +++ lisp/vc/log-view.el 2013-07-30 22:31:40 +0000 @@ -565,10 +565,7 @@ (let ((fr (log-view-current-tag beg)) (to (log-view-current-tag end))) (when (string-equal fr to) - (save-excursion - (goto-char end) - (log-view-msg-next) - (setq to (log-view-current-tag)))) + (setq to (vc-call-backend log-view-vc-backend 'previous-revision nil fr))) (vc-diff-internal t (list log-view-vc-backend (if log-view-per-file-logs The functions could also use some further cleanup: 1) Swap the `to' and `fr' local variables. 2) Extract the function bodies to one function with a third argument (called `whole-changeset', maybe), and make them call it. Objections? From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 30 21:38:13 2013 Received: (at 14989) by debbugs.gnu.org; 31 Jul 2013 01:38:13 +0000 Received: from localhost ([127.0.0.1]:59421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V4LMi-0008TF-Py for submit@debbugs.gnu.org; Tue, 30 Jul 2013 21:38:13 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:43172) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V4LMg-0008St-9T for 14989@debbugs.gnu.org; Tue, 30 Jul 2013 21:38:10 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFFpZvt/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJgcLFBgNJIgeBrEfkA6RCgOkeoFegxM X-IPAS-Result: Av8EABK/CFFFpZvt/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJgcLFBgNJIgeBrEfkA6RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="20219542" Received: from 69-165-155-237.dsl.teksavvy.com (HELO pastel.home) ([69.165.155.237]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 Jul 2013 21:37:57 -0400 Received: by pastel.home (Postfix, from userid 20848) id CE06266EAF; Tue, 30 Jul 2013 21:38:03 -0400 (EDT) From: Stefan Monnier To: Dmitry Gutov Subject: Re: bug#14989: 24.3.50; log-view-diff and log-view-diff-changeset default to different `to' revisions for git merge commits Message-ID: References: <8738qv8ya6.fsf@axl.i-did-not-set--mail-host-address--so-tickle-me> Date: Tue, 30 Jul 2013 21:38:03 -0400 In-Reply-To: <8738qv8ya6.fsf@axl.i-did-not-set--mail-host-address--so-tickle-me> (Dmitry Gutov's message of "Wed, 31 Jul 2013 01:42:57 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 14989 Cc: 14989@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > This fix is simple enough. Apply? Looks good, thanks. > The functions could also use some further cleanup: > 1) Swap the `to' and `fr' local variables. I think that would make sense, yes. > 2) Extract the function bodies to one function with a third argument > (called `whole-changeset', maybe), and make them call it. If that can be done without too much extra code, that sounds good. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 31 08:27:03 2013 Received: (at 14989-done) by debbugs.gnu.org; 31 Jul 2013 12:27:03 +0000 Received: from localhost ([127.0.0.1]:60273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V4VUc-0003PX-CR for submit@debbugs.gnu.org; Wed, 31 Jul 2013 08:27:02 -0400 Received: from forward17.mail.yandex.net ([95.108.253.142]:53481) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V4VUX-0003Oy-9M for 14989-done@debbugs.gnu.org; Wed, 31 Jul 2013 08:26:59 -0400 Received: from smtp19.mail.yandex.net (smtp19.mail.yandex.net [95.108.252.19]) by forward17.mail.yandex.net (Yandex) with ESMTP id 2B52D10607FC; Wed, 31 Jul 2013 16:26:50 +0400 (MSK) Received: from smtp19.mail.yandex.net (localhost [127.0.0.1]) by smtp19.mail.yandex.net (Yandex) with ESMTP id EAE30BE031C; Wed, 31 Jul 2013 16:26:49 +0400 (MSK) Received: from 93-245-142.netrun.cytanet.com.cy (93-245-142.netrun.cytanet.com.cy [93.109.245.142]) by smtp19.mail.yandex.net (nwsmtp/Yandex) with ESMTP id ZR6rAdik3S-QmnmdWlN; Wed, 31 Jul 2013 16:26:49 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1375273609; bh=5EapriWyXDL6eNmAndseNLnWdXxlJIfpDFXnG+xaOr8=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=dQz7uBR3FevagO493+kmmlMLU8u+6HMwTbPy4pMrkDpN/HpxZGCxoj2yw47SN1wIF ca5V4kXQS0OsuiNgtkZfuQwdWGY9sF9a4pcMC5ypadDoo/UN/ZaxdxAmm/h13TYLJ0 7LeZegFETe5u1wQHBgMPweMR/3GLZ7Iz97tVkQo4= Authentication-Results: smtp19.mail.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: <51F90285.9050702@yandex.ru> Date: Wed, 31 Jul 2013 15:26:45 +0300 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#14989: 24.3.50; log-view-diff and log-view-diff-changeset default to different `to' revisions for git merge commits References: <8738qv8ya6.fsf@axl.i-did-not-set--mail-host-address--so-tickle-me> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 14989-done Cc: 14989-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Done! On 31.07.2013 04:38, Stefan Monnier wrote: >> This fix is simple enough. Apply? > > Looks good, thanks. > >> The functions could also use some further cleanup: >> 1) Swap the `to' and `fr' local variables. > > I think that would make sense, yes. > >> 2) Extract the function bodies to one function with a third argument >> (called `whole-changeset', maybe), and make them call it. > > If that can be done without too much extra code, that sounds good. From unknown Thu Sep 11 06:33:48 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 29 Aug 2013 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator