Show More
@@ -0,0 +1,36 b'' | |||||
|
1 | #!/bin/sh | |||
|
2 | ||||
|
3 | cat > patchtool.py <<EOF | |||
|
4 | import sys | |||
|
5 | print 'Using custom patch' | |||
|
6 | if '--binary' in sys.argv: | |||
|
7 | print '--binary found !' | |||
|
8 | EOF | |||
|
9 | ||||
|
10 | echo "[ui]" >> $HGRCPATH | |||
|
11 | echo "patch=python ../patchtool.py" >> $HGRCPATH | |||
|
12 | ||||
|
13 | hg init a | |||
|
14 | cd a | |||
|
15 | echo a > a | |||
|
16 | hg commit -Ama -d '1 0' | |||
|
17 | echo b >> a | |||
|
18 | hg commit -Amb -d '2 0' | |||
|
19 | cd .. | |||
|
20 | ||||
|
21 | # This test check that: | |||
|
22 | # - custom patch commands with arguments actually works | |||
|
23 | # - patch code does not try to add weird arguments like | |||
|
24 | # --binary when custom patch commands are used. For instance | |||
|
25 | # --binary is added by default under win32. | |||
|
26 | ||||
|
27 | echo % check custom patch options are honored | |||
|
28 | hg --cwd a export -o ../a.diff tip | |||
|
29 | hg clone -r 0 a b | |||
|
30 | ||||
|
31 | hg --cwd b import -v ../a.diff | |||
|
32 | ||||
|
33 | ||||
|
34 | ||||
|
35 | ||||
|
36 |
@@ -0,0 +1,11 b'' | |||||
|
1 | adding a | |||
|
2 | % check custom patch options are honored | |||
|
3 | requesting all changes | |||
|
4 | adding changesets | |||
|
5 | adding manifests | |||
|
6 | adding file changes | |||
|
7 | added 1 changesets with 1 changes to 1 files | |||
|
8 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
9 | applying ../a.diff | |||
|
10 | Using custom patch | |||
|
11 | nothing changed |
General Comments 0
You need to be logged in to leave comments.
Login now