Show More
@@ -1,58 +1,58 | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | hg init repo |
|
4 | 4 | cd repo |
|
5 | 5 | cat > a <<EOF |
|
6 | 6 | c |
|
7 | 7 | c |
|
8 | 8 | a |
|
9 | 9 | a |
|
10 | 10 | b |
|
11 | 11 | a |
|
12 | 12 | a |
|
13 | 13 | c |
|
14 | 14 | c |
|
15 | 15 | EOF |
|
16 | 16 | hg ci -Am adda |
|
17 | 17 | cat > a <<EOF |
|
18 | 18 | c |
|
19 | 19 | c |
|
20 | 20 | a |
|
21 | 21 | a |
|
22 | 22 | dd |
|
23 | 23 | a |
|
24 | 24 | a |
|
25 | 25 | c |
|
26 | 26 | c |
|
27 | 27 | EOF |
|
28 | 28 | |
|
29 | 29 | echo '% default context' |
|
30 | 30 | hg diff --nodates |
|
31 | 31 | |
|
32 | 32 | echo '% invalid --unified' |
|
33 | 33 | hg diff --nodates -U foo |
|
34 | 34 | |
|
35 | 35 | echo '% --unified=2' |
|
36 | 36 | hg diff --nodates -U 2 |
|
37 | 37 | |
|
38 | 38 | echo '% diff.unified=2' |
|
39 | 39 | hg --config diff.unified=2 diff --nodates |
|
40 | 40 | |
|
41 | 41 | echo '% diff.unified=2 --unified=1' |
|
42 | 42 | hg diff --nodates -U 1 |
|
43 | 43 | |
|
44 | 44 | echo '% invalid diff.unified' |
|
45 | 45 | hg --config diff.unified=foo diff --nodates |
|
46 | 46 | |
|
47 | 47 | echo % test off-by-one error with diff -p |
|
48 | 48 | hg init diffp |
|
49 | 49 | cd diffp |
|
50 | 50 | echo a > a |
|
51 | 51 | hg ci -Ama |
|
52 | 52 | rm a |
|
53 | 53 | echo b > a |
|
54 | 54 | echo a >> a |
|
55 | 55 | echo c >> a |
|
56 | hg diff -U0 -p | |
|
56 | hg diff -U0 -p --nodates | |
|
57 | 57 | |
|
58 | 58 | exit 0 |
@@ -1,58 +1,58 | |||
|
1 | 1 | adding a |
|
2 | 2 | % default context |
|
3 | 3 | diff -r cf9f4ba66af2 a |
|
4 | 4 | --- a/a |
|
5 | 5 | +++ b/a |
|
6 | 6 | @@ -2,7 +2,7 @@ |
|
7 | 7 | c |
|
8 | 8 | a |
|
9 | 9 | a |
|
10 | 10 | -b |
|
11 | 11 | +dd |
|
12 | 12 | a |
|
13 | 13 | a |
|
14 | 14 | c |
|
15 | 15 | % invalid --unified |
|
16 | 16 | abort: diff context lines count must be an integer, not 'foo' |
|
17 | 17 | % --unified=2 |
|
18 | 18 | diff -r cf9f4ba66af2 a |
|
19 | 19 | --- a/a |
|
20 | 20 | +++ b/a |
|
21 | 21 | @@ -3,5 +3,5 @@ |
|
22 | 22 | a |
|
23 | 23 | a |
|
24 | 24 | -b |
|
25 | 25 | +dd |
|
26 | 26 | a |
|
27 | 27 | a |
|
28 | 28 | % diff.unified=2 |
|
29 | 29 | diff -r cf9f4ba66af2 a |
|
30 | 30 | --- a/a |
|
31 | 31 | +++ b/a |
|
32 | 32 | @@ -3,5 +3,5 @@ |
|
33 | 33 | a |
|
34 | 34 | a |
|
35 | 35 | -b |
|
36 | 36 | +dd |
|
37 | 37 | a |
|
38 | 38 | a |
|
39 | 39 | % diff.unified=2 --unified=1 |
|
40 | 40 | diff -r cf9f4ba66af2 a |
|
41 | 41 | --- a/a |
|
42 | 42 | +++ b/a |
|
43 | 43 | @@ -4,3 +4,3 @@ |
|
44 | 44 | a |
|
45 | 45 | -b |
|
46 | 46 | +dd |
|
47 | 47 | a |
|
48 | 48 | % invalid diff.unified |
|
49 | 49 | abort: diff context lines count must be an integer, not 'foo' |
|
50 | 50 | % test off-by-one error with diff -p |
|
51 | 51 | adding a |
|
52 | 52 | diff -r cb9a9f314b8b a |
|
53 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
|
54 | +++ b/a Thu Nov 27 17:46:15 2008 +0000 | |
|
53 | --- a/a | |
|
54 | +++ b/a | |
|
55 | 55 | @@ -1,0 +1,1 @@ |
|
56 | 56 | +b |
|
57 | 57 | @@ -2,0 +3,1 @@ a |
|
58 | 58 | +c |
General Comments 0
You need to be logged in to leave comments.
Login now