* bug#12441: 24.2.50; emacs-bzr-version is not reliable
@ 2012-09-14 9:52 Harald Hanche-Olsen
[not found] ` <handler.12441.B.134761641913163.ack@debbugs.gnu.org>
2012-09-14 23:28 ` bug#12441: 24.2.50; " Andy Moreton
0 siblings, 2 replies; 9+ messages in thread
From: Harald Hanche-Olsen @ 2012-09-14 9:52 UTC (permalink / raw
To: 12441
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@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
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#12441: Acknowledgement (24.2.50; emacs-bzr-version is not reliable)
[not found] ` <handler.12441.B.134761641913163.ack@debbugs.gnu.org>
@ 2012-09-14 12:05 ` Harald Hanche-Olsen
2012-09-14 16:16 ` Glenn Morris
0 siblings, 1 reply; 9+ messages in thread
From: Harald Hanche-Olsen @ 2012-09-14 12:05 UTC (permalink / raw
To: 12441
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#12441: Acknowledgement (24.2.50; emacs-bzr-version is not reliable)
2012-09-14 12:05 ` bug#12441: Acknowledgement (24.2.50; emacs-bzr-version is not reliable) Harald Hanche-Olsen
@ 2012-09-14 16:16 ` Glenn Morris
2012-09-14 17:02 ` Harald Hanche-Olsen
0 siblings, 1 reply; 9+ messages in thread
From: Glenn Morris @ 2012-09-14 16:16 UTC (permalink / raw
To: Harald Hanche-Olsen; +Cc: 12441
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#12441: Acknowledgement (24.2.50; emacs-bzr-version is not reliable)
2012-09-14 16:16 ` Glenn Morris
@ 2012-09-14 17:02 ` Harald Hanche-Olsen
2012-09-14 19:32 ` Stefan Monnier
0 siblings, 1 reply; 9+ messages in thread
From: Harald Hanche-Olsen @ 2012-09-14 17:02 UTC (permalink / raw
To: rgm; +Cc: 12441
[Glenn Morris <rgm@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
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#12441: Acknowledgement (24.2.50; emacs-bzr-version is not reliable)
2012-09-14 17:02 ` Harald Hanche-Olsen
@ 2012-09-14 19:32 ` Stefan Monnier
2012-09-14 23:22 ` bug#12441: emacs-bzr-version is not reliable Glenn Morris
0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2012-09-14 19:32 UTC (permalink / raw
To: Harald Hanche-Olsen; +Cc: 12441
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#12441: emacs-bzr-version is not reliable
2012-09-14 19:32 ` Stefan Monnier
@ 2012-09-14 23:22 ` Glenn Morris
2012-09-15 0:35 ` Glenn Morris
0 siblings, 1 reply; 9+ messages in thread
From: Glenn Morris @ 2012-09-14 23:22 UTC (permalink / raw
To: Stefan Monnier; +Cc: Harald Hanche-Olsen, 12441
BTW, vc-bzr-working-revision gives the same result as emacs-bzr-version.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#12441: 24.2.50; emacs-bzr-version is not reliable
2012-09-14 9:52 bug#12441: 24.2.50; emacs-bzr-version is not reliable Harald Hanche-Olsen
[not found] ` <handler.12441.B.134761641913163.ack@debbugs.gnu.org>
@ 2012-09-14 23:28 ` Andy Moreton
1 sibling, 0 replies; 9+ messages in thread
From: Andy Moreton @ 2012-09-14 23:28 UTC (permalink / raw
To: 12441
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#12441: emacs-bzr-version is not reliable
2012-09-14 23:22 ` bug#12441: emacs-bzr-version is not reliable Glenn Morris
@ 2012-09-15 0:35 ` Glenn Morris
2012-09-15 1:12 ` Glenn Morris
0 siblings, 1 reply; 9+ messages in thread
From: Glenn Morris @ 2012-09-15 0:35 UTC (permalink / raw
To: Stefan Monnier; +Cc: Harald Hanche-Olsen, 12441
I found a way to improve it and committed it.
vc-bzr-find-revision should be similarly improved.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#12441: emacs-bzr-version is not reliable
2012-09-15 0:35 ` Glenn Morris
@ 2012-09-15 1:12 ` Glenn Morris
0 siblings, 0 replies; 9+ messages in thread
From: Glenn Morris @ 2012-09-15 1:12 UTC (permalink / raw
To: 12441-done
Version: 24.3
Glenn Morris wrote:
> vc-bzr-find-revision should be similarly improved.
Done.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-09-15 1:12 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-14 9:52 bug#12441: 24.2.50; emacs-bzr-version is not reliable Harald Hanche-Olsen
[not found] ` <handler.12441.B.134761641913163.ack@debbugs.gnu.org>
2012-09-14 12:05 ` bug#12441: Acknowledgement (24.2.50; emacs-bzr-version is not reliable) Harald Hanche-Olsen
2012-09-14 16:16 ` Glenn Morris
2012-09-14 17:02 ` Harald Hanche-Olsen
2012-09-14 19:32 ` Stefan Monnier
2012-09-14 23:22 ` bug#12441: emacs-bzr-version is not reliable Glenn Morris
2012-09-15 0:35 ` Glenn Morris
2012-09-15 1:12 ` Glenn Morris
2012-09-14 23:28 ` bug#12441: 24.2.50; " Andy Moreton
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.