git.samba.org
/
abartlet
/
samba.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d9a0a18
)
samba_version: Cope with building snapshots in directories without git checkout.
author
Jelmer Vernooij
<jelmer@samba.org>
Fri, 12 Nov 2010 16:18:30 +0000
(17:18 +0100)
committer
Jelmer Vernooij
<jelmer@samba.org>
Fri, 12 Nov 2010 17:42:13 +0000
(17:42 +0000)
Error out when run in a git checkout in which git fails.
buildtools/wafsamba/samba_version.py
patch
|
blob
|
history
diff --git
a/buildtools/wafsamba/samba_version.py
b/buildtools/wafsamba/samba_version.py
index bddf917ba27fde6695c4889a807a688334f03ff8..bbd6439efce48a4d8498200b58599ed7d1fd9f1a 100644
(file)
--- a/
buildtools/wafsamba/samba_version.py
+++ b/
buildtools/wafsamba/samba_version.py
@@
-1,3
+1,4
@@
+import os
import Utils
def git_version_summary(have_git):
@@
-90,7
+91,11
@@
also accepted as dictionary entries here
SAMBA_VERSION_STRING += ("rc%u" % self.RC_RELEASE)
if self.IS_SNAPSHOT:
- suffix, self.vcs_fields = git_version_summary(have_git)
+ if os.path.exists(".git"):
+ suffix, self.vcs_fields = git_version_summary(have_git)
+ else:
+ suffix = "UNKNOWN"
+ self.vcs_fields = {}
SAMBA_VERSION_STRING += "-" + suffix
else:
self.vcs_fields = {}