From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.bugs Subject: bug#22032: 24.3; VC doesn't handle hg hidden revisions Date: Wed, 16 Dec 2015 03:02:38 +0000 Message-ID: <86io3zf641.fsf@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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1450238859 10448 80.91.229.3 (16 Dec 2015 04:07:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Dec 2015 04:07:39 +0000 (UTC) To: 22032@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 16 05:07:26 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 1a93N7-0002xv-JW for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Dec 2015 05:07:25 +0100 Original-Received: from localhost ([::1]:45231 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a92xw-0002bP-84 for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Dec 2015 22:41:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a92xk-0002Gn-IH for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 22:41:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a92sk-0003Zy-H9 for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 22:36:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a92sk-0003Zt-Dl for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 22:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1a92sk-00053E-BQ for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 22:36:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <56584054.5080100@gmail.com> Resent-From: Andy Moreton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Dec 2015 03:36:02 +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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.145023690519348 (code B ref -1); Wed, 16 Dec 2015 03:36:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Dec 2015 03:35:05 +0000 Original-Received: from localhost ([127.0.0.1]:53100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a92ro-000520-Nx for submit@debbugs.gnu.org; Tue, 15 Dec 2015 22:35:04 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45610) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a92rm-00051T-TW for submit@debbugs.gnu.org; Tue, 15 Dec 2015 22:35:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a92re-00031t-6r for submit@debbugs.gnu.org; Tue, 15 Dec 2015 22:34:57 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:38896) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a92re-00030u-3A for submit@debbugs.gnu.org; Tue, 15 Dec 2015 22:34:54 -0500 Original-Received: from [2001:4830:134:3::10] (port=46866 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a92Mu-00017K-Ui for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 22:03:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a92Me-0005mw-Bk for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 22:02:57 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:54697) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a92Me-0005lV-4w for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 22:02:52 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1a92MZ-0001QY-LV for bug-gnu-emacs@gnu.org; Wed, 16 Dec 2015 04:02:47 +0100 Original-Received: from 82-69-64-228.dsl.in-addr.zen.co.uk ([82.69.64.228]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 16 Dec 2015 04:02:47 +0100 Original-Received: from andrewjmoreton by 82-69-64-228.dsl.in-addr.zen.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 16 Dec 2015 04:02:47 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 50 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 82-69-64-228.dsl.in-addr.zen.co.uk User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (windows-nt) Cancel-Lock: sha1:JJRQwLD/dvw7zokzhfxFZWeJqu4= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:110042 Archived-At: On Wed 16 Dec 2015, Dmitry Gutov wrote: > On 12/16/2015 01:53 AM, Andy Moreton wrote: > >> This problem with revision IDs also accurs if the repo contains named >> branches. in that case the numerically previous revision may be on a >> different branch, resulting in a meaningless diff that is slow to >> compute. > > So it's a bug in the current implementation, even without hidden revisions? Yes. > I'll try to remember this next time someone tells me about user-friendliness > of numeric revisions. :) > >> For example (from a non-public repo with named branches), where rev >> 59951 and rev 59950 are on different named branches: >> $ hg diff -r59951 -r59950 | wc -l >> 88188 >> $ hg diff -r59951 -r59951^ | wc -l >> 70 >> $ hg id -n -r59951^ >> 59925 >> >> The first example diffs agaist the previous revision ID (which is on a >> different branch), and produces large and useless diff output. The second >> example diffs against the (first) parent, and is what is actually wanted. > > 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 ? >> To also work with named branches, something like this (untested) would be better: >> (format "last(ancestors(%d) and not hidden())" newrev) > > So, what if we don't pass "--hidden" to this command? Will `ancestors' error > out upon encountering a hidden revision, or will they skip to the first > visible one? No idea - I haven't used this new feature, or spent the time to construct a test repo with hidden revisions to find out. > In the latter case, there's no need to check 'not hidden()', and the > compatibility problem can be solved like that. Perhaps - but it needs to be tested to find out. AndyM