all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andy Moreton <andrewjmoreton@gmail.com>
To: 22032@debbugs.gnu.org
Subject: bug#22032: 24.3; VC doesn't handle hg hidden revisions
Date: Wed, 16 Dec 2015 03:02:38 +0000	[thread overview]
Message-ID: <86io3zf641.fsf@gmail.com> (raw)
In-Reply-To: <56584054.5080100@gmail.com>

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






  reply	other threads:[~2015-12-16  3:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-27 11:36 bug#22032: 24.3; VC doesn't handle hg hidden revisions Glenn Hutchings
2015-11-28  2:44 ` Dmitry Gutov
     [not found]   ` <5659C34E.4070300@gmail.com>
2015-11-28 18:09     ` Dmitry Gutov
2015-12-13 10:54       ` Glenn Hutchings
2015-12-14  3:30         ` Dmitry Gutov
     [not found]           ` <CA+hLqocwRQqXHZj1i8YOQiJS2c1nL7ahVP7OrdS=oizy=ct1XQ@mail.gmail.com>
2015-12-15 14:08             ` Dmitry Gutov
2015-12-15 23:53       ` Andy Moreton
2015-12-16  0:03         ` Dmitry Gutov
2015-12-16  3:02           ` Andy Moreton [this message]
2015-12-18  5:02             ` Dmitry Gutov
2015-12-22 20:17               ` Glenn Hutchings
2015-12-22 21:33                 ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86io3zf641.fsf@gmail.com \
    --to=andrewjmoreton@gmail.com \
    --cc=22032@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.