On Sun, Jan 8, 2012 at 7:06 PM, HansBKK <[email protected]> wrote:
> Just did a fresh branch, worked fine and bzr reported 4917, but Help->About
> Leo reports:
>
> build 4900, 2012-01-08
>
> I'm not saying this is a problem, just letting you know something's doing
> some "rounding" somewhere 8-)
Thanks for this report. This does look like a problem. As I will now
explain, I would have been surprised had there *not* been a problem
after my recent change.
The 4900 number isn't "rounding", it's the fallback revno given by the
static_version constant in leoVersion.py.
leoVersion.py uses the static_version (and static_date) constants when
the file computed by the following code does not exist::
theDir = os.path.basename(__file__)
path = os.path.join(theDir,'..','.bzr','branch','last-revision')
path = os.path.normpath(path)
path = os.path.abspath(path)
As I have just verified, this corresponds to the top-level .bzr
folder. For example, the "trunk" directory contains my working copy
of lp:leo-editor, so the path is::
trunk/.bzr/branch/last-revision
Terry, the challenge, as I see it, is for the nightly-snapshot script
to do one of the following:
1. Include bzr_version.py in the nightly build **without** committing
bzr_version.py.
2. Include some *other* file (*not* part of the bzr repository-name
and location don't much matter) somewhere where the code in
leoVersion.py can get it.
In either case, leoVersion.py will then the code similar to the old
code to get the version info if the last-revision file doesn't exits.
Summary
=======
1. The only hard case is generating proper build and date numbers for
nightly snapshots.
2. It is important that no files in Leo's bzr repository change when
making the snapshots. This will keep the repo "unpolluted".
3. When running code from a nightly snapshot, the last-revision file
will *not* exist, so the script that builds the snapshot should create
some *other* file that leoVersion.py can use.
Edward
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en.