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#62940: 29.0.60; vc: no easy way to get diff of all outgoing changes Date: Fri, 11 Oct 2024 17:39:26 +0300 Message-ID: References: <640746f7-fa1c-dfb9-aaab-f9d8effdf64f@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7022"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 62940@debbugs.gnu.org, Filipp Gunbin To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 11 19:26:10 2024 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 1szJOz-0001ch-Gh for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 11 Oct 2024 19:26:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szJ97-0007EW-DM; Fri, 11 Oct 2024 13:09:47 -0400 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 1szJ55-0000hD-0h for bug-gnu-emacs@gnu.org; Fri, 11 Oct 2024 13:05:38 -0400 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 1szGo1-0008AY-Qc for bug-gnu-emacs@gnu.org; Fri, 11 Oct 2024 10:39:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:References:From:MIME-Version:Date:To:Subject; bh=VduGzp4QU9u+VLGqFLZiS4rY7A6uUlkvpNndBRWtok0=; b=cB/M8vcl5rpVYa229Gg+BIAyWAr69Yn2tgHUaXaLibM/CTlNFk6rG3SMGXxSk/HV2sLmX2A3Sd2W5YSZQW2u31XUs0k6uz2LvZB140Y3DK4uBli6u043rm3S2giG55RahgUasWuxMeDNzWVVAQBkaUhn7qOYpS8twm8wKrGs5rSiIAhfyq4pwHZT7ksLbrUzYX8Riicw68abRpIMKzfvYR0l/DmHtGVAHtmEvQCsQWIeeAhpI0olJvrOUwdph2NwaxmLBB4FVZONJMe+vM0qGiOcRYvVpAIoUhl8RuEpnylWXtHN2OViEJNX3YYdacv6P0ggrc6ioy0d+IGvjH2iJQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1szGoE-0006Zf-DC for bug-gnu-emacs@gnu.org; Fri, 11 Oct 2024 10:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Oct 2024 14:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62940 X-GNU-PR-Package: emacs Original-Received: via spool by 62940-submit@debbugs.gnu.org id=B62940.172865759425248 (code B ref 62940); Fri, 11 Oct 2024 14:40:02 +0000 Original-Received: (at 62940) by debbugs.gnu.org; 11 Oct 2024 14:39:54 +0000 Original-Received: from localhost ([127.0.0.1]:34949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szGo6-0006ZA-19 for submit@debbugs.gnu.org; Fri, 11 Oct 2024 10:39:54 -0400 Original-Received: from fhigh-a5-smtp.messagingengine.com ([103.168.172.156]:45587) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szGo3-0006Yw-IK for 62940@debbugs.gnu.org; Fri, 11 Oct 2024 10:39:53 -0400 Original-Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 85027114020F; Fri, 11 Oct 2024 10:39:32 -0400 (EDT) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Fri, 11 Oct 2024 10:39:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1728657572; x=1728743972; bh=VduGzp4QU9u+VLGqFLZiS4rY7A6uUlkvpNndBRWtok0=; b= GrLVKaZhgOJloVnkUM6bS5LAAFetE7R81DygMXAhhSUHzvQFw6C2LNxcF+8q1AyJ YIH9bnSNY3mfAf9hLoXvUG1YxSFyJuiknMjcSeJtQ6uPPiDrUldYHLlVoWqJTLEk 8RnBMhZT4kMM646PafBFrQk6e40hhbPLOmVA6NhzodE1taLgOnuzMEcN/F84aIXZ UxB2yxIFVHxvFPg9gkb8d+pEfPm5G+R63RZuhbLoW/oTjH9c2Vro9SGFyXW1I5mP AukWi30Qect417M8wlmqnappMpDDd3iDa7u0p+Jkmhlc7l/jlyvxzQK5IVPIrd0O WGSF5xOK2iA7l8JwXNFR5Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1728657572; x= 1728743972; bh=VduGzp4QU9u+VLGqFLZiS4rY7A6uUlkvpNndBRWtok0=; b=E Ur+VVCMbt5QmrZLXcGgmSeEH/Cfu/fKHLZFouYBRJVbdFty34ZYFSx37VHWMSFP4 SWXDF3aW/XO2hVgPBmG+mHfIl2nt/bOxEMuPfNid8qbgelKqa55Ps+7mptQWcZDg JzqQrZtREgAFn6lOctG+Zdy2E/lfYyUaOlaKIDQeWHKR/HlRCYooR9UfPsb7+UUC pffXVS1RAA03Fv5tS7DVyFwkgXtE6sc4vYKCZ8nsP/Iar+OHlY5vdeqXX8A86u5v msk1sRNJVW2peT/q+fPitu0Q0A56CrYmcmptVO9T5CPAYroP6haXWieJJtpdJoNj hWs0kHUQu2EURir2B7heg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdefkedgjeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffhvfevfhgjtgfgsehtkeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug gvvheqnecuggftrfgrthhtvghrnhepvdelieejveekjeelffegudeiudejfffhveduudff vdevteekgeevffejgfffleeunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho peefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehssggruhhghhesjhgrnhgvsh htrhgvvghtrdgtohhmpdhrtghpthhtohepiedvleegtdesuggvsggsuhhgshdrghhnuhdr ohhrghdprhgtphhtthhopehfghhunhgsihhnsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 11 Oct 2024 10:39:30 -0400 (EDT) Content-Language: en-US In-Reply-To: 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:293375 Archived-At: On 11/10/2024 04:34, Dmitry Gutov wrote: > BTW: > > On 13/09/2024 23:54, Spencer Baugh wrote: >> +(defun vc-git-pushed-revision (_file &optional remote-location) >> +  "Return the ref for REMOTE-LOCATION." >> +  (if (and remote-location (not (string-empty-p remote-location))) >> +      remote-location >> +    "@{upstream}")) > > The function above and the function below > > +(defun vc-hg-pushed-revision (_file &optional remote-location) >> +  "Return a revspec for the last commit not outgoing to REMOTE- >> LOCATION." >> +  (unless remote-location >> +    (setq remote-location "")) >> +  (format "last(. and not outgoing(%s))" remote-location)) > > ...seem to be describing different kinds of refs: I think the Hg version > refers to the last commit from the current branch that's present in the > remote (the merge base), whereas the Git version points to the tip of > the remote branch. > > Which will be different if the remote has some newer changes added > (perhaps someone else has pushed to it). vc-git-log-outgoing won't > notice the difference because it uses the ".." range, but vc-git-diff > compares two versions directly, so e.g. anything new added to the remote > will be shown as removed in such diff. > > We probably want "merge base with remote" for Git as well (git merge- > base @{upstream} HEAD), but it doesn't have a similar short ref syntax. > > Could use "merge-base(@{upstream})" or "@{upstream}.." as a special > value, maybe. Or alternatively if we would prefer to err on the side of warning the user that the upstream has diverged, I suppose it's the Hg implementation that would need to change. That can result a simpler mental model and documentation as well. What would be Hg's corresponding selector for "tip of upstream branch"?