setup.py
author Sushil khanchi <sushilkhanchi97@gmail.com>
Wed, 10 Apr 2019 23:19:29 +0530
changeset 4499 90f94231db5d
parent 3424 efac9aad0963
child 4792 9f2e480ad786
permissions -rw-r--r--
evolve: compat patch for recordfilter change in mercurial This patch fix the broken things because of upstream changes in recordfilter() which is being used to select the hunks interactively. It fixes the test-uncommit-interactive.t by adding the compat layer. But for test-split.t I had to fix the tests manually. To make it more clear: splitting broke at evolve side because after that upstream change now interactive mode doesn't prompt "examine change to foo" if foo is mentioned explicitly using cli; and directly jumps to hunks selection prompt (well, only if there is any changes at hunks level) And the main issue is when file which is explicitly mentioned has no changes at hunk level (for e.g copy, rename, mode change, empty new file), because in that case you don't have any control on selection of that file and it would be included automatically in first cycle of interactive selection. And this "no changes at hunks level" was the reason for test-split.t breakage as now it didn't prompt for those files which are passed on cli. To fix this I have included some content in those files to make sure that tests still demonstrate the same behaviour as they were doing before breakage. Also, I replaced some "n" with "s" as it make more sense to skip all the changes to that file in one go instead of hitting "n" multiple times (if there were multiple hunks)

import os
from distutils.core import setup
from os.path import dirname, join

META_PATH = 'hgext3rd/evolve/metadata.py'

def get_metadata():
    meta = {}
    fullpath = join(dirname(__file__), META_PATH)
    execfile(fullpath, meta)
    return meta

def get_version():
    '''Read version info from a file without importing it'''
    return get_metadata()['__version__']

def min_hg_version():
    '''Read version info from a file without importing it'''
    return get_metadata()['minimumhgversion']

py_modules = [
    'hgext3rd.serverminitopic',
]
py_packages = [
    'hgext3rd',
    'hgext3rd.evolve',
    'hgext3rd.evolve.thirdparty',
    'hgext3rd.topic',
]

if os.environ.get('INCLUDE_INHIBIT'):
    py_modules.append('hgext3rd.evolve.hack.inhibit')
    py_modules.append('hgext3rd.evolve.hack.directaccess')

setup(
    name='hg-evolve',
    version=get_version(),
    author='Pierre-Yves David',
    author_email='pierre-yves.david@ens-lyon.org',
    maintainer='Pierre-Yves David',
    maintainer_email='pierre-yves.david@ens-lyon.org',
    url='https://www.mercurial-scm.org/doc/evolution/',
    description='Flexible evolution of Mercurial history.',
    long_description=open('README').read(),
    keywords='hg mercurial',
    license='GPLv2+',
    py_modules=py_modules,
    packages=py_packages
)