# HG changeset patch # User Patrick Mezard # Date 1182375151 -7200 # Node ID 0de7e6e27fe4c7cba6ef92a2c064ee08f8e60ed8 # Parent 50252ea605497aca7864264ff28e2783f7f7af85 Add tests for ui.patch regression. diff --git a/tests/test-patch b/tests/test-patch new file mode 100755 --- /dev/null +++ b/tests/test-patch @@ -0,0 +1,36 @@ +#!/bin/sh + +cat > patchtool.py <> $HGRCPATH +echo "patch=python ../patchtool.py" >> $HGRCPATH + +hg init a +cd a +echo a > a +hg commit -Ama -d '1 0' +echo b >> a +hg commit -Amb -d '2 0' +cd .. + +# This test check that: +# - custom patch commands with arguments actually works +# - patch code does not try to add weird arguments like +# --binary when custom patch commands are used. For instance +# --binary is added by default under win32. + +echo % check custom patch options are honored +hg --cwd a export -o ../a.diff tip +hg clone -r 0 a b + +hg --cwd b import -v ../a.diff + + + + + diff --git a/tests/test-patch.out b/tests/test-patch.out new file mode 100644 --- /dev/null +++ b/tests/test-patch.out @@ -0,0 +1,11 @@ +adding a +% check custom patch options are honored +requesting all changes +adding changesets +adding manifests +adding file changes +added 1 changesets with 1 changes to 1 files +1 files updated, 0 files merged, 0 files removed, 0 files unresolved +applying ../a.diff +Using custom patch +nothing changed