[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#22032: 24.3; VC doesn't handle hg hidden revisions
From: |
Dmitry Gutov |
Subject: |
bug#22032: 24.3; VC doesn't handle hg hidden revisions |
Date: |
Sat, 28 Nov 2015 04:44:52 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Thunderbird/42.0 |
On 11/27/2015 01:36 PM, Glenn Hutchings wrote:
In the *vc-change-log* buffer, pressing '=' should display the diff
twixt the current and previous revisions. This fails when (1) the HG
backend is being used, and (2) the mercurial change history contains
hidden revisions.
Could you link to some relevant documentation? The closest I've been
able to find mentions "secret changesets".
Hidden revisions are a fairly recent mercurial feature. By default,
they're not displayed; hg needs a "--hidden" argument to consider them.
Is there a reason why we wouldn't want to use that argument and just
always display them?
The lisp function to find the previous rev number
(vc-hg-previous-revision) just decrements the current rev by 1. In the
example above, doing a diff on changeset 2 would try to use the hidden
revision 1 and then mercurial gives an error to the effect of "rev 1 is
hidden" (sorry, don't have the exact text to hand).
Would calling 'hg diff --hidden' help?
Possible fix:
actually move to the previous rev in the buffer, and get the rev number
from that.
Unfortunately, vc-hg-previous-revision is not always called from the
vc-log buffer. E.g. it's also called from the vc-annotate buffer. So
we'd need a more reliable way to detect the previous revision. Such as
an Hg command line invocation, probably.
To repeat it: get a mercurial repo with hidden changeset (as above) and
try the command with latest mercurial.
A publicly available example would be nice.