Adam Strzelecki
2013-Sep-17 13:16 UTC
[LLVMdev] [PATCH] Detect SVN revision and path on Git working copy
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>
Mark Lacey
2013-Sep-17 17:18 UTC
[LLVMdev] [PATCH] Detect SVN revision and path on Git working copy
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
David Chisnall
2013-Sep-17 17:27 UTC
[LLVMdev] [PATCH] Detect SVN revision and path on Git working copy
On 17 Sep 2013, at 18:18, Mark Lacey <mark.lacey at apple.com> wrote:> 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.If you're not rebasing after pulling in changes from LLVM svn, then you're going to be in for a world of pain later (I, unfortunately, speak from experience here). If you're following a git tree that has any patches on top of svn ToT then you will see a git commit as the most recent one. If you're following svn via git but don't have any local patches, then you'll get the same build if you did an svn checkout. If you do git pull from the git svn mirrors without --rebase then you're already setting yourself up for so many problems that nothing we do can really help you... David
Possibly Parallel Threads
- [LLVMdev] [PATCH] Detect SVN revision and path on Git working copy
- [LLVMdev] [PATCH] Detect SVN revision and path on Git working copy
- [LLVMdev] [PATCH] Detect Haswell subarchitecture (i.e. using -march=native)
- [LLVMdev] [PATCH] Detect Haswell subarchitecture (i.e. using -march=native)
- [LLVMdev] [PATCH] Detect Haswell subarchitecture (i.e. using -march=native)