[PATCH] test-merge-tool: Make sure no hgmerge can be found in $PATH
Matt Mackall
mpm at selenic.com
Tue Feb 10 16:04:46 CST 2009
On Tue, 2009-02-10 at 22:49 +0100, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <mads at kiilerich.com>
> # Date 1234302458 -3600
> # Node ID ed3b2130982c5d49771f695b93fa4fecee65c267
> # Parent 9294c0158c42ce8f8dd884e214386a29d91d6ca4
> test-merge-tool: Make sure no hgmerge can be found in $PATH
>
> The merge tool selecting algorithm is hardcoded to look for hgmerge in $PATH
> before it falls back to use internal merge. This fixes the test for this
> fallback to be tolerant to existing hgmerges.
>
> diff --git a/tests/run-tests.py b/tests/run-tests.py
> --- a/tests/run-tests.py
> +++ b/tests/run-tests.py
> @@ -483,7 +483,7 @@
> INST = options.with_hg
> else:
> INST = os.path.join(HGTMP, "install")
> -BINDIR = os.path.join(INST, "bin")
> +BINDIR = os.environ["BINDIR"] = os.path.join(INST, "bin")
> PYTHONDIR = os.path.join(INST, "lib", "python")
> COVERAGE_FILE = os.path.join(TESTDIR, ".coverage")
Does this actually work? How does
#!/usr/bin/env python
..in the first line of the hg script find Python in this case?
> diff --git a/tests/test-merge-tools b/tests/test-merge-tools
> --- a/tests/test-merge-tools
> +++ b/tests/test-merge-tools
> @@ -58,7 +58,10 @@
> echo
>
> echo "# default is internal merge:"
> -domerge -r 2
> +beforemerge
> +echo "# hg merge -r 2"
> +PATH=$BINDIR hg merge -r 2
> +aftermerge
>
> echo "# simplest hgrc using false for merge:"
> echo "false.whatever=" >> .hg/hgrc
--
http://selenic.com : development and support for Mercurial and Linux
More information about the Mercurial-devel
mailing list