setup.py
author Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
Mon, 02 May 2011 19:20:29 +0200
branchstable
changeset 928 e1bf64aaef4f
parent 238 e4a389eca1b9
permissions -rw-r--r--
localrepo: reuse parent manifest in commitctx if no files have changed This speeds up the in-memory version of debugbuilddag that I'm working on considerably for the case where we want to build just a 00changelog.i (for discovery tests, for instance). There are a couple of test changes because node ids in tests have changed. The changes to the patch names in test-mq-qdelete.t were required because they could collide with nodeid abbreviations and newly actually do (patch "c" collides with id "cafe..." for patch "b"). [ original upstream description ]

#!/usr/bin/env python
# $Id$

from distutils.core import setup
import os, time

# specify version, Mercurial version otherwise
version = ''

unknown_version = 'unknown'

def getversion():
    global version, unknown_version
    if not version and os.path.isdir('.hg'):
        p = os.popen('hg --quiet identify 2> %s' % os.devnull)
        ident = p.read()[:-1]
        if not p.close() and ident:
            if ident[-1] != '+':
                version = ident
            else:
                version = ident[:-1]
                version += time.strftime('+%Y%m%d')
    return version or unknown_version

setup(name='hgkw',
      version=getversion(),
      description='Mercurial keyword extension (standalone)',
      author='Christian Ebert',
      author_email='blacktrash@gmx.net',
      url='http://www.blacktrash.org/hg/hgkeyword/',
      license='GNU GPL',
      packages=['hgkw'])