enigma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Enigma-devel] SVN revision number


From: Ronald Lamprecht
Subject: Re: [Enigma-devel] SVN revision number
Date: Wed, 27 Feb 2008 01:36:12 +0100
User-agent: Thunderbird 2.0.0.9 (Windows/20071031)

Hi,

BTW Please do not use the reply button if you start a new discussion thread - if you use reply, mail clients will show the mails still as a follow-up to the old thread!

Till Harbaum wrote:
i am constantly getting confused about the actual version on my test devices. Would it perhaps be a good idea to add the svn revision number to the main screens version line?

Something like "svn info | grep Revision | cut -d' ' -f2" will give you that number.

Unfortunatly this request is a lot more complicated than it might appear
on first view. I did investigate possible solution about two years ago
and did drop my attempts of finding a simple proper solution.

1. Svn info - output is localized

Be careful grepping svn output - it is localized and thus language
dependent.

2. Revision interpretation

Besides that you must be careful in interpretation of the revision info.
As far as I remember it is the newest revision of any updated files in
any subdirectory.

You may compose a *local* workarea out of quite different revisions of
subdirectories or single files. Svn info on the main dir is of no value
in such a development situation.

More important is the fact that the revison is only valid after an
update, but not after a commit. E.g. if you update to r1050, make local
changes and commit them as r1051, your local svn will still info you
after the commit that you are working on r1050!! This is correct, as the
central repository may contain other changes that are not yet updated in
your local copy.

Of course locally changes in a workarea are not reflected in svn info,
too. You need to check svn status.

As a consequence any automatically reported revision number is likley to
be wrong.

4. Solution approach: Keywords

You may think of using svn keywords as we do within our testlevel revisions.

Keywords are updated on commit. But only if the file did change. There
is no file that changes with every commit. Thus you cannot use keywords.

5. Solution approach: (svn info,...) generate revision to an extra file

If you generate the info within the compilation you would presume that
you operate on a svn workarea. But the make has to work on plain
distributed sources, too.


I noticed that several other projects did face the same problem. IIRC
there are even comments on the svn homepage concerning this unsolved
problem. Those projects that report revisions like Tortoise do edit them
manually into the sources.

I would appreciate any simple proper solution for this request.

Greets,

Ronald





reply via email to

[Prev in Thread] Current Thread [Next in Thread]