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

Mark Lacey mark.lacey at apple.com
Tue Sep 17 10:18:01 PDT 2013


On Sep 17, 2013, at 6:16 AM, Adam Strzelecki <ono at java.pl> wrote:

> 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.

I’m not sure I follow why that is better. If I’m building from a clone of a git repo why wouldn’t I want the git hash?

> 
> 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.

This means that from build to build, depending on whether a Git change or SVN change is the most recent on my branch, I will get different results. That seems problematic.

> 
> Calls to sed and grep conform to POSIX standard (no extended RE).
> ---
> utils/GetRepositoryPath | 2 ++
> utils/GetSourceVersion  | 2 ++
> 2 files changed, 4 insertions(+)
> 
> <0001-Detect-SVN-revision-and-path-on-Git-working-copy.patch>_______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev





More information about the llvm-dev mailing list