def get_version():
    hg_rev='hg-unknown'
    v = '.'.join([str(i) for i in VERSION[:-1]])
    if VERSION[-1]:
        try:
            import os
            from mercurial import ui, hg
            dir = os.path.dirname(__file__)
            hg_dir = os.path.normpath(os.path.join(dir,"../../../"))
            repo = hg.repository(ui.ui(), hg_dir)
            c = repo['tip']
            hg_rev = "hg-%s:%s" % (c.rev(), c.hex()[0:12])
        except:
            pass
        v = '%s-%s %s' % (v, VERSION[-1], hg_rev)
    return v
Returns the version as a human-format string.
dataset/ETHPy150Open dokterbob/satchmo/satchmo/apps/satchmo_store/__init__.py/get_version