GNU bug report logs -
#12441
24.2.50; emacs-bzr-version is not reliable
Previous Next
Reported by: Harald Hanche-Olsen <hanche <at> math.ntnu.no>
Date: Fri, 14 Sep 2012 09:54:01 UTC
Severity: wishlist
Found in version 24.2.50
Fixed in version 24.3
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12441 in the body.
You can then email your comments to 12441 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12441
; Package
emacs
.
(Fri, 14 Sep 2012 09:54:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Harald Hanche-Olsen <hanche <at> math.ntnu.no>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 14 Sep 2012 09:54:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The variable emacs-bzr-version gives wrong information when emacs has
been built from a revision not at the tip of the current branch.
The best demonstration of the problem is shown in the second line
below, put there by M-x report-emacs-bug:
In GNU Emacs 24.2.50.1 (x86_64-apple-darwin11.4.0, NS apple-appkit-1138.47)
of 2012-09-14 on airy
Bzr revision: 110013 rgm <at> gnu.org-20120913101731-6sng9auv00p60d0i
In fact, this emacs is built from a lightweight checkout of bzr
revision 109703. The automatically provided information above seems to
be taken from the emacs-bzr-version variable, which is wrong, in other
words.
Windowing system distributor `Apple', version 10.3.1138
Configured using:
`configure '--with-ns''
- Harald
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12441
; Package
emacs
.
(Fri, 14 Sep 2012 12:07:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 12441 <at> debbugs.gnu.org (full text, mbox):
It occurs to me that I might have included a bit more detail with my
bug report.
I have a local (heavyweight) repository that tracks trunk from the
official emacs repository. The tip of that branch, at the time when
I compiled emacs, was indeed revision 110013, as reported in the
emacs-bzr-version variable.
From my local trunk I did
bzr checkout --lightweight -r 109703 . ../r109703
and then I cd'd into that directory and compiled emacs there.
The resulting emacs shows revision 110013 in emacs-bzr-version.
I have not checked if doing a heavyweight checkout would yield the
same result.
- Harald
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12441
; Package
emacs
.
(Fri, 14 Sep 2012 16:18:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 12441 <at> debbugs.gnu.org (full text, mbox):
Harald Hanche-Olsen wrote:
> I have a local (heavyweight) repository that tracks trunk from the
> official emacs repository. The tip of that branch, at the time when
> I compiled emacs, was indeed revision 110013, as reported in the
> emacs-bzr-version variable.
>
>>From my local trunk I did
>
> bzr checkout --lightweight -r 109703 . ../r109703
>
> and then I cd'd into that directory and compiled emacs there.
> The resulting emacs shows revision 110013 in emacs-bzr-version.
BTW, so does:
bzr revno
unless you add --tree.
> I have not checked if doing a heavyweight checkout would yield the
> same result.
No, that works fine. It also takes exactly the same time to checkout and
produces a directory with exactly the same size (assuming a shared
repository) as the lightweight case. So I'd suggest forgetting about
lightweight checkouts.
I'd say what you're doing is outside the simple uses cases that
emacs-bzr-version (which is really just a minor convenience for bug
reports) is for. You obviously know what revision you are using since
you specified it manually.
There's no way to get the real revision number of your lightweight
checkout without running a bzr command. But I do not want to run any
form of external command to find emacs-bzr-version, since it happens
during dumping, etc.
It would perhaps be better if we returned nil rather the wrong answer in
your case, but I see no way even to do that.
Lightweight checkouts with and without -r differ only in their dirstate
files. So perhaps the information is buried in here if someone wants to
dig it out. But there is no simple version string AFAICS.
Which is a long-winded way of saying this gets a "wontfix" from me.
Severity set to 'wishlist' from 'normal'
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 14 Sep 2012 16:20:02 GMT)
Full text and
rfc822 format available.
Added tag(s) wontfix.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 14 Sep 2012 16:20:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12441
; Package
emacs
.
(Fri, 14 Sep 2012 17:04:01 GMT)
Full text and
rfc822 format available.
Message #18 received at 12441 <at> debbugs.gnu.org (full text, mbox):
[Glenn Morris <rgm <at> gnu.org> (2012-09-14 16:16:20 UTC)]
> Harald Hanche-Olsen wrote:
>
> No, that works fine. It also takes exactly the same time to checkout and
> produces a directory with exactly the same size (assuming a shared
> repository) as the lightweight case. So I'd suggest forgetting about
> lightweight checkouts.
Hmm, I thought I had done the experiment and found differently. But
redoing it, I see that you are indeed right.
> I'd say what you're doing is outside the simple uses cases that
> emacs-bzr-version (which is really just a minor convenience for bug
> reports) is for. You obviously know what revision you are using since
> you specified it manually.
Yeah, but there is a risk of getting confused while bisecting looking
for the revision that introduced a certain bug.
> It would perhaps be better if we returned nil rather the wrong answer in
> your case, but I see no way even to do that.
In emacs-bzr-get-version, in version.el, there seems to be a special
branch in the cond dealing with lightweight checkouts. Maybe you could
just remove that branch? It will only work, and unreliably to boot,
with a lightweight checkout from a local branch.
> Which is a long-winded way of saying this gets a "wontfix" from me.
I can live with that, if you don't think my suggestion above is good.
- Harald
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12441
; Package
emacs
.
(Fri, 14 Sep 2012 19:34:01 GMT)
Full text and
rfc822 format available.
Message #21 received at 12441 <at> debbugs.gnu.org (full text, mbox):
> In emacs-bzr-get-version, in version.el, there seems to be a special
> branch in the cond dealing with lightweight checkouts. Maybe you could
> just remove that branch? It will only work, and unreliably to boot,
> with a lightweight checkout from a local branch.
Lightweight checkouts of local branches are very common, so we
definitely want to handle them right at least in the "normal" case where
the checkout is showing the tip of the corresponding branch (contrary
to your particular case).
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12441
; Package
emacs
.
(Fri, 14 Sep 2012 23:24:02 GMT)
Full text and
rfc822 format available.
Message #24 received at 12441 <at> debbugs.gnu.org (full text, mbox):
BTW, vc-bzr-working-revision gives the same result as emacs-bzr-version.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12441
; Package
emacs
.
(Fri, 14 Sep 2012 23:31:02 GMT)
Full text and
rfc822 format available.
Message #27 received at submit <at> debbugs.gnu.org (full text, mbox):
On Fri 14 Sep 2012, Harald Hanche-Olsen wrote:
> The variable emacs-bzr-version gives wrong information when emacs has
> been built from a revision not at the tip of the current branch.
I have seen this too. The value of emacs-bzr-version is the equivalent
of "bzr revno", but the version actually built will be "bzr revno --tree"
(plus any uncommitted changes).
AndyM
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12441
; Package
emacs
.
(Sat, 15 Sep 2012 00:37:01 GMT)
Full text and
rfc822 format available.
Message #30 received at 12441 <at> debbugs.gnu.org (full text, mbox):
I found a way to improve it and committed it.
vc-bzr-find-revision should be similarly improved.
Removed tag(s) wontfix.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sat, 15 Sep 2012 00:39:03 GMT)
Full text and
rfc822 format available.
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Sat, 15 Sep 2012 01:14:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Harald Hanche-Olsen <hanche <at> math.ntnu.no>
:
bug acknowledged by developer.
(Sat, 15 Sep 2012 01:14:02 GMT)
Full text and
rfc822 format available.
Message #37 received at 12441-done <at> debbugs.gnu.org (full text, mbox):
Version: 24.3
Glenn Morris wrote:
> vc-bzr-find-revision should be similarly improved.
Done.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 13 Oct 2012 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 246 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.