From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Andrii Kolomoiets Newsgroups: gmane.emacs.bugs Subject: bug#22860: [PATCH] vc-hg: prompt for branch to merge Date: Sat, 23 Nov 2019 20:51:28 +0200 Message-ID: <1C27CCD0-2335-4EE2-B815-3D85F4B84D85@gmail.com> References: <86wppnkzgq.fsf@ross-sas.epi-ucsf.org> <14D12E8F-EFDE-4C94-8C95-9440F56D3633@gmail.com> <83lfs6tpb1.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3601.0.10\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_46F4F6E4-BA67-405B-B527-4AE37069BFED" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="95164"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 22860@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 23 19:52:16 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iYaVz-000Oax-DB for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Nov 2019 19:52:15 +0100 Original-Received: from localhost ([::1]:60604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iYaVy-0003GM-5U for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Nov 2019 13:52:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44939) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iYaVp-0003Ea-O0 for bug-gnu-emacs@gnu.org; Sat, 23 Nov 2019 13:52:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iYaVo-0002np-OH for bug-gnu-emacs@gnu.org; Sat, 23 Nov 2019 13:52:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48987) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iYaVo-0002nf-L6 for bug-gnu-emacs@gnu.org; Sat, 23 Nov 2019 13:52:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iYaVo-00018C-9g for bug-gnu-emacs@gnu.org; Sat, 23 Nov 2019 13:52:04 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrii Kolomoiets Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Nov 2019 18:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22860 X-GNU-PR-Package: emacs Original-Received: via spool by 22860-submit@debbugs.gnu.org id=B22860.15745351034313 (code B ref 22860); Sat, 23 Nov 2019 18:52:02 +0000 Original-Received: (at 22860) by debbugs.gnu.org; 23 Nov 2019 18:51:43 +0000 Original-Received: from localhost ([127.0.0.1]:57806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iYaVQ-00017S-CO for submit@debbugs.gnu.org; Sat, 23 Nov 2019 13:51:43 -0500 Original-Received: from mail-lj1-f174.google.com ([209.85.208.174]:46067) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iYaVM-000170-A7 for 22860@debbugs.gnu.org; Sat, 23 Nov 2019 13:51:36 -0500 Original-Received: by mail-lj1-f174.google.com with SMTP id n21so11054752ljg.12 for <22860@debbugs.gnu.org>; Sat, 23 Nov 2019 10:51:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=1Ns0Y0G1MMBMquqqzqSfnKduo1IDII4gfvY7nW3dvMI=; b=YOTnJTiQQlJbEedSCZ3l+bAHNcuRNvlOCngBT9xMYHxtDi+Y92MClpeRyDqmuJYaf9 5XGGWpsgyd8EvmCPLSskfpbb6QK/K1LWaLFJ9Mrn/LW4a+pHEmWejcfiMdaMBZMCVKHU LyftOQFc6r90vp+S8ORneLavCvmx0TRtxRNp7aM7tUaDekSRwycSOgwceCO9hb6X8ev1 m9MYckcKWfhJuie3UxiR63vmN7R4t8/rfJG1w1ZSX8uSLo9C8YRZvl9FnwTmG+vIugNM 99HaPrpeOFAGue2LAMrnJtZi2psXW1v0MQW+Fv85P2GsN3mIJtF1RzK4+QZ0WVuamCeA NKRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=1Ns0Y0G1MMBMquqqzqSfnKduo1IDII4gfvY7nW3dvMI=; b=e1rQTUPPvyNvZQUUl/ZNc7uahBifzhQQTtPMESrFlIRf6yZaV2N5At1ZyfAoa4fD5J 3yeVnMrb3vcsxBmUlL/k1y2hS3Q9t2hFsh4Jz2RqiPh7LQ/CJ4yBEOVx42+4pg9f2Oyu qA2IphlFGo06uEnWAwhMnFQ5RUIgpzP9yijqUXFPX3daqPnBLYJl2T2n9qB0B9KgJ5Mr btLCuBrZHS2X1QkBuYU0bAfzW2v38Zrb93fsNsgdotupZYqABCaCIz0uQYFeyStVY/5h qkx7B/rLVR/Ro5O9689gFHtzXzxVA3GmKNCJEKpLxVMSRoWgNFikv/SqSPp+MoUIuvF8 +wXg== X-Gm-Message-State: APjAAAUEB+lwMoZRQzaNIgZ1EwcmhkNmy3EoWhuGzh9THlHuS5r6vLKq BoZfH4HuOwxS4ncXdOXqtvI= X-Google-Smtp-Source: APXvYqyrYsdUAxGqOlfYjA1maDb9jp/YY9EA9x+mDU8Ff3OSX5szEeU61MLY56awPKPltg9ojHR0dQ== X-Received: by 2002:a2e:8e27:: with SMTP id r7mr16955002ljk.101.1574535090019; Sat, 23 Nov 2019 10:51:30 -0800 (PST) Original-Received: from [192.168.0.104] ([91.206.110.132]) by smtp.gmail.com with ESMTPSA id c9sm1164258lfm.9.2019.11.23.10.51.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Nov 2019 10:51:29 -0800 (PST) In-Reply-To: <83lfs6tpb1.fsf@gnu.org> X-Mailer: Apple Mail (2.3601.0.10) 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:172334 Archived-At: --Apple-Mail=_46F4F6E4-BA67-405B-B527-4AE37069BFED Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 23 Nov 2019, at 20:34, Eli Zaretskii wrote: > >> +*** The Hg (Mercurial) back-end now use tag and branch names instead of >> +revision numbers as completion candidates on reading revision. > > Why "instead of revision numbers"? it sounds like a backward > incompatible change. Can't we use both revision numbers and > branch/tag names? You are right, it's backward incompatible. And yes, revision numbers can be used with branch/tag names. But they should not. It was big surprise for me to see numbers from 0 to 116K as completion candidates on vc-retrieve-tag. IMO revision numbers are useles in completions. >> (defun vc-hg-merge-branch () >> - "Merge incoming changes into the current working directory. >> + "Prompts for branch and merge it into the current branch. > > "Prompt", not "prompts", for consistency with how we word our doc > strings for functions. Fixed. --Apple-Mail=_46F4F6E4-BA67-405B-B527-4AE37069BFED Content-Disposition: attachment; filename=0001-vc-hg-prompt-for-branch-to-merge.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-vc-hg-prompt-for-branch-to-merge.patch" Content-Transfer-Encoding: quoted-printable =46rom=2052af9a5a85aadb305035139fab2a962abb4eead0=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Andrii=20Kolomoiets=20=0A= Date:=20Sat,=2023=20Nov=202019=2018:43:47=20+0200=0ASubject:=20[PATCH]=20= vc-hg:=20prompt=20for=20branch=20to=20merge=0A=0A*=20lisp/vc/vc-hg.el=20= (vc-hg-merge-branch):=20Prompt=20for=20branch=20to=20merge.=0A= (vc-hg-revision-table):=20Use=20branches=20and=20tags=20as=20competion=20= candidates.=0A=0A*=20etc/NEWS=20Mention=20changes=20of=20vc-hg.el=0A=0A= This=20fixes=20bug#22860=0A=0Adiff=20--git=20a/etc/NEWS=20b/etc/NEWS=0A= index=20ad349b1613..abd2c616bd=20100644=0A---=20a/etc/NEWS=0A+++=20= b/etc/NEWS=0A@@=20-933,6=20+933,11=20@@=20values.=0A=20The=20'C-x=20v=20= h'=20command=20now=20works=20in=20buffers=20that=20visit=20files=20= controlled=0A=20by=20Hg.=0A=0A+***=20The=20Hg=20(Mercurial)=20back-end=20= now=20prompt=20for=20branch=20to=20merge.=0A+=0A+***=20The=20Hg=20= (Mercurial)=20back-end=20now=20use=20tag=20and=20branch=20names=20= instead=20of=0A+revision=20numbers=20as=20completion=20candidates=20on=20= reading=20revision.=0A+=0A=20+++=0A=20***=20'C-u=20C-x=20v=20D'=20= ('vc-root-version-diff')=20prompts=20for=20two=20revisions=0A=20and=20= compares=20their=20entire=20trees.=0Adiff=20--git=20a/lisp/vc/vc-hg.el=20= b/lisp/vc/vc-hg.el=0Aindex=2017d38fa400..b6cb315c1b=20100644=0A---=20= a/lisp/vc/vc-hg.el=0A+++=20b/lisp/vc/vc-hg.el=0A@@=20-564,7=20+564,8=20= @@=20vc-hg-expanded-log-entry=0A=20(defun=20vc-hg-revision-table=20= (files)=0A=20=20=20(let=20((default-directory=20(file-name-directory=20= (car=20files))))=0A=20=20=20=20=20(with-temp-buffer=0A-=20=20=20=20=20=20= (vc-hg-command=20t=20nil=20files=20"log"=20"--template"=20"{rev}=20")=0A= +=20=20=20=20=20=20(vc-hg-command=20t=20nil=20nil=20"branches"=20"-q")=0A= +=20=20=20=20=20=20(vc-hg-command=20t=20nil=20nil=20"tags"=20"-q")=0A=20=20= =20=20=20=20=20(split-string=0A=20=20=20=20=20=20=20=20= (buffer-substring-no-properties=20(point-min)=20(point-max))))))=0A=0A@@=20= -1483,12=20+1484,15=20@@=20vc-hg-push=0A=20=20=20(vc-hg--pushpull=20= "push"=20prompt=20nil=20(called-interactively-p=20'interactive)))=0A=0A=20= (defun=20vc-hg-merge-branch=20()=0A-=20=20"Merge=20incoming=20changes=20= into=20the=20current=20working=20directory.=0A+=20=20"Prompt=20for=20= branch=20and=20merge=20it=20into=20the=20current=20branch.=0A=20This=20= runs=20the=20command=20\"hg=20merge\"."=0A=20=20=20(let*=20((root=20= (vc-hg-root=20default-directory))=0A=20=09=20(buffer=20(format=20"*vc-hg=20= :=20%s*"=20(expand-file-name=20root)))=0A=20=20=20=20=20=20=20=20=20=20= ;;=20Disable=20pager.=0A-=20=20=20=20=20=20=20=20=20(process-environment=20= (cons=20"HGPLAIN=3D1"=20process-environment)))=0A-=20=20=20=20(apply=20= 'vc-do-async-command=20buffer=20root=20vc-hg-program=20'("--config"=20= "ui.report_untrusted=3D0"=20"merge"))=0A+=20=20=20=20=20=20=20=20=20= (process-environment=20(cons=20"HGPLAIN=3D1"=20process-environment))=0A+=20= =20=20=20=20=20=20=20=20(branch=20(vc-read-revision=20"Merge=20from=20= branch:=20")))=0A+=20=20=20=20(apply=20'vc-do-async-command=20buffer=20= root=20vc-hg-program=0A+=20=20=20=20=20=20=20=20=20=20=20(append=20= '("--config"=20"ui.report_untrusted=3D0"=20"merge")=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(unless=20(string=3D=20branch=20= "")=20(list=20branch))))=0A=20=20=20=20=20(with-current-buffer=20buffer=20= (vc-run-delayed=20(vc-compilation-mode=20'hg)))=0A=20=20=20=20=20= (vc-set-async-update=20buffer)))=0A=0A--=0A2.15.1=0A= --Apple-Mail=_46F4F6E4-BA67-405B-B527-4AE37069BFED--