Hi Peter, Am 08.08.19 um 22:06 schrieb Peter Kovacs: > following commandline returns the short hash of the current revision > > |git log -1 --pretty=format:%h So the code should work like this: sub > DetectRevisionIdFromGit ($) { my $path = shift; my $id = undef; open my > $proc, "cd $path && git log -1 --pretty=format:%h 2>\&1|"; while > (<$proc>) { if (/^fatal: Not a git repository/) { # Not in a GIT > repository. last; } else { $id = $proc; last; } } close $proc; return > $id; } I think you guys are faster in testing. |
What should I do with that? ;-) And just FYI: Mechtilde is preparing for the FrOSCon this weekend, she will not be available until next week. Matthias > > On 03.08.19 13:56, Mechtilde wrote: >> Hello, >> >> I looked into >> >> main/solenv/bin/modules/SvnRevision.pm:39 >> >> There we have to change the condition for the "Revision ID" >> >> Instead of the condition for the git-svn-id we should take the hash >> which followed to the word "commit" in the first line. >> >> Here is an ouput with git show HEAD from last commit in AOO42X >> >> 1. commit 7b7ead25a5e14edc410cfd3b24d145ab38514b11 (HEAD -> AOO42X, >> origin/AOO42X) >> 2. Author: Matthias Seidel <msei...@apache.org> >> 3. Date: Fri Aug 2 18:45:56 2019 +0000 >> 4. >> 5. Merged r1864263 from trunk >> 6. >> 7. Cleaned up whitespace, reordered Increase/Decrease Indent in sidebar >> 8. >> 9. git-svn-id: >> https://svn.apache.org/repos/asf/openoffice/branches/AOO42X@1864280 >> 13f79535-47bb-0310-9956-ffa450edef68 >> >> I added the line numbers for better reading. >> >> Can someone wrote the right Regular Expression in Perl. >> >> Kind regards >>
smime.p7s
Description: S/MIME Cryptographic Signature