summaryrefslogtreecommitdiff
path: root/indra/lib
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@lindenlab.com>2009-09-08 13:27:05 -0700
committerBryan O'Sullivan <bos@lindenlab.com>2009-09-08 13:27:05 -0700
commit7ad3af45a66955c0f1fdf905fc341cbac4391510 (patch)
tree49938a7e5d43b93693fcc7cd206c4283aa3d1a0b /indra/lib
parent0f0853a6fe23c6eb4341d6a5a0752e224cdf1b22 (diff)
parent40743eaf99c9cbfee08f0bb44bc7c614bc660f34 (diff)
Merge
Diffstat (limited to 'indra/lib')
-rw-r--r--indra/lib/python/indra/util/llversion.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/lib/python/indra/util/llversion.py b/indra/lib/python/indra/util/llversion.py
index c48ab679f4..2718a85f41 100644
--- a/indra/lib/python/indra/util/llversion.py
+++ b/indra/lib/python/indra/util/llversion.py
@@ -103,11 +103,21 @@ def get_hg_repo():
return output
def get_hg_changeset():
- status, output = commands.getstatusoutput('hg id -i')
+ # The right thing to do:
+ # status, output = commands.getstatusoutput('hg id -i')
+ # if status:
+ # print >> sys.stderr, output
+ # sys.exit(1)
+
+ # The temporary hack:
+ status, output = commands.getstatusoutput('hg parents --template "{rev}"')
if status:
print >> sys.stderr, output
sys.exit(1)
- return output
+ lines = output.splitlines()
+ if len(lines) > 1:
+ print >> sys.stderr, 'ERROR: working directory has %d parents' % len(lines)
+ return lines[0]
def using_svn():
return os.path.isdir(os.path.join(get_src_root(), '.svn'))