setup.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Fri, 05 Apr 2019 17:45:59 +0200
changeset 4473 14437b18b024
parent 3424 efac9aad0963
child 4792 9f2e480ad786
permissions -rw-r--r--
evolve: fix divergence resolution when not merging a descendant In divergence resolution, when we merge other cset with divergent one we pass a `mergeancestor` arg to merge.update() and before this patch we were passing `mergeancestor` as True in every case. But it should be True only when we are merging a descendant onto an ancestor. When mergeancestor is True it does two things: 1) allows the merge if the destination is the same as the parent of the ctx (so we can use graft to copy commits) 2) informs update that the incoming changes are newer than the destination so it doesn't prompt about "remote changed foo which local deleted". So this patch change it to pass `mergeancestor` as True only when it is required. And changes in test file shows that it wasn't prompting either in those cases when it should (acc. to 2nd point) Test written by Pierre-Yves David, based the one updated in 5dbaabfe2c59.

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
)