From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 26 10:16:15 2019 Received: (at submit) by debbugs.gnu.org; 26 Nov 2019 15:16:15 +0000 Received: from localhost ([127.0.0.1]:52720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZcZa-0002Z1-RN for submit@debbugs.gnu.org; Tue, 26 Nov 2019 10:16:15 -0500 Received: from lists.gnu.org ([209.51.188.17]:48655) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZcZa-0002Yu-0g for submit@debbugs.gnu.org; Tue, 26 Nov 2019 10:16:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55910) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZcZY-0000tI-V9 for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2019 10:16:13 -0500 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 autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iZcZY-0005DU-2B for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2019 10:16:12 -0500 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]:33829) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iZcZX-0005C6-PA for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2019 10:16:12 -0500 Received: by mail-lj1-x22c.google.com with SMTP id m6so13293476ljc.1 for ; Tue, 26 Nov 2019 07:16:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:message-id:date:to; bh=2PiovLKOCo+BmOFBd8WQPfv38RNe59rGvgnfGHtdHsg=; b=C+WR9RIKgCSaJs6Su9aL8tXXUx0b4M9RBfFVSY5DaFrG69nhtkoux8VrcqBdIg8dq/ 1aHntJncaZem0WLPsg/aSZPv4FDMIx9LoJPASGEpzXSssOm4wAYUeYxWeULwOzTT46Wd boGQ0gmZAikr6jfr5zcF6xwy2Y3bQOo9GB7jn5NTnl1gjbd23iopmagPUJzsYL92cZck vzvfedjh+pRQUiN/hsQurN6yFR94tqcfUSJ2kB0Adkhb4MVcp2/XqktXyxLeWqYeYV3z mHq+St6tVkK63fiNBgRnKQ5miMX7kL1xO+VsemChFv/Gth5YVJL/NcwZyg+ACyGePRMc iu0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:message-id:date:to; bh=2PiovLKOCo+BmOFBd8WQPfv38RNe59rGvgnfGHtdHsg=; b=ADfnZ58X9KDYegE2zkFclPE/VWWYVkKYnfYPcTWkhlpcwyHag5ILlPI8tWOLmzk/Z4 tMQFq6Se7WbqnrmYKFQe88Bknfzu+ITDoF5ffKSxrsexTh8pKjjWLxF1Z9OZS+lNmjVT cSapJ/2dsb2yHj7fV5GQIT03tspDOPoYXFjQ04uoil9GgFIeOh70VUjXq82w9vmB68nM ineQV/9B/hLxojcFSo+T6LQvKMC5oXH5SZg7Y4iF9rcawGKcUuVCWirobfRF9eshGptR 06oD1IgDIGBL2jTiCtVxt/QvJ5a02jmGpTtNgXLxgMngB6PtR+PotaoDNY4x5gFIcSpd I26w== X-Gm-Message-State: APjAAAVT8nTJArKdkLDzZ8QhlXqe9ejLwSXM75T2pgqQIwwZeT/iPnAU bUaPT0LjrHrJyGUpD4889NxA37PKEog= X-Google-Smtp-Source: APXvYqzovDXg9wH2jTg557/fR4IKNYSKlZJvR7r+1VRxYfb/a21TUsWWBlDcThOSEfIdj5Nt/eRf6A== X-Received: by 2002:a2e:8518:: with SMTP id j24mr25130655lji.13.1574781369532; Tue, 26 Nov 2019 07:16:09 -0800 (PST) Received: from [10.1.1.147] (188-42-207-82.ip.ukrtel.net. [82.207.42.188]) by smtp.gmail.com with ESMTPSA id v28sm856824lfd.93.2019.11.26.07.16.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Nov 2019 07:16:08 -0800 (PST) From: Andrii Kolomoiets Content-Type: multipart/mixed; boundary="Apple-Mail=_FCE283B0-5612-4ABD-A2A6-84CA04F7E833" Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3601.0.10\)) Subject: 27.0.50; [PATCH] vc-hg: use 'hg summary' to populate vc-dir headers Message-Id: Date: Tue, 26 Nov 2019 17:16:07 +0200 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.3601.0.10) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::22c X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.3 (--) --Apple-Mail=_FCE283B0-5612-4ABD-A2A6-84CA04F7E833 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Hi, By invoking single 'summary' command we can get more info about repository state: parent revisions, current branch, tags, bookmarks, commit status, available updates and phase. --Apple-Mail=_FCE283B0-5612-4ABD-A2A6-84CA04F7E833 Content-Disposition: attachment; filename=0001-vc-hg-use-hg-summary-to-populate-extra-vc-dir-header.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-vc-hg-use-hg-summary-to-populate-extra-vc-dir-header.patch" Content-Transfer-Encoding: quoted-printable =46rom=2077350d57f718efbf96d4c8deb59b80e22c2ebea7=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Andrii=20Kolomoiets=20=0A= Date:=20Tue,=2026=20Nov=202019=2017:10:29=20+0200=0ASubject:=20[PATCH]=20= vc-hg:=20use=20'hg=20summary'=20to=20populate=20vc-dir=20headers=0A=0ABy=20= invoking=20single=20'summary'=20command=20we=20can=20get=20more=20info=20= about=0Arepository=20state:=20parent=20revisions,=20current=20branch,=20= tags,=20bookmarks,=0Acommit=20status,=20available=20updates=20and=20= phase.=0A=0A*=20lisp/vc/vc-hg.el=20(vc-hg-dir-extra-headers):=20Use=20= 'hg=20summary'=20command.=0A(vc-hg-dir-extra-header):=20Remove=20unused=20= function.=0A*=20etc/NEWS:=20Mention=20changes=20to=20vc-hg.el=0A=0Adiff=20= --git=20a/etc/NEWS=20b/etc/NEWS=0Aindex=20d3331daf17..f7abfb1680=20= 100644=0A---=20a/etc/NEWS=0A+++=20b/etc/NEWS=0A@@=20-956,6=20+956,10=20= @@=20with=20conflicts=20existed=20in=20earlier=20versions=20of=20Emacs,=20= but=20incorrectly=0A=20never=20detected=20a=20conflict=20due=20to=20= invalid=20assumptions=20about=20cached=0A=20values.=0A=20=0A+---=0A+***=20= 'vc-hg'=20now=20uses=20'hg=20summary'=20command=20to=20populate=20extra=20= 'vc-dir'=0A+headers.=0A+=0A=20+++=0A=20***=20The=20Hg=20(Mercurial)=20= back-end=20now=20supports=20'vc-region-history'.=0A=20The=20'C-x=20v=20= h'=20command=20now=20works=20in=20buffers=20that=20visit=20files=20= controlled=0Adiff=20--git=20a/lisp/vc/vc-hg.el=20b/lisp/vc/vc-hg.el=0A= index=2017d38fa400..6ff4923a14=20100644=0A---=20a/lisp/vc/vc-hg.el=0A+++=20= b/lisp/vc/vc-hg.el=0A@@=20-1357,25=20+1357,28=20@@=20= vc-hg-dir-status-files=0A=20=20=20(vc-run-delayed=0A=20=20=20=20=20= (vc-hg-after-dir-status=20update-function)))=0A=20=0A-(defun=20= vc-hg-dir-extra-header=20(name=20&rest=20commands)=0A-=20=20(concat=20= (propertize=20name=20'face=20'font-lock-type-face)=0A-=20=20=20=20=20=20=20= =20=20=20(propertize=0A-=20=20=20=20=20=20=20=20=20=20=20= (with-temp-buffer=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20(apply=20= 'vc-hg-command=20(current-buffer)=200=20nil=20commands)=0A-=20=20=20=20=20= =20=20=20=20=20=20=20=20(buffer-substring-no-properties=20(point-min)=20= (1-=20(point-max))))=0A-=20=20=20=20=20=20=20=20=20=20=20'face=20= 'font-lock-variable-name-face)))=0A-=0A=20(defun=20= vc-hg-dir-extra-headers=20(dir)=0A-=20=20"Generate=20extra=20status=20= headers=20for=20a=20Mercurial=20tree."=0A+=20=20"Generate=20extra=20= status=20headers=20for=20a=20repository=20in=20DIR.=0A+This=20runs=20the=20= command=20\"hg=20summary\"."=0A=20=20=20(let=20((default-directory=20= dir))=0A-=20=20=20=20(concat=0A-=20=20=20=20=20(vc-hg-dir-extra-header=20= "Root=20=20=20=20=20=20=20:=20"=20"root")=20"\n"=0A-=20=20=20=20=20= (vc-hg-dir-extra-header=20"Branch=20=20=20=20=20:=20"=20"id"=20"-b")=20= "\n"=0A-=20=20=20=20=20(vc-hg-dir-extra-header=20"Tags=20=20=20=20=20=20=20= :=20"=20"id"=20"-t")=20;=20"\n"=0A-=20=20=20=20=20;;=20these=20change=20= after=20each=20commit=0A-=20=20=20=20=20;;=20(vc-hg-dir-extra-header=20= "Local=20num=20=20:=20"=20"id"=20"-n")=20"\n"=0A-=20=20=20=20=20;;=20= (vc-hg-dir-extra-header=20"Global=20id=20=20:=20"=20"id"=20"-i")=0A-=20=20= =20=20=20)))=0A+=20=20=20=20(with-temp-buffer=0A+=20=20=20=20=20=20= (vc-hg-command=20t=200=20nil=20"summary")=0A+=20=20=20=20=20=20= (goto-char=20(point-min))=0A+=20=20=20=20=20=20(mapconcat=0A+=20=20=20=20= =20=20=20#'identity=0A+=20=20=20=20=20=20=20(let=20(result)=0A+=20=20=20=20= =20=20=20=20=20(while=20(not=20(eobp))=0A+=20=20=20=20=20=20=20=20=20=20=20= (push=0A+=20=20=20=20=20=20=20=20=20=20=20=20(let=20((entry=20(if=20= (looking-at=20"\\([^=20].*\\):=20\\(.*\\)")=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(cons=20= (capitalize=20(match-string=201))=20(match-string=202))=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(cons=20= ""=20(buffer-substring=20(point)=20(line-end-position))))))=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(concat=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(propertize=20(format=20"%-11s:=20"=20(car=20entry))=20'face=20= 'font-lock-type-face)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (propertize=20(cdr=20entry)=20'face=20'font-lock-variable-name-face)))=0A= +=20=20=20=20=20=20=20=20=20=20=20=20result)=0A+=20=20=20=20=20=20=20=20=20= =20=20(forward-line))=0A+=20=20=20=20=20=20=20=20=20(nreverse=20result))=0A= +=20=20=20=20=20=20=20"\n"))))=0A=20=0A=20(defun=20vc-hg-log-incoming=20= (buffer=20remote-location)=0A=20=20=20(vc-hg-command=20buffer=201=20nil=20= "incoming"=20"-n"=20(unless=20(string=3D=20remote-location=20"")=0A--=20=0A= 2.15.1=0A=0A= --Apple-Mail=_FCE283B0-5612-4ABD-A2A6-84CA04F7E833-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 27 07:30:23 2019 Received: (at 38387) by debbugs.gnu.org; 27 Nov 2019 12:30:23 +0000 Received: from localhost ([127.0.0.1]:53626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZwSc-0003yF-Qe for submit@debbugs.gnu.org; Wed, 27 Nov 2019 07:30:22 -0500 Received: from mail-wm1-f46.google.com ([209.85.128.46]:39475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZwSb-0003sN-GF for 38387@debbugs.gnu.org; Wed, 27 Nov 2019 07:30:21 -0500 Received: by mail-wm1-f46.google.com with SMTP id s14so462017wmh.4 for <38387@debbugs.gnu.org>; Wed, 27 Nov 2019 04:30:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=o+L+ZjAncI7c9ko16WiKiOvrsqDB2rQ5/yOs20W9Fz0=; b=oNyXRWkWRSz5yoR1zY3ZF2WQiKz+iEY5vGNp6d47AFC++3JWn3FApU6Wfyy0jWQ+bu 0lhpWpUR6f9Ue8e69MFuMw1Jt9jlLhOO47fSDkbtSh1dAniupXKuSwstCcl5ZiuDo1xu JNiYJ8GCJgZ3ylImeSUJYZLGrwRN/gBF3KCRrEF05q5B78C1kjaiu+rp1/iyM4BKL3Py H1hJ1gPIh8ZmEyXD+0ovpT5rlc70cGBr4Gz8IVpRAgGUR2dbwRrBSaLJJb2ijvjcScBs JRq23877iG6nDCGoaJZY/x2rHykiMyLOq5iMi1XIzIHT1RyCR6bQeEEcVN9A20FIHayd dmdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=o+L+ZjAncI7c9ko16WiKiOvrsqDB2rQ5/yOs20W9Fz0=; b=fIlhs4W4n3DkWoH7TsGfi/EbD90nj5EZbUMYbW0McpmaW7EVNk2ET4BPp733sTrgj3 tPPAnOgMtrBsOOvDm/8yIL5b1HM55Uz3j7TMpy/CIg2LjbOK+gQM3tWEUkug6DzpOTX8 0duNW47iXswPnekX85yaHfe69S+ScHxLuXv0BaiaTCFEa1zf8G3FgzNRfKnh/ay0nn09 CL6Iu7TdQgan8291l0ApPcyLa41RfAodf7Y4lg4F/ykHINUBlK8ZOZGx/62DhebEqoXz RcZscRzQLogGc6LGVQh/OI4AIKGpulqVLzU7U4xaDo5pV6BcXFjLH5LGY2gpKRGenCGe lZVw== X-Gm-Message-State: APjAAAU0HQ4O/g2xJpeLDwrvPIWOEyGa+pCZdCRuXXt7WT5cU7Wn4y1i ASJjH88k6k5eFzBlCrhAGs8= X-Google-Smtp-Source: APXvYqzXhY0p84Dd6U8DKwU1PzZvl+s9FcJtwdDYUtzqKlwNvkQnp5P4hmZjhbhXwlAZsHe3dRKsTw== X-Received: by 2002:a1c:7911:: with SMTP id l17mr989447wme.44.1574857815584; Wed, 27 Nov 2019 04:30:15 -0800 (PST) Received: from [192.168.0.5] ([212.50.117.215]) by smtp.googlemail.com with ESMTPSA id j67sm6919298wmb.43.2019.11.27.04.30.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Nov 2019 04:30:15 -0800 (PST) Subject: Re: bug#38387: 27.0.50; [PATCH] vc-hg: use 'hg summary' to populate vc-dir headers To: Andrii Kolomoiets , 38387@debbugs.gnu.org References: From: Dmitry Gutov Message-ID: <7505dd70-86c1-9576-5dc9-42b1abca519e@yandex.ru> Date: Wed, 27 Nov 2019 14:30:13 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 38387 Cc: Daniel Colascione X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.5 (/) Hi Andrii, On 26.11.2019 17:16, Andrii Kolomoiets wrote: > By invoking single 'summary' command we can get more info about > repository state: parent revisions, current branch, tags, bookmarks, > commit status, available updates and phase. I guess the questions are: - Is this output better than the previous one? Hopefully others will chime in, e.g. Daniel, who wrote some major improvements to vc-hg a few years ago. - Is 'hg summary' stable enough? Maybe a few years from now Mercurial changes its output and this code stops working in all Emacs we'd have released in the meantime? This is why we try to use "porcelain" level commands (in Git terminology) when possible, not user-level. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 27 08:37:37 2019 Received: (at 38387) by debbugs.gnu.org; 27 Nov 2019 13:37:37 +0000 Received: from localhost ([127.0.0.1]:53674 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZxVh-00014G-JW for submit@debbugs.gnu.org; Wed, 27 Nov 2019 08:37:37 -0500 Received: from mail-out.m-online.net ([212.18.0.10]:53197) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZxVf-000146-Rv for 38387@debbugs.gnu.org; Wed, 27 Nov 2019 08:37:36 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 47NMJt4myDz1rfQ3; Wed, 27 Nov 2019 14:37:34 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 47NMJt1dtQz1qwZn; Wed, 27 Nov 2019 14:37:34 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id ImVBGDWe8VA6; Wed, 27 Nov 2019 14:37:33 +0100 (CET) X-Auth-Info: jr4bJ75J+8LoqZ1S+uZ94T8Jv7RAxm+H9XC414ebl7duzQqtUx3NiDm+fQKmW6k8 Received: from igel.home (ppp-46-244-188-149.dynamic.mnet-online.de [46.244.188.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 27 Nov 2019 14:37:33 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id B04822C0FA1; Wed, 27 Nov 2019 14:37:32 +0100 (CET) From: Andreas Schwab To: Dmitry Gutov Subject: Re: bug#38387: 27.0.50; [PATCH] vc-hg: use 'hg summary' to populate vc-dir headers References: <7505dd70-86c1-9576-5dc9-42b1abca519e@yandex.ru> X-Yow: I just had a NOSE JOB!! Date: Wed, 27 Nov 2019 14:37:32 +0100 In-Reply-To: <7505dd70-86c1-9576-5dc9-42b1abca519e@yandex.ru> (Dmitry Gutov's message of "Wed, 27 Nov 2019 14:30:13 +0200") Message-ID: <87k17lv3s3.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 38387 Cc: 38387@debbugs.gnu.org, Andrii Kolomoiets X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.4 (-) On Nov 27 2019, Dmitry Gutov wrote: > - Is 'hg summary' stable enough? Maybe a few years from now Mercurial > changes its output and this code stops working in all Emacs we'd have > released in the meantime? This is why we try to use "porcelain" level > commands (in Git terminology) when possible, not user-level. Git calls them "plumbing". "Porcelain" are the high-level commands. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 27 08:56:25 2019 Received: (at 38387) by debbugs.gnu.org; 27 Nov 2019 13:56:25 +0000 Received: from localhost ([127.0.0.1]:53688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZxnt-0001cP-K0 for submit@debbugs.gnu.org; Wed, 27 Nov 2019 08:56:25 -0500 Received: from mail-wm1-f50.google.com ([209.85.128.50]:32871) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZxns-0001cA-J0 for 38387@debbugs.gnu.org; Wed, 27 Nov 2019 08:56:24 -0500 Received: by mail-wm1-f50.google.com with SMTP id y23so419757wma.0 for <38387@debbugs.gnu.org>; Wed, 27 Nov 2019 05:56:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/5RxqRFm5/uYtWwux9nYwRw/8przv1wxJ7bSu2MhbaI=; b=lI7EA02F0s9LZ6LpUTylFqtf/LYjOqc78Vg5XbvqhxxzCMk/UXLk81N/6XX4yuq/ou 8ImPkuaxO42mgLy6YVMdnaINbxtbW+aRCkhOxZtGlLfg/Gqq0pJNoK9eXF389UOtsslr +Gjrtc537tdeOwjv0yfNQ7RgMu3Vk//zyhZWYqN1g8ADoF79TWvDuuoFXewL7jcUQMDY p88kdG8+qvB5f29YIF4w3IhoXdJmFrT7iyu5BwcaU5ESU16b1+CwG0JZFtkwjE+tMmSi DxqJ7+IeRdR69NxwQ2C8xkO0zHUyf7vZpRTSa75mluMs4r+41fw6dfCkK6macXXondzS n+8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/5RxqRFm5/uYtWwux9nYwRw/8przv1wxJ7bSu2MhbaI=; b=rvHnfhSJoChSg6yRILT+D02F1VMc6lWO/CTScRjfxi0YNFpHByZVkII4AVPj9tF6OS sOs6egOQpoPrrmjeYXFgImKYBvEyGgiEBhMVEeMSuC3xFmrk70ZRTDFJmciEMfnp1Rg8 hLWDTGbEud/PWktMoGSpjYBzhoTc1D//NSNcA6qbUpMZg/XY9iUYbYxj1Bb1w0LhuhOe E77qs59jrCKVIXJcw0+Dku1V9AOOMDGoi4trwuzd0mvUnIL/GP4KaWUEd2Vz8BG0d8rt +RgaJe8TlXtnj4UijTotAOw574bCYk6xvdHpVxmqgLmYll68ebx5YK90nH/33eqoBSt0 jb9A== X-Gm-Message-State: APjAAAULDh1tqL3cZpy1YAR+4aTxC/DzXsxhX/EzKqS1CookoASjm19a pfS6ouN3XpDgvBYaKzNtL70+QM6N X-Google-Smtp-Source: APXvYqz7t2MuAcqBUGF1/VDCJh8eGfURJVRnJ0tsXWhrdbKHxluTated3i9Au3H4hrOqS9fYkzRXZg== X-Received: by 2002:a7b:c8d4:: with SMTP id f20mr4414202wml.56.1574862978416; Wed, 27 Nov 2019 05:56:18 -0800 (PST) Received: from [192.168.0.5] ([212.50.117.215]) by smtp.googlemail.com with ESMTPSA id y6sm19421881wrr.19.2019.11.27.05.56.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Nov 2019 05:56:17 -0800 (PST) Subject: Re: bug#38387: 27.0.50; [PATCH] vc-hg: use 'hg summary' to populate vc-dir headers To: Andreas Schwab References: <7505dd70-86c1-9576-5dc9-42b1abca519e@yandex.ru> <87k17lv3s3.fsf@igel.home> From: Dmitry Gutov Message-ID: Date: Wed, 27 Nov 2019 15:56:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <87k17lv3s3.fsf@igel.home> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 38387 Cc: 38387@debbugs.gnu.org, Andrii Kolomoiets X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.5 (/) On 27.11.2019 15:37, Andreas Schwab wrote: > Git calls them "plumbing". "Porcelain" are the high-level commands. My mistake, I guess. Git makes terminology a little confusing in that part. Because the example I was thinking of is 'git status --porcelain' which is meant to "Give the output in an easy-to-parse format for scripts. This is similar to the short output, but will remain stable across Git versions and regardless of user configuration." In any case, the question is about output's stability. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 27 13:53:15 2019 Received: (at 38387) by debbugs.gnu.org; 27 Nov 2019 18:53:16 +0000 Received: from localhost ([127.0.0.1]:56214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ia2R9-0003T1-Li for submit@debbugs.gnu.org; Wed, 27 Nov 2019 13:53:15 -0500 Received: from dancol.org ([96.126.100.184]:56980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ia2R7-0003St-JX for 38387@debbugs.gnu.org; Wed, 27 Nov 2019 13:53:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:To:From: Subject:Date:References:In-Reply-To:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=1L7UIJsmAqg58QAR2Ggy2ns2ymyIvdTLOTJE8fyy0ac=; b=QBvg30gglFv/VMBYRKC11FJeMv UfP5xSLa7Sx6bab2OBa1NCTGPa/8rNgp8/IUS3UvSqz+bNLdzYhAk4Yha2WX1y0WMV+DInWuB3JDc Tj203C/R/trHsaJhJdRdtZKCDJoDF6VrBb0ZsJV4xVZMT6KYbLhlFjLusrJ1MF706ZZfmum9QFg8Z Q5gWzM6FW8UOv+CiLYyZXtH9AKXi2Lh0aIziv4fAdkiv7K3KAE3m9LjD7qV6Frq+t/HhzulJFDu8+ l/B3FBAOlfL12D3eIvBZ/wlEBnQuN0WaLAqoSuEnf3QUZLWAG/k1RQDnf4j56dxhA7P5d9ZhXG15j ihYf4iXg==; Received: from localhost ([127.0.0.1] helo=dancol.org) by dancol.org with esmtp (Exim 4.89) (envelope-from ) id 1ia2R3-0001Iw-Tx; Wed, 27 Nov 2019 10:53:10 -0800 Received: from 127.0.0.1 (SquirrelMail authenticated user dancol) by dancol.org with HTTP; Wed, 27 Nov 2019 10:53:10 -0800 Message-ID: <0366bc0bf7f7c65bdc5e869397d4c945.squirrel@dancol.org> In-Reply-To: <7505dd70-86c1-9576-5dc9-42b1abca519e@yandex.ru> References: <7505dd70-86c1-9576-5dc9-42b1abca519e@yandex.ru> Date: Wed, 27 Nov 2019 10:53:10 -0800 Subject: Re: bug#38387: 27.0.50; [PATCH] vc-hg: use 'hg summary' to populate vc-dir headers From: "Daniel Colascione" To: "Dmitry Gutov" User-Agent: SquirrelMail/1.4.23 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 38387 Cc: 38387@debbugs.gnu.org, Daniel Colascione , Andrii Kolomoiets X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) > Hi Andrii, > > On 26.11.2019 17:16, Andrii Kolomoiets wrote: > >> By invoking single 'summary' command we can get more info about >> repository state: parent revisions, current branch, tags, bookmarks, >> commit status, available updates and phase. > > I guess the questions are: > > - Is this output better than the previous one? Hopefully others will > chime in, e.g. Daniel, who wrote some major improvements to vc-hg a few > years ago. > > - Is 'hg summary' stable enough? Maybe a few years from now Mercurial > changes its output and this code stops working in all Emacs we'd have > released in the meantime? This is why we try to use "porcelain" level > commands (in Git terminology) when possible, not user-level. > What's the performance of summary like these days? From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 28 03:07:32 2019 Received: (at 38387) by debbugs.gnu.org; 28 Nov 2019 08:07:32 +0000 Received: from localhost ([127.0.0.1]:56559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iaEpn-00029K-TO for submit@debbugs.gnu.org; Thu, 28 Nov 2019 03:07:32 -0500 Received: from mail-lj1-f170.google.com ([209.85.208.170]:38777) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iaEpm-000297-5V for 38387@debbugs.gnu.org; Thu, 28 Nov 2019 03:07:30 -0500 Received: by mail-lj1-f170.google.com with SMTP id k8so16899864ljh.5 for <38387@debbugs.gnu.org>; Thu, 28 Nov 2019 00:07:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=cVA0sBtOliSqZXnH3JaW28eDoUkqfMKB/3QPSlTL1ew=; b=p3Rf8Dpwtqvg63h0Tj3LOHh0W+gf6r3hXmLE2qHPsVq/U9xql5VWbPu0plP/GuN7wJ +FbSjtP4bz0lpWTcfkOpZ+Xbt6zCbOs1QugO9byiWzL4iPZm5jCIx6K5gF1sE5I6yBBM 6o+cIop8Z+Djbrabd7d8l1yY2H5HvxiKWTirJjF0B7u866j62uO/fZpVKXJpk3GA/sIr MmZA1w0UGWFKwyr/hHPz8u06D/DqJeuwVg0dJlnNBsgC0nY2Zuw2YMEuubccsQUEmQ8Q fuDxva2e2vSpBRsaOGpEGiT/IsHBBlqXZw7Wt7AI9wfy6Q0IPMFArKz9QskeNufXEKw4 QDGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=cVA0sBtOliSqZXnH3JaW28eDoUkqfMKB/3QPSlTL1ew=; b=QmlKnZPjDZ721RtxZuPt2E/0q0178RtXMm/GM0QP4QG3v2MDFHl2TZAdiXVYLfhMBz 9v/9GYWUdp2XZ7vy2beBoS4HwSMb/bPrSRH5PiwXG4h8EZtjbXuvCuQ1UtOIWSAPIg/V imSY8j7LBjDfcf+FGqpdkb22Wo5NiEX69w32mzlqDgj7lBLle9fZ0SWHeJSB0uJfU7Xv jv2Tg5kvjtqvEIneDkXpO0CUdYdXVXAPJf+wYV9mh+Ee/nwpXT+izk7A7vU8e9bNzJaj AvmzNI3RvJs/ev+jDT40JFflR/rBz1YNTj5+SAFkgypuqF2YogjoDYMo7zgk59NkkFI+ c7iQ== X-Gm-Message-State: APjAAAUzQUl6vsmmeYjaMSbP9dyNUd2tHZ+ebBQnsiqAhcq1gZAncQYL ViiU9VQovta/fst7fc92UY4= X-Google-Smtp-Source: APXvYqz7kkV8dG8OL2aN1QyyPbretyTNUTK5B3vWPrZAgJBIsjfnEAQUS3Jlp/f9W8e97Kw1Gsz1tA== X-Received: by 2002:a2e:85d5:: with SMTP id h21mr33195305ljj.243.1574928444164; Thu, 28 Nov 2019 00:07:24 -0800 (PST) Received: from [10.1.1.147] (188-42-207-82.ip.ukrtel.net. [82.207.42.188]) by smtp.gmail.com with ESMTPSA id b28sm9429372ljp.9.2019.11.28.00.07.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Nov 2019 00:07:23 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3601.0.10\)) Subject: Re: bug#38387: 27.0.50; [PATCH] vc-hg: use 'hg summary' to populate vc-dir headers From: Andrii Kolomoiets X-Priority: 3 (Normal) In-Reply-To: <0366bc0bf7f7c65bdc5e869397d4c945.squirrel@dancol.org> Date: Thu, 28 Nov 2019 10:07:22 +0200 Content-Transfer-Encoding: 7bit Message-Id: References: <7505dd70-86c1-9576-5dc9-42b1abca519e@yandex.ru> <0366bc0bf7f7c65bdc5e869397d4c945.squirrel@dancol.org> To: Daniel Colascione X-Mailer: Apple Mail (2.3601.0.10) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38387 Cc: 38387@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) On 27 Nov 2019, at 20:53, Daniel Colascione wrote: > >> Hi Andrii, >> >> On 26.11.2019 17:16, Andrii Kolomoiets wrote: >> >>> By invoking single 'summary' command we can get more info about >>> repository state: parent revisions, current branch, tags, bookmarks, >>> commit status, available updates and phase. >> >> I guess the questions are: >> >> - Is this output better than the previous one? Hopefully others will >> chime in, e.g. Daniel, who wrote some major improvements to vc-hg a few >> years ago. Current output displays current branch and tag. There are also root dir, but vc displays working dir itself, so root is not needed. BTW root can be replaced with bookmark because bookmark is what vc-hg-create-tag create when branchp. From user's POV the branch creation is not working: 1. Open vc-dir for hg repository 2. C-u B c 3. Enter branch name to create and nothing changed in vc-dir - branch and tag are remains the same. Info that 'summary' shows but missed in the current output: - Parent revision and first line of commit message. During merge both parents are shown. Very handy. This info can be obtained by parsing 'hg log' command output. - Bookmarks, if any. Can be obtained by 'hg id -B'. - Commit state. Shows the count of modified, added, removed, renamed, copied, deleted, unknown and unresolved files. Alright, all affected files are listed in the same vc-dir buffer and one can count them so those numbers may be not very interesting. But commit state also can show if graft, update or merge is in progress; if head are closed; if it is a new branch; if there are changes in subrepositories. I don't know how to obtain this info. - Update state. Shows the available updates count and/or branch heads count. I don't know how obtain this info, maybe some log command. - Number of incoming and outgoing changes (with '--remote' switch). It is slow, but we can allow user to decide use it or not. - Phase. Can show how many changesets are not shared yet. IMO 'summary' gives better overview of repo state. >> - Is 'hg summary' stable enough? Maybe a few years from now Mercurial >> changes its output and this code stops working in all Emacs we'd have >> released in the meantime? This is why we try to use "porcelain" level >> commands (in Git terminology) when possible, not user-level. This code do nothing but propertize the text. We just show the user the output of the user command. The layout can be messed though if the name-value separator will be changed. To solve this the regexp can be put into the variable so it can be changed easily. Removal of the 'summary' command is the worst case. But AFAIK there are no prerequisites for this. Let's not hide usefull info from the user because we affraid of hypothetical removal of the 'summary' command :) For now, comparing 'summary' output of hg 2.6.2 and 5.2, I can see that phase info is added in recent version and no breaking changes at all. > What's the performance of summary like these days? Let's see. hg summary 0.21s user 0.16s system 98% cpu 0.376 total hg log -r 'p1(.)+p2(.)' 0.14s user 0.08s system 99% cpu 0.221 total hg id --branch 0.14s user 0.13s system 98% cpu 0.280 total hg id --tags 0.15s user 0.14s system 98% cpu 0.299 total hg id --bookmarks 0.15s user 0.15s system 98% cpu 0.298 total hg phase 0.12s user 0.07s system 97% cpu 0.193 total Yes, 'summary' is slower than single 'id' command. But again, it is faster to run a single command that gives all the info rather than run five different commands. Imagine working with repo over TRAMP. Best regards. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 28 03:20:53 2019 Received: (at 38387) by debbugs.gnu.org; 28 Nov 2019 08:20:53 +0000 Received: from localhost ([127.0.0.1]:56579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iaF2j-0002UN-EM for submit@debbugs.gnu.org; Thu, 28 Nov 2019 03:20:53 -0500 Received: from mail-lj1-f173.google.com ([209.85.208.173]:44987) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iaF2h-0002U3-Sq for 38387@debbugs.gnu.org; Thu, 28 Nov 2019 03:20:52 -0500 Received: by mail-lj1-f173.google.com with SMTP id c19so458832lji.11 for <38387@debbugs.gnu.org>; Thu, 28 Nov 2019 00:20:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=nLqi8Om0w2g24YZ+vN7avlQ0XHykkKmYlBgx/302PYE=; b=qBYbbpod0JYtiLfdmi3y1//Y2IYlQSu9Gbh6iI+KyH5tS4BQkyxJp1j0RkakcobqrB tgNpCo0Ft6MglcLAQ3e5efirnhyV/ucZHtfK724jm54FeUz7oADMHaxSXeMWsVMqTgah uOdzaJL35nVnAS0huN1WFAqwj36V/deECN267y1wm/PJc59D5gZrjbrP1UN+Vxq2MzRO Cy/iA+JXtacaC3vc7BeprFxEI0nVoiofMHxAmZ+yIjw3zRBgpuFzsoGQFpGrGwzlh4Uk YeHAT3Yz+huukWHCHDRm3BSdthAbsh6iB54EcX1hSn4yJd6uS5krH+l5r1NbWYxepkng ciEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=nLqi8Om0w2g24YZ+vN7avlQ0XHykkKmYlBgx/302PYE=; b=YxQe84uw/o6LmIpAFuwGMjlCj5qzuLh2fTC3zuxFwxTqN+Y+K5loJXBA3P2n3ynfCL Nu9BfNeI6ZDgOO24t4gqd3jgzNBuQI2M9xy+PH9jR8j2BgWAygDVKnDUdtQBGEZ76RSr 0cBM0NrA/Y8OL5sqjsc6dnrwaa+9ti+CqqMNlTkAFhyKS8mLf1JlAy39RDns6xilqp44 8tpH4Ijr5xDulSTABj6t9KSJZXUnpBZvnmMJDYPcvTfVASnMgjffAyLJjIlftevHdsV/ /gP6/9uIYGrXJy6wtC6LuBuxqkE2sxC4BsvWYlCQ0FuXCODtYukGnhQRN7+liW1Aujjz 7wDw== X-Gm-Message-State: APjAAAX1wzCvbhaYiEql1131vUP/0MARnvkvI8OiGR3fdGdJMts7OUpU sXotYWLjWzA9bcyvpg3aZ6kU666l X-Google-Smtp-Source: APXvYqx0S8xtn9ir/RcAJdwGL6X2lg7wBv0GyNsur+4PNDB2rz1KF3cj0zXJEFszoEYAoD5iD2wiGg== X-Received: by 2002:a2e:740d:: with SMTP id p13mr9197235ljc.25.1574929245464; Thu, 28 Nov 2019 00:20:45 -0800 (PST) Received: from [10.1.1.147] (188-42-207-82.ip.ukrtel.net. [82.207.42.188]) by smtp.gmail.com with ESMTPSA id z23sm8227801ljh.35.2019.11.28.00.20.44 for <38387@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Nov 2019 00:20:44 -0800 (PST) From: Andrii Kolomoiets Content-Type: multipart/mixed; boundary="Apple-Mail=_33222393-D5E6-4638-A9D3-399A154B8A7B" Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3601.0.10\)) Subject: Re: 27.0.50; [PATCH] vc-hg: use 'hg summary' to populate vc-dir headers Date: Thu, 28 Nov 2019 10:20:43 +0200 References: To: 38387@debbugs.gnu.org In-Reply-To: Message-Id: <426CF38F-9608-4FAF-A29A-8EF3D20D5DE2@gmail.com> X-Mailer: Apple Mail (2.3601.0.10) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38387 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) --Apple-Mail=_33222393-D5E6-4638-A9D3-399A154B8A7B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Patch is slightly modified to match all whitespaces after ':' to handle = possible extra spaces in 'summary' output. --Apple-Mail=_33222393-D5E6-4638-A9D3-399A154B8A7B Content-Disposition: attachment; filename=0001-vc-hg-use-hg-summary-to-populate-extra-vc-dir-header.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-vc-hg-use-hg-summary-to-populate-extra-vc-dir-header.patch" Content-Transfer-Encoding: quoted-printable =46rom=2077350d57f718efbf96d4c8deb59b80e22c2ebea7=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Andrii=20Kolomoiets=20=0A= Date:=20Tue,=2026=20Nov=202019=2017:10:29=20+0200=0ASubject:=20[PATCH]=20= vc-hg:=20use=20'hg=20summary'=20to=20populate=20vc-dir=20headers=0A=0ABy=20= invoking=20single=20'summary'=20command=20we=20can=20get=20more=20info=20= about=0Arepository=20state:=20parent=20revisions,=20current=20branch,=20= tags,=20bookmarks,=0Acommit=20status,=20available=20updates=20and=20= phase.=0A=0A*=20lisp/vc/vc-hg.el=20(vc-hg-dir-extra-headers):=20Use=20= 'hg=20summary'=20command.=0A(vc-hg-dir-extra-header):=20Remove=20unused=20= function.=0A*=20etc/NEWS:=20Mention=20changes=20to=20vc-hg.el=0A=0Adiff=20= --git=20a/etc/NEWS=20b/etc/NEWS=0Aindex=20d3331daf17..f7abfb1680=20= 100644=0A---=20a/etc/NEWS=0A+++=20b/etc/NEWS=0A@@=20-956,6=20+956,10=20= @@=20with=20conflicts=20existed=20in=20earlier=20versions=20of=20Emacs,=20= but=20incorrectly=0A=20never=20detected=20a=20conflict=20due=20to=20= invalid=20assumptions=20about=20cached=0A=20values.=0A=20=0A+---=0A+***=20= 'vc-hg'=20now=20uses=20'hg=20summary'=20command=20to=20populate=20extra=20= 'vc-dir'=0A+headers.=0A+=0A=20+++=0A=20***=20The=20Hg=20(Mercurial)=20= back-end=20now=20supports=20'vc-region-history'.=0A=20The=20'C-x=20v=20= h'=20command=20now=20works=20in=20buffers=20that=20visit=20files=20= controlled=0Adiff=20--git=20a/lisp/vc/vc-hg.el=20b/lisp/vc/vc-hg.el=0A= index=2017d38fa400..6ff4923a14=20100644=0A---=20a/lisp/vc/vc-hg.el=0A+++=20= b/lisp/vc/vc-hg.el=0A@@=20-1357,25=20+1357,28=20@@=20= vc-hg-dir-status-files=0A=20=20=20(vc-run-delayed=0A=20=20=20=20=20= (vc-hg-after-dir-status=20update-function)))=0A=20=0A-(defun=20= vc-hg-dir-extra-header=20(name=20&rest=20commands)=0A-=20=20(concat=20= (propertize=20name=20'face=20'font-lock-type-face)=0A-=20=20=20=20=20=20=20= =20=20=20(propertize=0A-=20=20=20=20=20=20=20=20=20=20=20= (with-temp-buffer=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20(apply=20= 'vc-hg-command=20(current-buffer)=200=20nil=20commands)=0A-=20=20=20=20=20= =20=20=20=20=20=20=20=20(buffer-substring-no-properties=20(point-min)=20= (1-=20(point-max))))=0A-=20=20=20=20=20=20=20=20=20=20=20'face=20= 'font-lock-variable-name-face)))=0A-=0A=20(defun=20= vc-hg-dir-extra-headers=20(dir)=0A-=20=20"Generate=20extra=20status=20= headers=20for=20a=20Mercurial=20tree."=0A+=20=20"Generate=20extra=20= status=20headers=20for=20a=20repository=20in=20DIR.=0A+This=20runs=20the=20= command=20\"hg=20summary\"."=0A=20=20=20(let=20((default-directory=20= dir))=0A-=20=20=20=20(concat=0A-=20=20=20=20=20(vc-hg-dir-extra-header=20= "Root=20=20=20=20=20=20=20:=20"=20"root")=20"\n"=0A-=20=20=20=20=20= (vc-hg-dir-extra-header=20"Branch=20=20=20=20=20:=20"=20"id"=20"-b")=20= "\n"=0A-=20=20=20=20=20(vc-hg-dir-extra-header=20"Tags=20=20=20=20=20=20=20= :=20"=20"id"=20"-t")=20;=20"\n"=0A-=20=20=20=20=20;;=20these=20change=20= after=20each=20commit=0A-=20=20=20=20=20;;=20(vc-hg-dir-extra-header=20= "Local=20num=20=20:=20"=20"id"=20"-n")=20"\n"=0A-=20=20=20=20=20;;=20= (vc-hg-dir-extra-header=20"Global=20id=20=20:=20"=20"id"=20"-i")=0A-=20=20= =20=20=20)))=0A+=20=20=20=20(with-temp-buffer=0A+=20=20=20=20=20=20= (vc-hg-command=20t=200=20nil=20"summary")=0A+=20=20=20=20=20=20= (goto-char=20(point-min))=0A+=20=20=20=20=20=20(mapconcat=0A+=20=20=20=20= =20=20=20#'identity=0A+=20=20=20=20=20=20=20(let=20(result)=0A+=20=20=20=20= =20=20=20=20=20(while=20(not=20(eobp))=0A+=20=20=20=20=20=20=20=20=20=20=20= (push=0A+=20=20=20=20=20=20=20=20=20=20=20=20(let=20((entry=20(if=20= (looking-at=20"\\([^=20].*\\):\\s-+\\(.*\\)")=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(cons=20= (capitalize=20(match-string=201))=20(match-string=202))=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(cons=20= ""=20(buffer-substring=20(point)=20(line-end-position))))))=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(concat=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(propertize=20(format=20"%-11s:=20"=20(car=20entry))=20'face=20= 'font-lock-type-face)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (propertize=20(cdr=20entry)=20'face=20'font-lock-variable-name-face)))=0A= +=20=20=20=20=20=20=20=20=20=20=20=20result)=0A+=20=20=20=20=20=20=20=20=20= =20=20(forward-line))=0A+=20=20=20=20=20=20=20=20=20(nreverse=20result))=0A= +=20=20=20=20=20=20=20"\n"))))=0A=20=0A=20(defun=20vc-hg-log-incoming=20= (buffer=20remote-location)=0A=20=20=20(vc-hg-command=20buffer=201=20nil=20= "incoming"=20"-n"=20(unless=20(string=3D=20remote-location=20"")=0A--=20=0A= 2.15.1=0A=0A= --Apple-Mail=_33222393-D5E6-4638-A9D3-399A154B8A7B-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 28 04:50:24 2019 Received: (at 38387) by debbugs.gnu.org; 28 Nov 2019 09:50:24 +0000 Received: from localhost ([127.0.0.1]:56656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iaGRM-0006bx-2X for submit@debbugs.gnu.org; Thu, 28 Nov 2019 04:50:24 -0500 Received: from mail-wr1-f46.google.com ([209.85.221.46]:42644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iaGRK-0006bj-Nn for 38387@debbugs.gnu.org; Thu, 28 Nov 2019 04:50:23 -0500 Received: by mail-wr1-f46.google.com with SMTP id a15so30274110wrf.9 for <38387@debbugs.gnu.org>; Thu, 28 Nov 2019 01:50:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=2bjBQXujhisdnY+2acRWANGF78CxneGxSXkdLeu2sU4=; b=vXdxCAgWdGzuQ0snii1j40v6KAJ0U0iimV7B64+vBRVxgIJiSTcYswAACqeBS3otr3 Y8iQpQvnQj0HYHPL0ZG67viymKP7eN/TnI8zKxbMQZJGD1o/rU2llMbih5kX1I+FfB0w +PF3LQTpkC6ZX5oD4cT/0wyl5JBlMwwGHeZJZwPhJNfVZO1wxfRsaSY8xLajnvsbbPyX MHsZRa5m7pUiSrUco7kQf31XNwAe4mdCBzRRP1a/Oue0TM2gz+YWs1tID5AzXI5Jpc9h cvQqWx347/kLmbMrviFSokzDOcLSq0MC4HhWukp/JY8hqDxkXEKcCs/F2aya26mJG09g GpZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2bjBQXujhisdnY+2acRWANGF78CxneGxSXkdLeu2sU4=; b=nMIFhGv/YcT9fWs56MHfMneLtToMnpYr86zOKnzHeTMAjKzvBumV4ek/IRlrbzVF7d 8RpbsHre2A+ZXyED4AwCWFTi8lI2wdwCT6cExsgSUc3wQdkOhvfajDq2vPp+lsHHqVLZ nW0UG41qqqWH18Uaw5N63gEvI6h6g5sh583N5Aav+1Tscx8v5pfHZEjT4Iq7LKA7ib0Y 20gHN27AK5fNNSpwYDuF1wQWb1d4jmQiptcQtpU8IRGuP37TVv/0efPDbeX/zQMhpvUu txBmLBM6RE28qIxEQVbL/cYnwrvyinPLE1qxXdTNcrLn5pkjvRxCt8n53fyYQGtw8Kqa RyiA== X-Gm-Message-State: APjAAAVZ7eAkby7f0W3KTTn+h7fy5znBU5LUg0ezXjdF1spc/nfIdvvV AmU+PihK8kqzYbcfpqAHRAUXwRlt X-Google-Smtp-Source: APXvYqx0bxahyMdCQcJySYV5bakzLxJEKnNFmL/amAVuq77D1WUXGnLel04SCq3ISkV4GZDCgxofRQ== X-Received: by 2002:adf:9124:: with SMTP id j33mr28193766wrj.357.1574934616436; Thu, 28 Nov 2019 01:50:16 -0800 (PST) Received: from [192.168.0.5] ([212.50.117.215]) by smtp.googlemail.com with ESMTPSA id z9sm22830195wrv.35.2019.11.28.01.50.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Nov 2019 01:50:15 -0800 (PST) Subject: Re: bug#38387: 27.0.50; [PATCH] vc-hg: use 'hg summary' to populate vc-dir headers To: Daniel Colascione References: <7505dd70-86c1-9576-5dc9-42b1abca519e@yandex.ru> <0366bc0bf7f7c65bdc5e869397d4c945.squirrel@dancol.org> From: Dmitry Gutov Message-ID: Date: Thu, 28 Nov 2019 11:50:13 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <0366bc0bf7f7c65bdc5e869397d4c945.squirrel@dancol.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 38387 Cc: 38387@debbugs.gnu.org, Andrii Kolomoiets X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.5 (/) On 27.11.2019 20:53, Daniel Colascione wrote: > What's the performance of summary like these days? Speaking of performance, 'hg summary' on my old mozilla-central checkout takes about 1.2 sec. But the current impl is not instantaneous either. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 01 19:31:18 2019 Received: (at 38387) by debbugs.gnu.org; 2 Dec 2019 00:31:18 +0000 Received: from localhost ([127.0.0.1]:36882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ibZcT-0004nq-5g for submit@debbugs.gnu.org; Sun, 01 Dec 2019 19:31:18 -0500 Received: from mail-wm1-f53.google.com ([209.85.128.53]:51536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ibZcQ-0004nc-Rt for 38387@debbugs.gnu.org; Sun, 01 Dec 2019 19:31:15 -0500 Received: by mail-wm1-f53.google.com with SMTP id g206so19912386wme.1 for <38387@debbugs.gnu.org>; Sun, 01 Dec 2019 16:31:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=6g8HRLEE6P9r+zijchGeL5yjylgPcj14WzzzjYtfivU=; b=CPfSMJekG6Ujplp/hICubDjGnccZ2bCyu1I/CG929dtbKy7w8F77DRbm8Up60qt4x8 RFw+lg66fSfp3q9yyr6xKXC/5iTcZXFESb+5YLC0qRkleII1SJAE+kvxSu5yvgmDIDBW ks77+dmVvuo7B+pEBVm4G0oyedB8+BHI7cKhkQqvVGKoYuHpM0n/WzizwNdi1VymLfbj XFq6+44Y7e+EUlLpr6x2wTdWIosfTMzpJ5Lj1tmxjXg2GxqwdbMnxKkiHwan9tuNxOvl 0vuBZ0rR/icy1m5r3NXEyPD4pcfWjD7dCTO7zVV+sz7JKjCOptgnxThQQMue9bCCM43H +Heg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=6g8HRLEE6P9r+zijchGeL5yjylgPcj14WzzzjYtfivU=; b=p/YPN/hNwL9D66aRdtQWomD0PqQIHBj+0GtpjfBo3PZOVS3mIT1NDCkCeg3LpLYS4c gpcId+ZfE+bDC1TGcrSml0lP9qMIWa5VTONqmy+tbQiegNY9gzjInSTEND+9wzaM5oH7 qBd7zPXCgL6F9rh0g1uHuKRa3HwVwVzmlnMVDRcffxGUkXWOBAcelUmg9OH98GSjpqn4 /KWyY94CFZmEhw83EmHVra9BT94N8+aTNU+d5S0aGhjUPDRnVPwUdqk6FQF0R9c0Rgxc hxlC1w04zZP1ZkJNpMgaNdDBVio4XDnVRhfrOITDLALZpbr3aArkQaRxfDLHgY/3b+sD 4YlA== X-Gm-Message-State: APjAAAXLgAemA3S2QKvakcqlSAZRfkO25NfPvbqg9DSOFtdDX1DIc1fD t/+1dinaPJTmvW3UgnHRRKAZ0YfR X-Google-Smtp-Source: APXvYqzOjPnx9Ub5NzVMbIdSNhQ2Zz3812hB3qHrZMWaarenR+0yuLY8q+OvQSXq2NgxEQBd720mKA== X-Received: by 2002:a05:600c:2144:: with SMTP id v4mr18610136wml.31.1575246668542; Sun, 01 Dec 2019 16:31:08 -0800 (PST) Received: from [192.168.0.5] ([212.50.117.215]) by smtp.googlemail.com with ESMTPSA id z189sm6870424wmc.2.2019.12.01.16.31.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Dec 2019 16:31:07 -0800 (PST) Subject: Re: bug#38387: 27.0.50; [PATCH] vc-hg: use 'hg summary' to populate vc-dir headers To: Andrii Kolomoiets , Daniel Colascione References: <7505dd70-86c1-9576-5dc9-42b1abca519e@yandex.ru> <0366bc0bf7f7c65bdc5e869397d4c945.squirrel@dancol.org> From: Dmitry Gutov Message-ID: <4b1cce9f-b6b7-4d03-00e2-118cb7f8dbb5@yandex.ru> Date: Mon, 2 Dec 2019 02:31:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 38387 Cc: 38387@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.5 (/) On 28.11.2019 10:07, Andrii Kolomoiets wrote: > Current output displays current branch and tag. There are also root dir, > but vc displays working dir itself, so root is not needed. > BTW root can be replaced with bookmark because bookmark is what > vc-hg-create-tag create when branchp. From user's POV the branch > creation is not working: > 1. Open vc-dir for hg repository > 2. C-u B c > 3. Enter branch name to create > and nothing changed in vc-dir - branch and tag are remains the same. Should it actually created branches instead? Or do Mercurial branches differ sufficiently from the same concept in other VCS? Could anybody say why vc-hg-create-tag has been using bookmarks from the outset? > Info that 'summary' shows but missed in the current output: > > - Parent revision and first line of commit message. > During merge both parents are shown. Very handy. > This info can be obtained by parsing 'hg log' command output. > > - Bookmarks, if any. > Can be obtained by 'hg id -B'. > > - Commit state. > Shows the count of modified, added, removed, renamed, copied, deleted, > unknown and unresolved files. Alright, all affected files are listed > in the same vc-dir buffer and one can count them so those numbers may > be not very interesting. > But commit state also can show if graft, update or merge is in > progress; if head are closed; if it is a new branch; if there are > changes in subrepositories. I don't know how to obtain this info. > > - Update state. > Shows the available updates count and/or branch heads count. > I don't know how obtain this info, maybe some log command. > > - Number of incoming and outgoing changes (with '--remote' switch). > It is slow, but we can allow user to decide use it or not. > > - Phase. Can show how many changesets are not shared yet. > > IMO 'summary' gives better overview of repo state. I'd like to hear from others about how crucial this info is. FWIW, I'm usually okay with the minimal VC-Dir output that vc-git does. >>> - Is 'hg summary' stable enough? Maybe a few years from now Mercurial >>> changes its output and this code stops working in all Emacs we'd have >>> released in the meantime? This is why we try to use "porcelain" level >>> commands (in Git terminology) when possible, not user-level. > > This code do nothing but propertize the text. We just show the user the > output of the user command. It would be a shame if it breaks anyway. > The layout can be messed though if the name-value separator will be > changed. To solve this the regexp can be put into the variable so it can > be changed easily. Removal of the 'summary' command is the worst case. > But AFAIK there are no prerequisites for this. Let's not hide usefull > info from the user because we affraid of hypothetical removal of the > 'summary' command :) > For now, comparing 'summary' output of hg 2.6.2 and 5.2, I can see that > phase info is added in recent version and no breaking changes at all. Moving the regexp into a var could alleviate the biggest part of the risk, indeed. >> What's the performance of summary like these days? > > Let's see. > > hg summary 0.21s user 0.16s system 98% cpu 0.376 total > > hg log -r 'p1(.)+p2(.)' 0.14s user 0.08s system 99% cpu 0.221 total > hg id --branch 0.14s user 0.13s system 98% cpu 0.280 total > hg id --tags 0.15s user 0.14s system 98% cpu 0.299 total > hg id --bookmarks 0.15s user 0.15s system 98% cpu 0.298 total > hg phase 0.12s user 0.07s system 97% cpu 0.193 total > > Yes, 'summary' is slower than single 'id' command. We're not comparing against a single one. Would it be faster than what we do now? The comparison above seems like it would? > But again, it is > faster to run a single command that gives all the info rather than run > five different commands. Imagine working with repo over TRAMP. TRAMP is an okay argument, too. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 01 19:53:53 2019 Received: (at 38387) by debbugs.gnu.org; 2 Dec 2019 00:53:53 +0000 Received: from localhost ([127.0.0.1]:36886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ibZyK-0005MH-QS for submit@debbugs.gnu.org; Sun, 01 Dec 2019 19:53:53 -0500 Received: from dancol.org ([96.126.100.184]:43636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ibZyH-0005M7-Vq for 38387@debbugs.gnu.org; Sun, 01 Dec 2019 19:53:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=v64sBc7xmAusv0rCTKNGGc9hocOxY7KVaOLCKwjooNY=; b=aNlg2uhAmVN9nrhYXJkibM1eNC t1RG97QXsXSeW0GHYhoihIVhsbJw7EjUCXTX1USVxXKjCJNPaEaIp1ZxJS9FUqu0Ndfrk1Q2HKh+9 3ac658iQZjCir5/DOUnYDGPUPboZUfXvlMC4dXkjPJJ6VHKdW8Y532vppt4Sslg5ROeKthgQjbSJV v9Csm77DuF4YHRoHC2PMY2rHWPB3pPyV+VVpNDU3X11SuncwjpnrUpGiHIgTnXxXH0z4Vp1avhANX EP/YAX5HP+OrtH/gnL61btKkpUQSG4+NSUwbqVlTzr2qdiuIyy92EZM+zn0lLAI2UokyfXqSidk5N 98EvRIeg==; Received: from [2604:4080:1321:9a00:e13c:266:1dc4:1cfa] by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1ibZyF-000801-Pn; Sun, 01 Dec 2019 16:53:47 -0800 Subject: Re: bug#38387: 27.0.50; [PATCH] vc-hg: use 'hg summary' to populate vc-dir headers To: Dmitry Gutov , Andrii Kolomoiets References: <7505dd70-86c1-9576-5dc9-42b1abca519e@yandex.ru> <0366bc0bf7f7c65bdc5e869397d4c945.squirrel@dancol.org> <4b1cce9f-b6b7-4d03-00e2-118cb7f8dbb5@yandex.ru> From: Daniel Colascione Message-ID: Date: Sun, 1 Dec 2019 16:53:27 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <4b1cce9f-b6b7-4d03-00e2-118cb7f8dbb5@yandex.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 38387 Cc: 38387@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) On 12/1/19 4:31 PM, Dmitry Gutov wrote: > On 28.11.2019 10:07, Andrii Kolomoiets wrote: > >> Current output displays current branch and tag. There are also root dir, >> but vc displays working dir itself, so root is not needed. >> BTW root can be replaced with bookmark because bookmark is what >> vc-hg-create-tag create when branchp.  From user's POV the branch >> creation is not working: >> 1. Open vc-dir for hg repository >> 2. C-u B c >> 3. Enter branch name to create >> and nothing changed in vc-dir - branch and tag are remains the same. > > Should it actually created branches instead? Or do Mercurial branches > differ sufficiently from the same concept in other VCS? > > Could anybody say why vc-hg-create-tag has been using bookmarks from the > outset? > >> Info that 'summary' shows but missed in the current output: >> >> - Parent revision and first line of commit message. >>    During merge both parents are shown.  Very handy. >>    This info can be obtained by parsing 'hg log' command output. >> >> - Bookmarks, if any. >>    Can be obtained by 'hg id -B'. >> >> - Commit state. >>    Shows the count of modified, added, removed, renamed, copied, deleted, >>    unknown and unresolved files.  Alright, all affected files are listed >>    in the same vc-dir buffer and one can count them so those numbers may >>    be not very interesting. >>    But commit state also can show if graft, update or merge is in >>    progress; if head are closed; if it is a new branch; if there are >>    changes in subrepositories.  I don't know how to obtain this info. >> >> - Update state. >>    Shows the available updates count and/or branch heads count. >>    I don't know how obtain this info, maybe some log command. >> >> - Number of incoming and outgoing changes (with '--remote' switch). >>    It is slow, but we can allow user to decide use it or not. >> >> - Phase.  Can show how many changesets are not shared yet. >> >> IMO 'summary' gives better overview of repo state. > > I'd like to hear from others about how crucial this info is. > > FWIW, I'm usually okay with the minimal VC-Dir output that vc-git does. > >>>> - Is 'hg summary' stable enough? Maybe a few years from now Mercurial >>>> changes its output and this code stops working in all Emacs we'd have >>>> released in the meantime? This is why we try to use "porcelain" level >>>> commands (in Git terminology) when possible, not user-level. >> >> This code do nothing but propertize the text.  We just show the user the >> output of the user command. > > It would be a shame if it breaks anyway. > >> The layout can be messed though if the name-value separator will be >> changed. To solve this the regexp can be put into the variable so it can >> be changed easily.  Removal of the 'summary' command is the worst case. >> But AFAIK there are no prerequisites for this.  Let's not hide usefull >> info from the user because we affraid of hypothetical removal of the >> 'summary' command :) >> For now, comparing 'summary' output of hg 2.6.2 and 5.2, I can see that >> phase info is added in recent version and no breaking changes at all. > > Moving the regexp into a var could alleviate the biggest part of the > risk, indeed. > >>> What's the performance of summary like these days? >> >> Let's see. >> >>    hg summary  0.21s user 0.16s system 98% cpu 0.376 total >> >>    hg log -r 'p1(.)+p2(.)'  0.14s user 0.08s system 99% cpu 0.221 total >>    hg id --branch  0.14s user 0.13s system 98% cpu 0.280 total >>    hg id --tags  0.15s user 0.14s system 98% cpu 0.299 total >>    hg id --bookmarks  0.15s user 0.15s system 98% cpu 0.298 total >>    hg phase  0.12s user 0.07s system 97% cpu 0.193 total >> >> Yes, 'summary' is slower than single 'id' command. > > We're not comparing against a single one. Would it be faster than what > we do now? The comparison above seems like it would? > >> But again, it is >> faster to run a single command that gives all the info rather than run >> five different commands. Imagine working with repo over TRAMP. > > TRAMP is an okay argument, too. I care mostly about the latency of visiting individual files. That *must* be fast. If this is something that runs only on vc-dir, that's probably fine. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 09 08:36:44 2020 Received: (at 38387) by debbugs.gnu.org; 9 Aug 2020 12:36:44 +0000 Received: from localhost ([127.0.0.1]:60268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4kZ9-0005H1-Sa for submit@debbugs.gnu.org; Sun, 09 Aug 2020 08:36:44 -0400 Received: from quimby.gnus.org ([95.216.78.240]:35770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4kZ9-0005Gn-09 for 38387@debbugs.gnu.org; Sun, 09 Aug 2020 08:36:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=EJi8+txKFP72v3m8K4jbVFmqqfMvjBzPyVQ/rM0crbI=; b=LZkgcivuavW/QwK02HvLEeSY0g onf7A7qv1APeSFW603eNIYxiyxiPTpHFN9oJ7tsPaz/8p8A6bIQmknOl4Ww7ZTtEh4gJwHiG44QQI 6i3pSVitwhIR1mthgceLb8HaUr0nh7P4OwL5Kw4A9YROxd7qloG1lR6iGscM+Cyn36Gk=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k4kYz-0001vd-Hf; Sun, 09 Aug 2020 14:36:36 +0200 From: Lars Ingebrigtsen To: Daniel Colascione Subject: Re: bug#38387: 27.0.50; [PATCH] vc-hg: use 'hg summary' to populate vc-dir headers References: <7505dd70-86c1-9576-5dc9-42b1abca519e@yandex.ru> <0366bc0bf7f7c65bdc5e869397d4c945.squirrel@dancol.org> <4b1cce9f-b6b7-4d03-00e2-118cb7f8dbb5@yandex.ru> Date: Sun, 09 Aug 2020 14:36:31 +0200 In-Reply-To: (Daniel Colascione's message of "Sun, 1 Dec 2019 16:53:27 -0800") Message-ID: <87k0y8ro6o.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Daniel Colascione writes: > I care mostly about the latency of visiting individual files. That > *must* be fast. If this is something that runs only on vc-dir, that's > probably fine. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38387 Cc: 38387@debbugs.gnu.org, Andrii Kolomoiets , Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Daniel Colascione writes: > I care mostly about the latency of visiting individual files. That > *must* be fast. If this is something that runs only on vc-dir, that's > probably fine. If I read this thread correctly, there were no objections to applying this patch, so I've now done so in Emacs 28. If that's wrong, feel free to revert the patch. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 09 08:36:50 2020 Received: (at control) by debbugs.gnu.org; 9 Aug 2020 12:36:50 +0000 Received: from localhost ([127.0.0.1]:60271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4kZG-0005HK-5q for submit@debbugs.gnu.org; Sun, 09 Aug 2020 08:36:50 -0400 Received: from quimby.gnus.org ([95.216.78.240]:35788) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4kZF-0005H2-5J for control@debbugs.gnu.org; Sun, 09 Aug 2020 08:36:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=7tLP2fVgI5kiKHUBRKvo1xSXOum+jQ/LaRS+8OewnP8=; b=pfJjcUsBNk60yw4lAKraIUCAq+ WqBLCUfUZKJIklR4WmNiAfH9/U73nvoBsn9+aBzOUXbM4PxJlheCoSSnZ6ls4K5e/sGauaE160U+J f3FqFC25/8Vc970ygoOEVQLB0XWGhXcBR+5fc3Z2x2Iy/HVam/aP/Ml5PMKR0b5P3wtA=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k4kZ7-0001vm-DP for control@debbugs.gnu.org; Sun, 09 Aug 2020 14:36:43 +0200 Date: Sun, 09 Aug 2020 14:36:40 +0200 Message-Id: <87imdsro6f.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #38387 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 38387 fixed close 38387 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) tags 38387 fixed close 38387 28.1 quit From unknown Sat Aug 16 13:45:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 07 Sep 2020 11:24:10 +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