Mercurial > hg
view tests/test-merge-internal-tools-pattern @ 10418:5fc090ba08a6
localrepo: add optional validation (defaults to off) for incoming changes
This verifies that all manifests are present for incoming changes,
and all files for those manifests are also present. This is a simple
first-pass, and could be better, but seems like a valuable thing to
have, as I've seen pushes in the past that propagated revlog corruption.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Thu, 11 Feb 2010 16:37:43 -0600 |
parents | a3668330f14a |
children | 4c94b6d0fb1c |
line wrap: on
line source
#!/bin/sh # make sure that the internal merge tools (internal:fail, internal:local, and # internal:other) are used when matched by a merge-pattern in hgrc unset HGMERGE # make sure HGMERGE doesn't interfere with the test hg init echo "# initial file contents" echo "line 1" > f echo "line 2" >> f echo "line 3" >> f hg commit -Am "revision 0" -d "1000000 0" cat f echo "# branch 1: editing line 1" sed 's/line 1/first line/' f > f.new mv f.new f hg commit -Am "edited first line" -d "1000000 0" echo "# branch 2: editing line 3" hg update 0 sed 's/line 3/third line/' f > f.new mv f.new f hg commit -Am "edited third line" -d "1000000 0" echo "# merge using internal:fail tool" echo "[merge-patterns]" > .hg/hgrc echo "* = internal:fail" >> .hg/hgrc hg merge cat f hg stat echo "# merge using internal:local tool" hg update -C 2 sed 's/internal:fail/internal:local/' .hg/hgrc > .hg/hgrc.new mv .hg/hgrc.new .hg/hgrc hg merge cat f hg stat echo "# merge using internal:other tool" hg update -C 2 sed 's/internal:local/internal:other/' .hg/hgrc > .hg/hgrc.new mv .hg/hgrc.new .hg/hgrc hg merge cat f hg stat echo "# merge using default tool" hg update -C 2 rm .hg/hgrc hg merge cat f hg stat