Subject: bug#12441: Acknowledgement (24.2.50; emacs-bzr-version is not reliable)

From: Glenn Morris <[email-masked]>
Date: Fri, 14 Sep 2012 12:16:20 -0400

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.