Changeset 7483


Ignore:
Timestamp:
Sep 4, 2009, 4:16:51 PM (15 years ago)
Author:
ole
Message:

Fixed bug in get_revision_number arising from wrong parsing of output
from svnversion committed in changeset:6860
This used to work before!!!!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/utilities/system_tools.py

    r7317 r7483  
    1111import getpass
    1212import tarfile
     13import warnings
     14
    1315try:
    1416    import hashlib
     
    6769
    6870    def get_revision_from_svn_entries():
    69         '''Get a subversion revision number from the .svn/entires file.'''
     71        '''Get a subversion revision number from the .svn/entries file.'''
    7072
    7173        msg = '''
     
    140142                    return get_revision_from_svn_entries()
    141143
    142             # split revision number from data
     144            # Split revision number from data
    143145            if ':' in version_info:
    144                 (_, revision_number) =  version_info.split(':')
    145             elif version_info.endswith('M'):
    146                 revision_number = version_info[:-1]
     146                revision_number, _ = version_info.split(':',1)
     147                msg = ('Some modules have not been checked in. '
     148                       'Using last version from repository: %s' % revision_number)
     149                warnings.warn(msg)
    147150            else:
    148151                revision_number = version_info
Note: See TracChangeset for help on using the changeset viewer.