Changeset 660 for trunk/GSASIIpath.py


Ignore:
Timestamp:
Jun 29, 2012 4:13:28 PM (11 years ago)
Author:
toby
Message:

try revision number tracking

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpath.py

    r584 r660  
    3434if bindir == None:
    3535    print "Warning GSAS-II binary libraries not found, some sections of code will not function"
     36
     37# track the latest version number here
     38version = -1
     39def SetVersionNumber(RevString):
     40    '''RevString is something like "$Revision$" that is set by subversion when
     41    the file is retrieved from subversion.
     42    '''
     43    try:
     44        RevVersion = int(RevString.split(':')[1].split()[0])
     45        global version
     46        version = max(version,RevVersion)
     47    except:
     48        pass
     49       
     50def GetVersionNumber():
     51    return version
Note: See TracChangeset for help on using the changeset viewer.