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