Show More
@@ -1,64 +1,124 b'' | |||
|
1 | #!/bin/sh | |
|
2 | ||
|
3 | echo "[extensions]" >> $HGRCPATH | |
|
4 | echo "color=" >> $HGRCPATH | |
|
1 | Setup | |
|
5 | 2 | |
|
6 | hg init repo | |
|
7 | cd repo | |
|
8 | cat > a <<EOF | |
|
9 | c | |
|
3 | $ echo "[extensions]" >> $HGRCPATH | |
|
4 | $ echo "color=" >> $HGRCPATH | |
|
5 | $ hg init repo | |
|
6 | $ cd repo | |
|
7 | $ cat > a <<EOF | |
|
8 | > c | |
|
9 | > c | |
|
10 | > a | |
|
11 | > a | |
|
12 | > b | |
|
13 | > a | |
|
14 | > a | |
|
15 | > c | |
|
16 | > c | |
|
17 | > EOF | |
|
18 | $ hg ci -Am adda | |
|
19 | adding a | |
|
20 | $ cat > a <<EOF | |
|
21 | > c | |
|
22 | > c | |
|
23 | > a | |
|
24 | > a | |
|
25 | > dd | |
|
26 | > a | |
|
27 | > a | |
|
28 | > c | |
|
29 | > c | |
|
30 | > EOF | |
|
31 | ||
|
32 | default context | |
|
33 | ||
|
34 | $ hg diff --nodates --color=always | |
|
35 | [0;1mdiff -r cf9f4ba66af2 a[0m | |
|
36 | [0;31;1m--- a/a[0m | |
|
37 | [0;32;1m+++ b/a[0m | |
|
38 | [0;35m@@ -2,7 +2,7 @@[0m | |
|
10 | 39 | c |
|
11 | 40 | a |
|
12 | 41 | a |
|
13 | b | |
|
14 | a | |
|
15 | a | |
|
16 | c | |
|
17 | c | |
|
18 | EOF | |
|
19 | hg ci -Am adda | |
|
20 | cat > a <<EOF | |
|
21 | c | |
|
22 | c | |
|
23 | a | |
|
24 | a | |
|
25 | dd | |
|
42 | [0;31m-b[0m | |
|
43 | [0;32m+dd[0m | |
|
26 | 44 | a |
|
27 | 45 | a |
|
28 | 46 | c |
|
29 | c | |
|
30 | EOF | |
|
31 | 47 | |
|
32 | echo '% default context' | |
|
33 | hg diff --nodates --color=always | |
|
34 | ||
|
35 | echo '% --unified=2' | |
|
36 | hg diff --nodates -U 2 --color=always | |
|
48 | --unified=2 | |
|
37 | 49 | |
|
38 | echo '% diffstat' | |
|
39 | hg diff --stat --color=always | |
|
50 | $ hg diff --nodates -U 2 --color=always | |
|
51 | [0;1mdiff -r cf9f4ba66af2 a[0m | |
|
52 | [0;31;1m--- a/a[0m | |
|
53 | [0;32;1m+++ b/a[0m | |
|
54 | [0;35m@@ -3,5 +3,5 @@[0m | |
|
55 | a | |
|
56 | a | |
|
57 | [0;31m-b[0m | |
|
58 | [0;32m+dd[0m | |
|
59 | a | |
|
60 | a | |
|
40 | 61 | |
|
41 | echo "record=" >> $HGRCPATH | |
|
42 | echo "[ui]" >> $HGRCPATH | |
|
43 | echo "interactive=true" >> $HGRCPATH | |
|
44 | echo "[diff]" >> $HGRCPATH | |
|
45 | echo "git=True" >> $HGRCPATH | |
|
62 | diffstat | |
|
63 | ||
|
64 | $ hg diff --stat --color=always | |
|
65 | a | 2 [0;32m+[0m[0;31m-[0m | |
|
66 | 1 files changed, 1 insertions(+), 1 deletions(-) | |
|
67 | $ echo "record=" >> $HGRCPATH | |
|
68 | $ echo "[ui]" >> $HGRCPATH | |
|
69 | $ echo "interactive=true" >> $HGRCPATH | |
|
70 | $ echo "[diff]" >> $HGRCPATH | |
|
71 | $ echo "git=True" >> $HGRCPATH | |
|
72 | ||
|
73 | record | |
|
46 | 74 | |
|
47 | echo % record | |
|
48 | chmod 0755 a | |
|
49 | hg record --color=always -m moda a <<EOF | |
|
50 | y | |
|
51 | y | |
|
52 | EOF | |
|
53 | echo | |
|
75 | $ chmod 0755 a | |
|
76 | $ hg record --color=always -m moda a <<EOF | |
|
77 | > y | |
|
78 | > y | |
|
79 | > EOF | |
|
80 | [0;1mdiff --git a/a b/a[0m | |
|
81 | [0;36;1mold mode 100644[0m | |
|
82 | [0;36;1mnew mode 100755[0m | |
|
83 | 1 hunks, 1 lines changed | |
|
84 | examine changes to 'a'? [Ynsfdaq?] | |
|
85 | [0;35m@@ -2,7 +2,7 @@[0m | |
|
86 | c | |
|
87 | a | |
|
88 | a | |
|
89 | [0;31m-b[0m | |
|
90 | [0;32m+dd[0m | |
|
91 | a | |
|
92 | a | |
|
93 | c | |
|
94 | record this change to 'a'? [Ynsfdaq?] | |
|
95 | $ echo | |
|
54 | 96 | |
|
55 | echo "[extensions]" >> $HGRCPATH | |
|
56 | echo "mq=" >> $HGRCPATH | |
|
97 | $ echo "[extensions]" >> $HGRCPATH | |
|
98 | $ echo "mq=" >> $HGRCPATH | |
|
99 | $ hg rollback | |
|
100 | rolling back to revision 0 (undo commit) | |
|
101 | ||
|
102 | qrecord | |
|
57 | 103 | |
|
58 | hg rollback | |
|
59 | echo % qrecord | |
|
60 | hg qrecord --color=always -m moda patch <<EOF | |
|
61 | y | |
|
62 | y | |
|
63 | EOF | |
|
64 | echo | |
|
104 | $ hg qrecord --color=always -m moda patch <<EOF | |
|
105 | > y | |
|
106 | > y | |
|
107 | > EOF | |
|
108 | [0;1mdiff --git a/a b/a[0m | |
|
109 | [0;36;1mold mode 100644[0m | |
|
110 | [0;36;1mnew mode 100755[0m | |
|
111 | 1 hunks, 1 lines changed | |
|
112 | examine changes to 'a'? [Ynsfdaq?] | |
|
113 | [0;35m@@ -2,7 +2,7 @@[0m | |
|
114 | c | |
|
115 | a | |
|
116 | a | |
|
117 | [0;31m-b[0m | |
|
118 | [0;32m+dd[0m | |
|
119 | a | |
|
120 | a | |
|
121 | c | |
|
122 | record this change to 'a'? [Ynsfdaq?] | |
|
123 | $ echo | |
|
124 |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now