[haiku-development] Re: [PATCH] Retrieve SVN revision from git

  • From: Andreas Färber <andreas.faerber@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 13 Aug 2008 18:10:57 +0200


Am 13.08.2008 um 16:09 schrieb Niels Reedijk:

2008/8/13 Andreas Färber <andreas.faerber@xxxxxx>:
Hello,

When compiling Haiku from a Git repository, currently the SVN revision number is not shown in uname or AboutSystem. The attached patch adds two
additional fallback steps for retrieving the SVN revision:

When `svn info` fails, `git svn info` is called (git-svn's equivalent with
identical output).
When `git svn info` fails, `git log`is searched for a "git-svn-id: " line
and the revision is extracted from there.

I have tested the latter fallback, the other variant I only tried manually
from the command line.

Does this fallback method show any indication that it is from a third
party git tree? Perhaps it can append the name of the branch.

No, the revision is currently only a number, converted to long integer datatype in set_haiku_revision. It doesn't check for local changes in the SVN working copy either, so I'd ask we apply it in this or similar form soon to avoid images just being labelled as "Walter" without any revision and with a date in uname only. That's bad for bug reports.

I chose to set the dependency on .git/index rather than on .git/ objects/ to take into account that different branches might be based on different SVN revisions.

Andreas


Other related posts: