incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ariel Constenla-Haile <arie...@apache.org>
Subject Re: [CODE]: changed about box
Date Thu, 08 Mar 2012 14:37:48 GMT
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).


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'})


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.


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


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Mime
View raw message