From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Hutchings Newsgroups: gmane.emacs.bugs Subject: bug#22032: 24.3; VC doesn't handle hg hidden revisions Date: Tue, 22 Dec 2015 20:17:09 +0000 Message-ID: <5679AFC5.1060109@gmail.com> References: <56584054.5080100@gmail.com> <56591524.3010806@yandex.ru> <5659C34E.4070300@gmail.com> <5659EDD4.7030503@yandex.ru> <868u4vxo9n.fsf@gmail.com> <5670AA42.4090903@yandex.ru> <86io3zf641.fsf@gmail.com> <56739376.30105@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040706090901060504060902" X-Trace: ger.gmane.org 1450815502 28836 80.91.229.3 (22 Dec 2015 20:18:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Dec 2015 20:18:22 +0000 (UTC) To: Dmitry Gutov , Andy Moreton , 22032@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 22 21:18:10 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aBTNp-0006FB-VI for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Dec 2015 21:18:10 +0100 Original-Received: from localhost ([::1]:52797 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBTNp-0005hO-29 for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Dec 2015 15:18:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBTNl-0005h5-40 for bug-gnu-emacs@gnu.org; Tue, 22 Dec 2015 15:18:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aBTNh-0007Gd-UX for bug-gnu-emacs@gnu.org; Tue, 22 Dec 2015 15:18:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52588) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBTNh-0007GZ-Qz for bug-gnu-emacs@gnu.org; Tue, 22 Dec 2015 15:18:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aBTNh-0002QP-Hb for bug-gnu-emacs@gnu.org; Tue, 22 Dec 2015 15:18:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Glenn Hutchings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Dec 2015 20:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22032 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22032-submit@debbugs.gnu.org id=B22032.14508154399264 (code B ref 22032); Tue, 22 Dec 2015 20:18:01 +0000 Original-Received: (at 22032) by debbugs.gnu.org; 22 Dec 2015 20:17:19 +0000 Original-Received: from localhost ([127.0.0.1]:60190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aBTN0-0002PM-Ux for submit@debbugs.gnu.org; Tue, 22 Dec 2015 15:17:19 -0500 Original-Received: from mail-wm0-f46.google.com ([74.125.82.46]:34366) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aBTMz-0002P8-Hx for 22032@debbugs.gnu.org; Tue, 22 Dec 2015 15:17:17 -0500 Original-Received: by mail-wm0-f46.google.com with SMTP id l126so122760579wml.1 for <22032@debbugs.gnu.org>; Tue, 22 Dec 2015 12:17:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type; bh=jxbPuF+UAASJRSrxoowgcnJzFeBzEHGEhQpHystdlQM=; b=J9rmgFPPUdsEf/odm0ynJFteZ5bOWgjrUG0ho9HcdpzojmpTKt9gaBrhF5nbXUfspJ xOVwuIX1f0eH/jBv+iM6HbSGZlgLzO97I3pLPUAjVvzfnvyy8YKaLoV5LXPlbjPNhEjP OVvSNSoKVPRxvTM02GpQKaToKaC8js/Qt3jHub5uw2NUDhlHmu8xt+e1QDZJyxwoiPpq Th5YllaAuHJ3c9XrMIoSZot3svkrMCpXL8LWQGJT0yYqY5W93uujQNR4cyKdG32SL/xz ZsB7SVCN9vJebvERIULiGvkCwQ/uj4QsyePHUH0WB8e04LxAl20/qMCGgZC1kRmwxoKh WWUA== X-Received: by 10.194.178.135 with SMTP id cy7mr29363444wjc.61.1450815432006; Tue, 22 Dec 2015 12:17:12 -0800 (PST) Original-Received: from [192.168.1.6] (cpc19-flit3-2-0-cust141.9-1.cable.virginm.net. [82.9.65.142]) by smtp.googlemail.com with ESMTPSA id yy8sm10057810wjc.13.2015.12.22.12.17.10 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 22 Dec 2015 12:17:10 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 In-Reply-To: <56739376.30105@yandex.ru> 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: 208.118.235.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:110286 Archived-At: This is a multi-part message in MIME format. --------------040706090901060504060902 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 12/18/15 05:02, Dmitry Gutov wrote: > On 12/16/2015 05:02 AM, Andy Moreton wrote: > >>> If there's a direct counterpart to 'git rev-parse 59951^', it would >>> be handy >>> here. >> >> You mean like the "hg id" line in the example above ? > > Um, yes. Thanks for the explanation, I've pushed the new definition of > vc-hg-previous-revision that uses 'hg id -n -r 123^' to emacs-25. > > It seems to work fine, if a little surprising for merge commits when > vc-hg-log-graph is nil (which it is by default). Also, calling Hg is > not free, and adds ~120 ms on my machine. > > Glenn, could you if it solves the hidden revision problem as well? Yes, it does. I've created a test script which recreates the problem (and solution) quite nicely. Attached is the script, and its output. Glenn --------------040706090901060504060902 Content-Type: application/x-shellscript; name="script.sh" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="script.sh" IyBJbGx1c3RyYXRlIHRoZSB2YyBoZy1ldm9sdmUgcHJvYmxlbS4KIyBOZWVkcyBldm9sdmUu cHkgcHJlc2VudCBpbiBzYW1lIGRpcmVjdG9yeS4KCnNldCAteAoKIyBTZXR0aW5ncy4KcmVw bz1yZXBvCmZpbGU9JHJlcG8vcmVhZG1lLnR4dApoZz0iaGcgLVIgJHJlcG8iCgojIEluaXRp YWxpc2UgcmVwby4Kcm0gLXJmICRyZXBvCmhnIGluaXQgJHJlcG8KCiMgRW5hYmxlIHJlcXVp cmVkIGV4dGVuc2lvbnMuCmNhdCA+ICRyZXBvLy5oZy9oZ3JjIDw8RU9GCltleHRlbnNpb25z XQpldm9sdmU9ZXZvbHZlLnB5CmdyYXBobG9nPQpFT0YKCiMgQ3JlYXRlIGluaXRpYWwgY29u dGVudC4KY2F0ID4gJGZpbGUgPDxFT0YKSGVsbG8sIHdvcmxkIQpFT0YKCiRoZyBhZGQgJGZp bGUKJGhnIGNpIC1tICJCaXJ0aC4iCgojIEFkZCBhIGNoYW5nZXNldC4KY2F0ID4+ICRmaWxl IDw8RU9GCldvcmxkLCB5b3UgYXJlIHByZXR0eQpFT0YKCiRoZyBjaSAtbSAiTGlmZS4iCgoj IEFtZW5kIGl0LgpjYXQgPj4gJGZpbGUgPDxFT0YKR29vZGJ5ZSwgd29ybGQhCkVPRgoKJGhn IGNpIC1tICJEZWF0aC4iIC0tYW1lbmQKCiMgU2VlIHdoZXJlIHdlIGFyZSwgd2l0aCBhbmQg d2l0aG91dCBoaWRkZW4gcmV2cy4KJGhnIGdsb2cKJGhnIC0taGlkZGVuIGdsb2cKCiMgR2V0 IHRoZSB0aXAgcmV2aXNpb24uCnRpcD1gJGhnIGlkIC1uIC1yIHRpcGAKCiMgUHJpbnQgcHJl dmlvdXMgcmV2IG51bWJlciwgYW5kIGdldCBhIGZhaWx1cmUgd2l0aG91dCB0aGUgJy0taGlk ZGVuJwojIG9wdGlvbi4gIEJ1dCBldmVuIHdpdGggdGhhdCBvcHRpb24sIGl0J3MgdGhlIFdy b25nIFRoaW5nIC0tIHRoZSBoaWRkZW4KIyByZXZzIGFyZSBwdXJlbHkgaW50ZXJuYWwsIGFu ZCBzaG91bGQgYmUgaWdub3JlZC4KJGhnIGlkIC1uIC1yIGBleHByICR0aXAgLSAxYAoKIyBQ cmludCBwcmV2aW91cyBub24taGlkZGVuIHBhcmVudC4gIFRoaXMgd29ya3MsIGFuZCBpcyBw cm9iYWJseSBmYXN0ZXIKIyB0aGFuIHVzaW5nIHJldnNldHMuCiRoZyBpZCAtbiAtciAkdGlw XgoKIyBCdXQgd2l0aG91dCB0aGUgZXZvbHZlIGV4dGVuc2lvbiBlbmFibGVkLCB3ZSBnZXQg dGhlIGFubm95aW5nIHdhcm5pbmcKIyBtZXNzYWdlIHByaW50ZWQgdG8gc3RkZXJyLgokaGcg LS1jb25maWcgZXh0ZW5zaW9ucy5ldm9sdmU9ISBpZCAtbiAtciAkdGlwXgo= --------------040706090901060504060902 Content-Type: text/plain; charset=UTF-8; name="script.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="script.txt" + repo=repo + file=repo/readme.txt + hg=hg -R repo + rm -rf repo + hg init repo + cat + cat + hg -R repo add repo/readme.txt + hg -R repo ci -m Birth. + cat + hg -R repo ci -m Life. + cat + hg -R repo ci -m Death. --amend + hg -R repo glog @ changeset: 3:6beb1647b809 | tag: tip | parent: 0:9134909c2dbf | user: Glenn Hutchings | date: Tue Dec 22 20:11:10 2015 +0000 | summary: Death. | o changeset: 0:9134909c2dbf user: Glenn Hutchings date: Tue Dec 22 20:11:10 2015 +0000 summary: Birth. + hg -R repo --hidden glog @ changeset: 3:6beb1647b809 | tag: tip | parent: 0:9134909c2dbf | user: Glenn Hutchings | date: Tue Dec 22 20:11:10 2015 +0000 | summary: Death. | | x changeset: 2:9964f5fac22b | | user: Glenn Hutchings | | date: Tue Dec 22 20:11:10 2015 +0000 | | summary: temporary amend commit for 16e951eccb81 | | | x changeset: 1:16e951eccb81 |/ user: Glenn Hutchings | date: Tue Dec 22 20:11:10 2015 +0000 | summary: Life. | o changeset: 0:9134909c2dbf user: Glenn Hutchings date: Tue Dec 22 20:11:10 2015 +0000 summary: Birth. + hg -R repo id -n -r tip + tip=3 + expr 3 - 1 + hg -R repo id -n -r 2 abort: hidden revision '2'! (use --hidden to access hidden revisions) + hg -R repo id -n -r 3^ 0 + hg -R repo --config extensions.evolve=! id -n -r 3^ obsolete feature not enabled but 2 markers found! 0 --------------040706090901060504060902--