On 3/8/12 3:37 PM, Ariel Constenla-Haile wrote:
Hi Jürgen,

On Wed, Feb 29, 2012 at 03:32:30PM +0100, Jürgen Schmidt wrote:
Hi,

i have changed the about dialog box a little bit and would like to
get your feedback.

I added a new key in the version.ini/versionrc

Revision=<svn_revison_number>
Any opinions?

Getting the revision does not work with a Git repo on Fedora 16 and
Ubuntu 10.04.3 LTS.
On these distros, subversion output when there is no subversion repo
does not match what the code in sub DetectRevisionId expects, it
outputs:

svn: '.' is not a working copy

It looks like checking for the program output may be error prone (it
would be better to check the exit code, different subversion versions
may output different things, even localized text).

I agree that would be better



Another issue is the path to the repo: now it is determined by

File::Spec->catfile($ENV{'SRC_ROOT'}, File::Spec->updir())

Moving one dir. up trunk/main will only work if you checked trunk
instead of separated repos.
So moving one dir. up can be avoided: both svn and git work in
subdirectories inside the repo; I've tested with:

export SRC_ROOT=/mnt/build/aoo/trunk/main/instsetoo_native/prj

and it works with the attached print-sv-rev-pl, both with git and svn,
even invoking just

SvnRevision::DetectRevisionId($ENV{'SRC_ROOT'})


see my other email, I think that don't work reliable for us

Another issue: if the revision is not detected for some reason (like the
error above, or the developer is working with the source distribution
- it has the repo folders stripped), the about dlg should not show an
empty " - Rev. ", the string length should be checked before.

that make sense

Juergen


Patch is attached, I won't commit it as it needs further changes.


Regards

Reply via email to