Commits

Andre Staltz committed 09e1d90

version number in the usage description

  • Participants
  • Parent commits c89e17d

Comments (0)

Files changed (2)

 + DONE FIXBUG windows python scripts are not understanding unicode (e.g., hgapi uses UTF8)
 + DONE FIXBUG quotes totally supported now. also removed unnecessary commit message quote wrapping
 + DONE FIXBUG windows 7 64-bit with cp850 encoding giving error 'TypeError: invalid arguments' in hypergrasscore.py, line 82
++ DONE version number in the usage description
 - NEW wiki page at bitbucket
 >>> 0.9
 

File src/hypergrasscore.py

 import os.path, sys, os
 import subprocess
 
+HYGVERSION = "0.9"
 _bullet_re = re.compile(r'\s*[-+*]\s+')
 _done_re = re.compile(r'\+[ \t]*\+ *DONE')
 
 
 def main(env=os.environ):
 	desc="""\
-Hypergrass (\'hyg\') is a Mercurial tool that performs hg commits using a TODO
+Hypergrass """+HYGVERSION+""" ('hyg') is a Mercurial tool that performs hg commits using a TODO
 file to get the commit message.
 Any line in your TODO file marked as done will be used as part of the commit
 message when you execute Hypergrass.
 - refactor those ugly classes
 - TODO fix bug #3
 
-WARNING: do not use double quotes in the TODO file.
-
 Type 'hyg' whenever you want to commit. If the TODO has got new lines
 starting with '+ DONE', those tasks will be the commit message. If there is
 no task marked with '+ DONE', 'hyg' behaves just like 'hg commit'.
 """
-	parser = OptionParser(usage='%prog [options]', description=desc, formatter=PlainHelpFormatter()) #, version="%prog 0.1")
+	parser = OptionParser(usage='%prog [options]', description=desc, formatter=PlainHelpFormatter(), version="%prog "+HYGVERSION)
 	parser.add_option('-p', '--preview', 
 		action='store_true', dest='preview', default=False, 
 		help="shows what message would be committed, but does not commit")
 	if not log:
 		quit_and_normal_commit()
 	else:
-		subprocess.Popen(['hg','commit','--message',log], shell=True)
+		subprocess.Popen(['hg','commit','--message',log], shell=False)
 		sys.exit(0)
 
 if __name__ == '__main__':