summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2011-07-22 12:44:59 +0200
committerJelmer Vernooij <jelmer@samba.org>2011-07-23 22:08:10 +0200
commitcd7e384d2c1f94d67ce9eb75827b42eb7e380628 (patch)
treed211f132b717ec75200c93fc57346df2231bebee /buildtools
parente6dcee9b82c72d08cf4bba5e8663367b9b85562c (diff)
downloadsamba-cd7e384d2c1f94d67ce9eb75827b42eb7e380628.tar.gz
samba-cd7e384d2c1f94d67ce9eb75827b42eb7e380628.tar.bz2
samba-cd7e384d2c1f94d67ce9eb75827b42eb7e380628.zip
wafsamba: Properly lock object store when retrieving version through Bazaar.
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/samba_version.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_version.py b/buildtools/wafsamba/samba_version.py
index 0c39ed44ec..96d5d0d47d 100644
--- a/buildtools/wafsamba/samba_version.py
+++ b/buildtools/wafsamba/samba_version.py
@@ -37,7 +37,11 @@ def bzr_version_summary(path):
ret = "BZR-%d" % revno
else:
store = get_object_store(b.repository)
- full_rev = store._lookup_revision_sha1(revid)
+ store.lock_read()
+ try:
+ full_rev = store._lookup_revision_sha1(revid)
+ finally:
+ store.unlock()
fields["GIT_COMMIT_ABBREV"] = full_rev[:7]
fields["GIT_COMMIT_FULLREV"] = full_rev
ret = "GIT-" + fields["GIT_COMMIT_ABBREV"]