Ejemplo n.º 1
0
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.

from __future__ import absolute_import

import unittest

from edenscm.mercurial import error, simplemerge, util
from hghave import require


require(["py2"])


TestCase = unittest.TestCase
# bzr compatible interface, for the tests
class Merge3(simplemerge.Merge3Text):
    """3-way merge of texts.

    Given BASE, OTHER, THIS, tries to produce a combined text
    incorporating the changes from both BASE->OTHER and BASE->THIS.
    All three will typically be sequences of lines."""

    def __init__(self, base, a, b):
        basetext = "\n".join([i.strip("\n") for i in base] + [""])
        atext = "\n".join([i.strip("\n") for i in a] + [""])
        btext = "\n".join([i.strip("\n") for i in b] + [""])
Ejemplo n.º 2
0
# Copyright (c) Meta Platforms, Inc. and affiliates.
# Copyright (c) Mercurial Contributors.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.

from __future__ import absolute_import

from hghave import require
from testutil.dott import feature, sh, testtmp  # noqa: F401


require(["false"])  # incompatible with remotefilelog + non-treemanifest


sh % "setconfig 'extensions.treemanifest=!'"
# Source bundle was generated with the following script:

# hg init
# echo a > a
# ln -s a l
# hg ci -Ama -d'0 0'
# mkdir b
# echo a > b/a
# chmod +x b/a
# hg ci -Amb -d'1 0'

sh % "hg init"
sh % 'hg -q pull "$TESTDIR/bundles/test-manifest.hg"'

# The next call is expected to return nothing: