Changeset 2933
- Timestamp:
- May 19, 2006, 6:15:57 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pyvolution/util.py
r2929 r2933 507 507 """gets the version number of the SVN 508 508 """ 509 509 510 import os, sys 510 511 if sys.platform == 'win32': 512 msg = 'does not work in Windows .... yet' 513 raise OSError, msg 511 512 # Create dummy info 513 info = 'Revision: Version info could not be obtained.' 514 info += 'A command line version of svn and access to the ' 515 info += 'repository is necessary and the output must ' 516 info += 'contain a line starting with "Revision:"' 517 518 try: 519 fid = os.popen('svn info') 520 except: 521 msg = 'svn is not recognised' 522 warn(msg, UserWarning) 514 523 else: 515 fid = os.popen('svn -info') 516 info = fid.readlines() 524 lines = fid.readlines() 517 525 fid.close() 518 return info 526 for line in lines: 527 if line.startswith('Revision:'): 528 info = line 529 break 530 531 return info 532 533 #if sys.platform == 'win32': 534 # msg = 'does not work in Windows .... yet' 535 # raise OSError, msg 536 #else: 537 # fid = os.popen('svn -info') 538 # info = fid.readlines() 539 # fid.close() 540 # return info 519 541 520 542
Note: See TracChangeset
for help on using the changeset viewer.