26 --- a/file.txt Thu Jan 01 00:00:00 1970 +0000 |
26 --- a/file.txt Thu Jan 01 00:00:00 1970 +0000 |
27 +++ b/file.txt Thu Jan 01 00:00:00 1970 +0000 |
27 +++ b/file.txt Thu Jan 01 00:00:00 1970 +0000 |
28 @@ -1,1 +1,1 @@ |
28 @@ -1,1 +1,1 @@ |
29 -first |
29 -first |
30 +second |
30 +second |
|
31 |
|
32 Test --from and --to |
|
33 |
|
34 $ hg diff --from . --rev . |
|
35 abort: cannot specify both --from and --rev |
|
36 [10] |
|
37 $ hg diff --to . --rev . |
|
38 abort: cannot specify both --to and --rev |
|
39 [10] |
|
40 $ hg diff --from . --change . |
|
41 abort: cannot specify both --from and --change |
|
42 [10] |
|
43 $ hg diff --to . --change . |
|
44 abort: cannot specify both --to and --change |
|
45 [10] |
|
46 $ echo dirty > file.txt |
|
47 $ hg diff --from . |
|
48 diff -r bf5ff72eb7e0 file.txt |
|
49 --- a/file.txt Thu Jan 01 00:00:00 1970 +0000 |
|
50 +++ b/file.txt Thu Jan 01 00:00:00 1970 +0000 |
|
51 @@ -1,1 +1,1 @@ |
|
52 -third |
|
53 +dirty |
|
54 $ hg diff --from . --reverse |
|
55 diff -r bf5ff72eb7e0 file.txt |
|
56 --- a/file.txt Thu Jan 01 00:00:00 1970 +0000 |
|
57 +++ b/file.txt Thu Jan 01 00:00:00 1970 +0000 |
|
58 @@ -1,1 +1,1 @@ |
|
59 -dirty |
|
60 +third |
|
61 $ hg diff --to . |
|
62 diff -r bf5ff72eb7e0 file.txt |
|
63 --- a/file.txt Thu Jan 01 00:00:00 1970 +0000 |
|
64 +++ b/file.txt Thu Jan 01 00:00:00 1970 +0000 |
|
65 @@ -1,1 +1,1 @@ |
|
66 -dirty |
|
67 +third |
|
68 $ hg diff --from 0 --to 2 |
|
69 diff -r 4bb65dda5db4 -r bf5ff72eb7e0 file.txt |
|
70 --- a/file.txt Thu Jan 01 00:00:00 1970 +0000 |
|
71 +++ b/file.txt Thu Jan 01 00:00:00 1970 +0000 |
|
72 @@ -1,1 +1,1 @@ |
|
73 -first |
|
74 +third |
|
75 $ hg diff --from 2 --to 0 |
|
76 diff -r bf5ff72eb7e0 -r 4bb65dda5db4 file.txt |
|
77 --- a/file.txt Thu Jan 01 00:00:00 1970 +0000 |
|
78 +++ b/file.txt Thu Jan 01 00:00:00 1970 +0000 |
|
79 @@ -1,1 +1,1 @@ |
|
80 -third |
|
81 +first |
|
82 $ hg co -C . |
|
83 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
31 |
84 |
32 $ cd .. |
85 $ cd .. |
33 |
86 |
34 Test dumb revspecs: top-level "x:y", "x:", ":y" and ":" ranges should be handled |
87 Test dumb revspecs: top-level "x:y", "x:", ":y" and ":" ranges should be handled |
35 as pairs even if x == y, but not for "f(x:y)" nor "x::y" (issue3474, issue4774) |
88 as pairs even if x == y, but not for "f(x:y)" nor "x::y" (issue3474, issue4774) |