[LLVMdev] [PATCH] Detect SVN revision and path on Git working copy

Adam Strzelecki ono at java.pl
Tue Sep 17 06:16:42 PDT 2013


Currently when building from Git `clang --version` shows Git hash and repo URL
instead of SVN revision. However SVN is master for LLVM, so it is better to
show exactly the same as if built from SVN, if we build using clean master.

Therefore we check if last commit contains git-svn-id: and if so we extract SVN
revision and repo URL. Otherwise we fallback to Git hash and URL.

Calls to sed and grep conform to POSIX standard (no extended RE).
---
utils/GetRepositoryPath | 2 ++
utils/GetSourceVersion  | 2 ++
2 files changed, 4 insertions(+)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Detect-SVN-revision-and-path-on-Git-working-copy.patch
Type: text/x-patch
Size: 972 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130917/24f08f11/attachment.bin>


More information about the llvm-dev mailing list