diff options
| author | Bryan O'Sullivan <bos@lindenlab.com> | 2009-09-01 11:54:34 -0700 | 
|---|---|---|
| committer | Bryan O'Sullivan <bos@lindenlab.com> | 2009-09-01 11:54:34 -0700 | 
| commit | dd628f29af0fcd0ec5f62ee71fc201c1e523a32a (patch) | |
| tree | da237da70eb1e3100f11575027d95fcbfafa3229 /indra | |
| parent | 5f3a7fa6f3ba45d875ec437c5df9e712f3c6b5a2 (diff) | |
Use rev numbers instead of changeset IDs for now.
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/lib/python/indra/util/llversion.py | 14 | 
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')) | 
