Andre Staltz committed 09e1d90

version number in the usage description

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, line 82
++ DONE version number in the usage description
 - NEW wiki page at bitbucket
 >>> 0.9


 import os.path, sys, os
 import subprocess
 _bullet_re = re.compile(r'\s*[-+*]\s+')
 _done_re = re.compile(r'\+[ \t]*\+ *DONE')
 def main(env=os.environ):
-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:
-		subprocess.Popen(['hg','commit','--message',log], shell=True)
+		subprocess.Popen(['hg','commit','--message',log], shell=False)
 if __name__ == '__main__':