Update hg.py to fix #547

support spaces in hg tag names