On Thu, Mar 08, 2012 at 11:37:48AM -0300, Ariel Constenla-Haile wrote:
> 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'})Forgot to mention that if you allow non-trunk repos, then the reg. exp. must change. Now /^\s*git-svn-id:.*?trunk@([0-9]+)\s+/ expects something like: git-svn-id: https://svn-master.apache.org/repos/asf/incubator/ooo/trunk@1296429 while if checking main it would be git-svn-id: https://svn-master.apache.org/repos/asf/incubator/ooo/trunk/main@1296429 and the reg. exp. won't match. It should be changed to: /^\s*git-svn-id:.*?@([0-9]+)\s+/ On the other hand, I don't get why you use git show HEAD and not just git svn info Regards -- Ariel Constenla-Haile La Plata, Argentina
pgpNrQbu4GAhl.pgp
Description: PGP signature
