##// END OF EJS Templates
test-log: Add test for "hg log -pf" (issue647)...
Joel Rosdahl -
r11562:efbc09fd stable
parent child Browse files
Show More
@@ -1,193 +1,198
1 #!/bin/sh
1 #!/bin/sh
2
2
3 hg init a
3 hg init a
4
4
5 cd a
5 cd a
6 echo a > a
6 echo a > a
7 hg ci -Ama -d '1 0'
7 hg ci -Ama -d '1 0'
8
8
9 hg cp a b
9 hg cp a b
10 hg ci -mb -d '2 0'
10 hg ci -mb -d '2 0'
11
11
12 mkdir dir
12 mkdir dir
13 hg mv b dir
13 hg mv b dir
14 hg ci -mc -d '3 0'
14 hg ci -mc -d '3 0'
15
15
16 hg mv a b
16 hg mv a b
17 echo a > d
17 echo a > d
18 hg add d
18 hg add d
19 hg ci -md -d '4 0'
19 hg ci -md -d '4 0'
20
20
21 hg mv dir/b e
21 hg mv dir/b e
22 hg ci -me -d '5 0'
22 hg ci -me -d '5 0'
23
23
24 hg log a
24 hg log a
25 echo % -f, directory
25 echo % -f, directory
26 hg log -f dir
26 hg log -f dir
27 echo % -f, but no args
27 echo % -f, but no args
28 hg log -f
28 hg log -f
29 echo % one rename
29 echo % one rename
30 hg log -vf a
30 hg log -vf a
31 echo % many renames
31 echo % many renames
32 hg log -vf e
32 hg log -vf e
33
33
34 echo % log -pf dir/b
35 hg log -pf dir/b
36 echo % log -vf dir/b
37 hg log -vf dir/b
38
34 echo '% log copies with --copies'
39 echo '% log copies with --copies'
35 hg log -vC --template '{rev} {file_copies}\n'
40 hg log -vC --template '{rev} {file_copies}\n'
36 echo '% log copies switch without --copies, with old filecopy template'
41 echo '% log copies switch without --copies, with old filecopy template'
37 hg log -v --template '{rev} {file_copies_switch%filecopy}\n'
42 hg log -v --template '{rev} {file_copies_switch%filecopy}\n'
38 echo '% log copies switch with --copies'
43 echo '% log copies switch with --copies'
39 hg log -vC --template '{rev} {file_copies_switch}\n'
44 hg log -vC --template '{rev} {file_copies_switch}\n'
40
45
41 echo '% log copies with hardcoded style and with --style=default'
46 echo '% log copies with hardcoded style and with --style=default'
42 hg log -vC -r4
47 hg log -vC -r4
43 hg log -vC -r4 --style=default
48 hg log -vC -r4 --style=default
44
49
45 echo % log copies, non-linear manifest
50 echo % log copies, non-linear manifest
46 hg up -C 3
51 hg up -C 3
47 hg mv dir/b e
52 hg mv dir/b e
48 echo foo > foo
53 echo foo > foo
49 hg ci -Ame2 -d '6 0'
54 hg ci -Ame2 -d '6 0'
50 hg log -v --template '{rev} {file_copies}\n' -r 5
55 hg log -v --template '{rev} {file_copies}\n' -r 5
51
56
52 echo % log copies, execute bit set
57 echo % log copies, execute bit set
53 chmod +x e
58 chmod +x e
54 hg ci -me3 -d '7 0'
59 hg ci -me3 -d '7 0'
55 hg log -v --template '{rev} {file_copies}\n' -r 6
60 hg log -v --template '{rev} {file_copies}\n' -r 6
56
61
57 echo '% log -p d'
62 echo '% log -p d'
58 hg log -pv d
63 hg log -pv d
59
64
60 # log --follow tests
65 # log --follow tests
61 hg init ../follow
66 hg init ../follow
62 cd ../follow
67 cd ../follow
63
68
64 echo base > base
69 echo base > base
65 hg ci -Ambase -d '1 0'
70 hg ci -Ambase -d '1 0'
66
71
67 echo r1 >> base
72 echo r1 >> base
68 hg ci -Amr1 -d '1 0'
73 hg ci -Amr1 -d '1 0'
69 echo r2 >> base
74 echo r2 >> base
70 hg ci -Amr2 -d '1 0'
75 hg ci -Amr2 -d '1 0'
71
76
72 hg up -C 1
77 hg up -C 1
73 echo b1 > b1
78 echo b1 > b1
74 hg ci -Amb1 -d '1 0'
79 hg ci -Amb1 -d '1 0'
75
80
76 echo % log -f
81 echo % log -f
77 hg log -f
82 hg log -f
78
83
79 hg up -C 0
84 hg up -C 0
80 echo b2 > b2
85 echo b2 > b2
81 hg ci -Amb2 -d '1 0'
86 hg ci -Amb2 -d '1 0'
82
87
83 echo % log -f -r 1:tip
88 echo % log -f -r 1:tip
84 hg log -f -r 1:tip
89 hg log -f -r 1:tip
85
90
86 hg up -C 3
91 hg up -C 3
87 hg merge tip
92 hg merge tip
88
93
89 echo % log -r . with two parents
94 echo % log -r . with two parents
90 hg log -r .
95 hg log -r .
91
96
92 hg ci -mm12 -d '1 0'
97 hg ci -mm12 -d '1 0'
93
98
94 echo % log -r . with one parent
99 echo % log -r . with one parent
95 hg log -r .
100 hg log -r .
96
101
97 echo postm >> b1
102 echo postm >> b1
98 hg ci -Amb1.1 -d'1 0'
103 hg ci -Amb1.1 -d'1 0'
99
104
100 echo % log --follow-first
105 echo % log --follow-first
101 hg log --follow-first
106 hg log --follow-first
102
107
103 echo % log -P 2
108 echo % log -P 2
104 hg log -P 2
109 hg log -P 2
105
110
106 echo '% log -r tip -p --git'
111 echo '% log -r tip -p --git'
107 hg log -r tip -p --git
112 hg log -r tip -p --git
108
113
109 echo '% log -r ""'
114 echo '% log -r ""'
110 hg log -r ''
115 hg log -r ''
111
116
112 echo '% log -r <some unknown node id>'
117 echo '% log -r <some unknown node id>'
113 hg log -r 1000000000000000000000000000000000000000
118 hg log -r 1000000000000000000000000000000000000000
114
119
115 echo '% log -k r1'
120 echo '% log -k r1'
116 hg log -k r1
121 hg log -k r1
117
122
118 echo '% log -d -1'
123 echo '% log -d -1'
119 hg log -d -1
124 hg log -d -1
120
125
121 echo '% log -p -l2 --color=always'
126 echo '% log -p -l2 --color=always'
122 hg --config extensions.color= --config color.mode=ansi \
127 hg --config extensions.color= --config color.mode=ansi \
123 log -p -l2 --color=always
128 log -p -l2 --color=always
124
129
125 echo '% log -r tip --stat'
130 echo '% log -r tip --stat'
126 hg log -r tip --stat
131 hg log -r tip --stat
127
132
128 cd ..
133 cd ..
129
134
130 hg init usertest
135 hg init usertest
131 cd usertest
136 cd usertest
132
137
133 echo a > a
138 echo a > a
134 hg ci -A -m "a" -u "User One <user1@example.org>"
139 hg ci -A -m "a" -u "User One <user1@example.org>"
135 echo b > b
140 echo b > b
136 hg ci -A -m "b" -u "User Two <user2@example.org>"
141 hg ci -A -m "b" -u "User Two <user2@example.org>"
137
142
138 hg log -u "User One <user1@example.org>"
143 hg log -u "User One <user1@example.org>"
139 hg log -u "user1" -u "user2"
144 hg log -u "user1" -u "user2"
140 hg log -u "user3"
145 hg log -u "user3"
141
146
142 cd ..
147 cd ..
143
148
144 hg init branches
149 hg init branches
145 cd branches
150 cd branches
146
151
147 echo a > a
152 echo a > a
148 hg ci -A -m "commit on default"
153 hg ci -A -m "commit on default"
149 hg branch test
154 hg branch test
150 echo b > b
155 echo b > b
151 hg ci -A -m "commit on test"
156 hg ci -A -m "commit on test"
152
157
153 hg up default
158 hg up default
154 echo c > c
159 echo c > c
155 hg ci -A -m "commit on default"
160 hg ci -A -m "commit on default"
156 hg up test
161 hg up test
157 echo c > c
162 echo c > c
158 hg ci -A -m "commit on test"
163 hg ci -A -m "commit on test"
159
164
160 echo '% log -b default'
165 echo '% log -b default'
161 hg log -b default
166 hg log -b default
162
167
163 echo '% log -b test'
168 echo '% log -b test'
164 hg log -b test
169 hg log -b test
165
170
166 echo '% log -b dummy'
171 echo '% log -b dummy'
167 hg log -b dummy
172 hg log -b dummy
168
173
169 echo '% log -b .'
174 echo '% log -b .'
170 hg log -b .
175 hg log -b .
171
176
172 echo '% log -b default -b test'
177 echo '% log -b default -b test'
173 hg log -b default -b test
178 hg log -b default -b test
174
179
175 echo '% log -b default -b .'
180 echo '% log -b default -b .'
176 hg log -b default -b .
181 hg log -b default -b .
177
182
178 echo '% log -b . -b test'
183 echo '% log -b . -b test'
179 hg log -b . -b test
184 hg log -b . -b test
180
185
181 echo '% log -b 2'
186 echo '% log -b 2'
182 hg log -b 2
187 hg log -b 2
183
188
184 echo '% log -p --cwd dir (in subdir)'
189 echo '% log -p --cwd dir (in subdir)'
185 mkdir dir
190 mkdir dir
186 hg log -p --cwd dir
191 hg log -p --cwd dir
187
192
188 echo '% log -p -R repo'
193 echo '% log -p -R repo'
189 cd dir
194 cd dir
190 hg log -p -R .. ../a
195 hg log -p -R .. ../a
191
196
192
197
193 exit 0
198 exit 0
@@ -1,528 +1,587
1 adding a
1 adding a
2 changeset: 0:8580ff50825a
2 changeset: 0:8580ff50825a
3 user: test
3 user: test
4 date: Thu Jan 01 00:00:01 1970 +0000
4 date: Thu Jan 01 00:00:01 1970 +0000
5 summary: a
5 summary: a
6
6
7 % -f, directory
7 % -f, directory
8 abort: cannot follow nonexistent file: "dir"
8 abort: cannot follow nonexistent file: "dir"
9 % -f, but no args
9 % -f, but no args
10 changeset: 4:66c1345dc4f9
10 changeset: 4:66c1345dc4f9
11 tag: tip
11 tag: tip
12 user: test
12 user: test
13 date: Thu Jan 01 00:00:05 1970 +0000
13 date: Thu Jan 01 00:00:05 1970 +0000
14 summary: e
14 summary: e
15
15
16 changeset: 3:7c6c671bb7cc
16 changeset: 3:7c6c671bb7cc
17 user: test
17 user: test
18 date: Thu Jan 01 00:00:04 1970 +0000
18 date: Thu Jan 01 00:00:04 1970 +0000
19 summary: d
19 summary: d
20
20
21 changeset: 2:41dd4284081e
21 changeset: 2:41dd4284081e
22 user: test
22 user: test
23 date: Thu Jan 01 00:00:03 1970 +0000
23 date: Thu Jan 01 00:00:03 1970 +0000
24 summary: c
24 summary: c
25
25
26 changeset: 1:784de7cef101
26 changeset: 1:784de7cef101
27 user: test
27 user: test
28 date: Thu Jan 01 00:00:02 1970 +0000
28 date: Thu Jan 01 00:00:02 1970 +0000
29 summary: b
29 summary: b
30
30
31 changeset: 0:8580ff50825a
31 changeset: 0:8580ff50825a
32 user: test
32 user: test
33 date: Thu Jan 01 00:00:01 1970 +0000
33 date: Thu Jan 01 00:00:01 1970 +0000
34 summary: a
34 summary: a
35
35
36 % one rename
36 % one rename
37 changeset: 0:8580ff50825a
37 changeset: 0:8580ff50825a
38 user: test
38 user: test
39 date: Thu Jan 01 00:00:01 1970 +0000
39 date: Thu Jan 01 00:00:01 1970 +0000
40 files: a
40 files: a
41 description:
41 description:
42 a
42 a
43
43
44
44
45 % many renames
45 % many renames
46 changeset: 4:66c1345dc4f9
46 changeset: 4:66c1345dc4f9
47 tag: tip
47 tag: tip
48 user: test
48 user: test
49 date: Thu Jan 01 00:00:05 1970 +0000
49 date: Thu Jan 01 00:00:05 1970 +0000
50 files: dir/b e
50 files: dir/b e
51 description:
51 description:
52 e
52 e
53
53
54
54
55 changeset: 2:41dd4284081e
55 changeset: 2:41dd4284081e
56 user: test
56 user: test
57 date: Thu Jan 01 00:00:03 1970 +0000
57 date: Thu Jan 01 00:00:03 1970 +0000
58 files: b dir/b
58 files: b dir/b
59 description:
59 description:
60 c
60 c
61
61
62
62
63 changeset: 1:784de7cef101
63 changeset: 1:784de7cef101
64 user: test
64 user: test
65 date: Thu Jan 01 00:00:02 1970 +0000
65 date: Thu Jan 01 00:00:02 1970 +0000
66 files: b
66 files: b
67 description:
67 description:
68 b
68 b
69
69
70
70
71 changeset: 0:8580ff50825a
71 changeset: 0:8580ff50825a
72 user: test
72 user: test
73 date: Thu Jan 01 00:00:01 1970 +0000
73 date: Thu Jan 01 00:00:01 1970 +0000
74 files: a
74 files: a
75 description:
75 description:
76 a
76 a
77
77
78
78
79 % log -pf dir/b
80 changeset: 2:41dd4284081e
81 user: test
82 date: Thu Jan 01 00:00:03 1970 +0000
83 summary: c
84
85 diff -r 784de7cef101 -r 41dd4284081e dir/b
86 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
87 +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000
88 @@ -0,0 +1,1 @@
89 +a
90
91 changeset: 1:784de7cef101
92 user: test
93 date: Thu Jan 01 00:00:02 1970 +0000
94 summary: b
95
96 diff -r 8580ff50825a -r 784de7cef101 b
97 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
98 +++ b/b Thu Jan 01 00:00:02 1970 +0000
99 @@ -0,0 +1,1 @@
100 +a
101
102 changeset: 0:8580ff50825a
103 user: test
104 date: Thu Jan 01 00:00:01 1970 +0000
105 summary: a
106
107 diff -r 000000000000 -r 8580ff50825a a
108 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
109 +++ b/a Thu Jan 01 00:00:01 1970 +0000
110 @@ -0,0 +1,1 @@
111 +a
112
113 % log -vf dir/b
114 changeset: 2:41dd4284081e
115 user: test
116 date: Thu Jan 01 00:00:03 1970 +0000
117 files: b dir/b
118 description:
119 c
120
121
122 changeset: 1:784de7cef101
123 user: test
124 date: Thu Jan 01 00:00:02 1970 +0000
125 files: b
126 description:
127 b
128
129
130 changeset: 0:8580ff50825a
131 user: test
132 date: Thu Jan 01 00:00:01 1970 +0000
133 files: a
134 description:
135 a
136
137
79 % log copies with --copies
138 % log copies with --copies
80 4 e (dir/b)
139 4 e (dir/b)
81 3 b (a)
140 3 b (a)
82 2 dir/b (b)
141 2 dir/b (b)
83 1 b (a)
142 1 b (a)
84 0
143 0
85 % log copies switch without --copies, with old filecopy template
144 % log copies switch without --copies, with old filecopy template
86 4
145 4
87 3
146 3
88 2
147 2
89 1
148 1
90 0
149 0
91 % log copies switch with --copies
150 % log copies switch with --copies
92 4 e (dir/b)
151 4 e (dir/b)
93 3 b (a)
152 3 b (a)
94 2 dir/b (b)
153 2 dir/b (b)
95 1 b (a)
154 1 b (a)
96 0
155 0
97 % log copies with hardcoded style and with --style=default
156 % log copies with hardcoded style and with --style=default
98 changeset: 4:66c1345dc4f9
157 changeset: 4:66c1345dc4f9
99 tag: tip
158 tag: tip
100 user: test
159 user: test
101 date: Thu Jan 01 00:00:05 1970 +0000
160 date: Thu Jan 01 00:00:05 1970 +0000
102 files: dir/b e
161 files: dir/b e
103 copies: e (dir/b)
162 copies: e (dir/b)
104 description:
163 description:
105 e
164 e
106
165
107
166
108 changeset: 4:66c1345dc4f9
167 changeset: 4:66c1345dc4f9
109 tag: tip
168 tag: tip
110 user: test
169 user: test
111 date: Thu Jan 01 00:00:05 1970 +0000
170 date: Thu Jan 01 00:00:05 1970 +0000
112 files: dir/b e
171 files: dir/b e
113 copies: e (dir/b)
172 copies: e (dir/b)
114 description:
173 description:
115 e
174 e
116
175
117
176
118 % log copies, non-linear manifest
177 % log copies, non-linear manifest
119 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
178 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
120 adding foo
179 adding foo
121 created new head
180 created new head
122 5 e (dir/b)
181 5 e (dir/b)
123 % log copies, execute bit set
182 % log copies, execute bit set
124 6
183 6
125 % log -p d
184 % log -p d
126 changeset: 3:7c6c671bb7cc
185 changeset: 3:7c6c671bb7cc
127 user: test
186 user: test
128 date: Thu Jan 01 00:00:04 1970 +0000
187 date: Thu Jan 01 00:00:04 1970 +0000
129 files: a b d
188 files: a b d
130 description:
189 description:
131 d
190 d
132
191
133
192
134 diff -r 41dd4284081e -r 7c6c671bb7cc d
193 diff -r 41dd4284081e -r 7c6c671bb7cc d
135 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
194 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
136 +++ b/d Thu Jan 01 00:00:04 1970 +0000
195 +++ b/d Thu Jan 01 00:00:04 1970 +0000
137 @@ -0,0 +1,1 @@
196 @@ -0,0 +1,1 @@
138 +a
197 +a
139
198
140 adding base
199 adding base
141 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
200 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
142 adding b1
201 adding b1
143 created new head
202 created new head
144 % log -f
203 % log -f
145 changeset: 3:e62f78d544b4
204 changeset: 3:e62f78d544b4
146 tag: tip
205 tag: tip
147 parent: 1:3d5bf5654eda
206 parent: 1:3d5bf5654eda
148 user: test
207 user: test
149 date: Thu Jan 01 00:00:01 1970 +0000
208 date: Thu Jan 01 00:00:01 1970 +0000
150 summary: b1
209 summary: b1
151
210
152 changeset: 1:3d5bf5654eda
211 changeset: 1:3d5bf5654eda
153 user: test
212 user: test
154 date: Thu Jan 01 00:00:01 1970 +0000
213 date: Thu Jan 01 00:00:01 1970 +0000
155 summary: r1
214 summary: r1
156
215
157 changeset: 0:67e992f2c4f3
216 changeset: 0:67e992f2c4f3
158 user: test
217 user: test
159 date: Thu Jan 01 00:00:01 1970 +0000
218 date: Thu Jan 01 00:00:01 1970 +0000
160 summary: base
219 summary: base
161
220
162 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
221 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
163 adding b2
222 adding b2
164 created new head
223 created new head
165 % log -f -r 1:tip
224 % log -f -r 1:tip
166 changeset: 1:3d5bf5654eda
225 changeset: 1:3d5bf5654eda
167 user: test
226 user: test
168 date: Thu Jan 01 00:00:01 1970 +0000
227 date: Thu Jan 01 00:00:01 1970 +0000
169 summary: r1
228 summary: r1
170
229
171 changeset: 2:60c670bf5b30
230 changeset: 2:60c670bf5b30
172 user: test
231 user: test
173 date: Thu Jan 01 00:00:01 1970 +0000
232 date: Thu Jan 01 00:00:01 1970 +0000
174 summary: r2
233 summary: r2
175
234
176 changeset: 3:e62f78d544b4
235 changeset: 3:e62f78d544b4
177 parent: 1:3d5bf5654eda
236 parent: 1:3d5bf5654eda
178 user: test
237 user: test
179 date: Thu Jan 01 00:00:01 1970 +0000
238 date: Thu Jan 01 00:00:01 1970 +0000
180 summary: b1
239 summary: b1
181
240
182 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
241 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
183 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
242 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
184 (branch merge, don't forget to commit)
243 (branch merge, don't forget to commit)
185 % log -r . with two parents
244 % log -r . with two parents
186 changeset: 3:e62f78d544b4
245 changeset: 3:e62f78d544b4
187 parent: 1:3d5bf5654eda
246 parent: 1:3d5bf5654eda
188 user: test
247 user: test
189 date: Thu Jan 01 00:00:01 1970 +0000
248 date: Thu Jan 01 00:00:01 1970 +0000
190 summary: b1
249 summary: b1
191
250
192 % log -r . with one parent
251 % log -r . with one parent
193 changeset: 5:302e9dd6890d
252 changeset: 5:302e9dd6890d
194 tag: tip
253 tag: tip
195 parent: 3:e62f78d544b4
254 parent: 3:e62f78d544b4
196 parent: 4:ddb82e70d1a1
255 parent: 4:ddb82e70d1a1
197 user: test
256 user: test
198 date: Thu Jan 01 00:00:01 1970 +0000
257 date: Thu Jan 01 00:00:01 1970 +0000
199 summary: m12
258 summary: m12
200
259
201 % log --follow-first
260 % log --follow-first
202 changeset: 6:2404bbcab562
261 changeset: 6:2404bbcab562
203 tag: tip
262 tag: tip
204 user: test
263 user: test
205 date: Thu Jan 01 00:00:01 1970 +0000
264 date: Thu Jan 01 00:00:01 1970 +0000
206 summary: b1.1
265 summary: b1.1
207
266
208 changeset: 5:302e9dd6890d
267 changeset: 5:302e9dd6890d
209 parent: 3:e62f78d544b4
268 parent: 3:e62f78d544b4
210 parent: 4:ddb82e70d1a1
269 parent: 4:ddb82e70d1a1
211 user: test
270 user: test
212 date: Thu Jan 01 00:00:01 1970 +0000
271 date: Thu Jan 01 00:00:01 1970 +0000
213 summary: m12
272 summary: m12
214
273
215 changeset: 3:e62f78d544b4
274 changeset: 3:e62f78d544b4
216 parent: 1:3d5bf5654eda
275 parent: 1:3d5bf5654eda
217 user: test
276 user: test
218 date: Thu Jan 01 00:00:01 1970 +0000
277 date: Thu Jan 01 00:00:01 1970 +0000
219 summary: b1
278 summary: b1
220
279
221 changeset: 1:3d5bf5654eda
280 changeset: 1:3d5bf5654eda
222 user: test
281 user: test
223 date: Thu Jan 01 00:00:01 1970 +0000
282 date: Thu Jan 01 00:00:01 1970 +0000
224 summary: r1
283 summary: r1
225
284
226 changeset: 0:67e992f2c4f3
285 changeset: 0:67e992f2c4f3
227 user: test
286 user: test
228 date: Thu Jan 01 00:00:01 1970 +0000
287 date: Thu Jan 01 00:00:01 1970 +0000
229 summary: base
288 summary: base
230
289
231 % log -P 2
290 % log -P 2
232 changeset: 6:2404bbcab562
291 changeset: 6:2404bbcab562
233 tag: tip
292 tag: tip
234 user: test
293 user: test
235 date: Thu Jan 01 00:00:01 1970 +0000
294 date: Thu Jan 01 00:00:01 1970 +0000
236 summary: b1.1
295 summary: b1.1
237
296
238 changeset: 5:302e9dd6890d
297 changeset: 5:302e9dd6890d
239 parent: 3:e62f78d544b4
298 parent: 3:e62f78d544b4
240 parent: 4:ddb82e70d1a1
299 parent: 4:ddb82e70d1a1
241 user: test
300 user: test
242 date: Thu Jan 01 00:00:01 1970 +0000
301 date: Thu Jan 01 00:00:01 1970 +0000
243 summary: m12
302 summary: m12
244
303
245 changeset: 4:ddb82e70d1a1
304 changeset: 4:ddb82e70d1a1
246 parent: 0:67e992f2c4f3
305 parent: 0:67e992f2c4f3
247 user: test
306 user: test
248 date: Thu Jan 01 00:00:01 1970 +0000
307 date: Thu Jan 01 00:00:01 1970 +0000
249 summary: b2
308 summary: b2
250
309
251 changeset: 3:e62f78d544b4
310 changeset: 3:e62f78d544b4
252 parent: 1:3d5bf5654eda
311 parent: 1:3d5bf5654eda
253 user: test
312 user: test
254 date: Thu Jan 01 00:00:01 1970 +0000
313 date: Thu Jan 01 00:00:01 1970 +0000
255 summary: b1
314 summary: b1
256
315
257 % log -r tip -p --git
316 % log -r tip -p --git
258 changeset: 6:2404bbcab562
317 changeset: 6:2404bbcab562
259 tag: tip
318 tag: tip
260 user: test
319 user: test
261 date: Thu Jan 01 00:00:01 1970 +0000
320 date: Thu Jan 01 00:00:01 1970 +0000
262 summary: b1.1
321 summary: b1.1
263
322
264 diff --git a/b1 b/b1
323 diff --git a/b1 b/b1
265 --- a/b1
324 --- a/b1
266 +++ b/b1
325 +++ b/b1
267 @@ -1,1 +1,2 @@
326 @@ -1,1 +1,2 @@
268 b1
327 b1
269 +postm
328 +postm
270
329
271 % log -r ""
330 % log -r ""
272 hg: parse error: empty query
331 hg: parse error: empty query
273 % log -r <some unknown node id>
332 % log -r <some unknown node id>
274 abort: unknown revision '1000000000000000000000000000000000000000'!
333 abort: unknown revision '1000000000000000000000000000000000000000'!
275 % log -k r1
334 % log -k r1
276 changeset: 1:3d5bf5654eda
335 changeset: 1:3d5bf5654eda
277 user: test
336 user: test
278 date: Thu Jan 01 00:00:01 1970 +0000
337 date: Thu Jan 01 00:00:01 1970 +0000
279 summary: r1
338 summary: r1
280
339
281 % log -d -1
340 % log -d -1
282 % log -p -l2 --color=always
341 % log -p -l2 --color=always
283 changeset: 6:2404bbcab562
342 changeset: 6:2404bbcab562
284 tag: tip
343 tag: tip
285 user: test
344 user: test
286 date: Thu Jan 01 00:00:01 1970 +0000
345 date: Thu Jan 01 00:00:01 1970 +0000
287 summary: b1.1
346 summary: b1.1
288
347
289 diff -r 302e9dd6890d -r 2404bbcab562 b1
348 diff -r 302e9dd6890d -r 2404bbcab562 b1
290 --- a/b1 Thu Jan 01 00:00:01 1970 +0000
349 --- a/b1 Thu Jan 01 00:00:01 1970 +0000
291 +++ b/b1 Thu Jan 01 00:00:01 1970 +0000
350 +++ b/b1 Thu Jan 01 00:00:01 1970 +0000
292 @@ -1,1 +1,2 @@
351 @@ -1,1 +1,2 @@
293 b1
352 b1
294 +postm
353 +postm
295
354
296 changeset: 5:302e9dd6890d
355 changeset: 5:302e9dd6890d
297 parent: 3:e62f78d544b4
356 parent: 3:e62f78d544b4
298 parent: 4:ddb82e70d1a1
357 parent: 4:ddb82e70d1a1
299 user: test
358 user: test
300 date: Thu Jan 01 00:00:01 1970 +0000
359 date: Thu Jan 01 00:00:01 1970 +0000
301 summary: m12
360 summary: m12
302
361
303 diff -r e62f78d544b4 -r 302e9dd6890d b2
362 diff -r e62f78d544b4 -r 302e9dd6890d b2
304 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
363 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
305 +++ b/b2 Thu Jan 01 00:00:01 1970 +0000
364 +++ b/b2 Thu Jan 01 00:00:01 1970 +0000
306 @@ -0,0 +1,1 @@
365 @@ -0,0 +1,1 @@
307 +b2
366 +b2
308
367
309 % log -r tip --stat
368 % log -r tip --stat
310 changeset: 6:2404bbcab562
369 changeset: 6:2404bbcab562
311 tag: tip
370 tag: tip
312 user: test
371 user: test
313 date: Thu Jan 01 00:00:01 1970 +0000
372 date: Thu Jan 01 00:00:01 1970 +0000
314 summary: b1.1
373 summary: b1.1
315
374
316 b1 | 1 +
375 b1 | 1 +
317 1 files changed, 1 insertions(+), 0 deletions(-)
376 1 files changed, 1 insertions(+), 0 deletions(-)
318
377
319 adding a
378 adding a
320 adding b
379 adding b
321 changeset: 0:29a4c94f1924
380 changeset: 0:29a4c94f1924
322 user: User One <user1@example.org>
381 user: User One <user1@example.org>
323 date: Thu Jan 01 00:00:00 1970 +0000
382 date: Thu Jan 01 00:00:00 1970 +0000
324 summary: a
383 summary: a
325
384
326 changeset: 1:e834b5e69c0e
385 changeset: 1:e834b5e69c0e
327 tag: tip
386 tag: tip
328 user: User Two <user2@example.org>
387 user: User Two <user2@example.org>
329 date: Thu Jan 01 00:00:00 1970 +0000
388 date: Thu Jan 01 00:00:00 1970 +0000
330 summary: b
389 summary: b
331
390
332 changeset: 0:29a4c94f1924
391 changeset: 0:29a4c94f1924
333 user: User One <user1@example.org>
392 user: User One <user1@example.org>
334 date: Thu Jan 01 00:00:00 1970 +0000
393 date: Thu Jan 01 00:00:00 1970 +0000
335 summary: a
394 summary: a
336
395
337 adding a
396 adding a
338 marked working directory as branch test
397 marked working directory as branch test
339 adding b
398 adding b
340 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
399 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
341 adding c
400 adding c
342 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
401 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
343 adding c
402 adding c
344 % log -b default
403 % log -b default
345 changeset: 2:c3a4f03cc9a7
404 changeset: 2:c3a4f03cc9a7
346 parent: 0:24427303d56f
405 parent: 0:24427303d56f
347 user: test
406 user: test
348 date: Thu Jan 01 00:00:00 1970 +0000
407 date: Thu Jan 01 00:00:00 1970 +0000
349 summary: commit on default
408 summary: commit on default
350
409
351 changeset: 0:24427303d56f
410 changeset: 0:24427303d56f
352 user: test
411 user: test
353 date: Thu Jan 01 00:00:00 1970 +0000
412 date: Thu Jan 01 00:00:00 1970 +0000
354 summary: commit on default
413 summary: commit on default
355
414
356 % log -b test
415 % log -b test
357 changeset: 3:f5d8de11c2e2
416 changeset: 3:f5d8de11c2e2
358 branch: test
417 branch: test
359 tag: tip
418 tag: tip
360 parent: 1:d32277701ccb
419 parent: 1:d32277701ccb
361 user: test
420 user: test
362 date: Thu Jan 01 00:00:00 1970 +0000
421 date: Thu Jan 01 00:00:00 1970 +0000
363 summary: commit on test
422 summary: commit on test
364
423
365 changeset: 1:d32277701ccb
424 changeset: 1:d32277701ccb
366 branch: test
425 branch: test
367 user: test
426 user: test
368 date: Thu Jan 01 00:00:00 1970 +0000
427 date: Thu Jan 01 00:00:00 1970 +0000
369 summary: commit on test
428 summary: commit on test
370
429
371 % log -b dummy
430 % log -b dummy
372 abort: unknown revision 'dummy'!
431 abort: unknown revision 'dummy'!
373 % log -b .
432 % log -b .
374 changeset: 3:f5d8de11c2e2
433 changeset: 3:f5d8de11c2e2
375 branch: test
434 branch: test
376 tag: tip
435 tag: tip
377 parent: 1:d32277701ccb
436 parent: 1:d32277701ccb
378 user: test
437 user: test
379 date: Thu Jan 01 00:00:00 1970 +0000
438 date: Thu Jan 01 00:00:00 1970 +0000
380 summary: commit on test
439 summary: commit on test
381
440
382 changeset: 1:d32277701ccb
441 changeset: 1:d32277701ccb
383 branch: test
442 branch: test
384 user: test
443 user: test
385 date: Thu Jan 01 00:00:00 1970 +0000
444 date: Thu Jan 01 00:00:00 1970 +0000
386 summary: commit on test
445 summary: commit on test
387
446
388 % log -b default -b test
447 % log -b default -b test
389 changeset: 3:f5d8de11c2e2
448 changeset: 3:f5d8de11c2e2
390 branch: test
449 branch: test
391 tag: tip
450 tag: tip
392 parent: 1:d32277701ccb
451 parent: 1:d32277701ccb
393 user: test
452 user: test
394 date: Thu Jan 01 00:00:00 1970 +0000
453 date: Thu Jan 01 00:00:00 1970 +0000
395 summary: commit on test
454 summary: commit on test
396
455
397 changeset: 2:c3a4f03cc9a7
456 changeset: 2:c3a4f03cc9a7
398 parent: 0:24427303d56f
457 parent: 0:24427303d56f
399 user: test
458 user: test
400 date: Thu Jan 01 00:00:00 1970 +0000
459 date: Thu Jan 01 00:00:00 1970 +0000
401 summary: commit on default
460 summary: commit on default
402
461
403 changeset: 1:d32277701ccb
462 changeset: 1:d32277701ccb
404 branch: test
463 branch: test
405 user: test
464 user: test
406 date: Thu Jan 01 00:00:00 1970 +0000
465 date: Thu Jan 01 00:00:00 1970 +0000
407 summary: commit on test
466 summary: commit on test
408
467
409 changeset: 0:24427303d56f
468 changeset: 0:24427303d56f
410 user: test
469 user: test
411 date: Thu Jan 01 00:00:00 1970 +0000
470 date: Thu Jan 01 00:00:00 1970 +0000
412 summary: commit on default
471 summary: commit on default
413
472
414 % log -b default -b .
473 % log -b default -b .
415 changeset: 3:f5d8de11c2e2
474 changeset: 3:f5d8de11c2e2
416 branch: test
475 branch: test
417 tag: tip
476 tag: tip
418 parent: 1:d32277701ccb
477 parent: 1:d32277701ccb
419 user: test
478 user: test
420 date: Thu Jan 01 00:00:00 1970 +0000
479 date: Thu Jan 01 00:00:00 1970 +0000
421 summary: commit on test
480 summary: commit on test
422
481
423 changeset: 2:c3a4f03cc9a7
482 changeset: 2:c3a4f03cc9a7
424 parent: 0:24427303d56f
483 parent: 0:24427303d56f
425 user: test
484 user: test
426 date: Thu Jan 01 00:00:00 1970 +0000
485 date: Thu Jan 01 00:00:00 1970 +0000
427 summary: commit on default
486 summary: commit on default
428
487
429 changeset: 1:d32277701ccb
488 changeset: 1:d32277701ccb
430 branch: test
489 branch: test
431 user: test
490 user: test
432 date: Thu Jan 01 00:00:00 1970 +0000
491 date: Thu Jan 01 00:00:00 1970 +0000
433 summary: commit on test
492 summary: commit on test
434
493
435 changeset: 0:24427303d56f
494 changeset: 0:24427303d56f
436 user: test
495 user: test
437 date: Thu Jan 01 00:00:00 1970 +0000
496 date: Thu Jan 01 00:00:00 1970 +0000
438 summary: commit on default
497 summary: commit on default
439
498
440 % log -b . -b test
499 % log -b . -b test
441 changeset: 3:f5d8de11c2e2
500 changeset: 3:f5d8de11c2e2
442 branch: test
501 branch: test
443 tag: tip
502 tag: tip
444 parent: 1:d32277701ccb
503 parent: 1:d32277701ccb
445 user: test
504 user: test
446 date: Thu Jan 01 00:00:00 1970 +0000
505 date: Thu Jan 01 00:00:00 1970 +0000
447 summary: commit on test
506 summary: commit on test
448
507
449 changeset: 1:d32277701ccb
508 changeset: 1:d32277701ccb
450 branch: test
509 branch: test
451 user: test
510 user: test
452 date: Thu Jan 01 00:00:00 1970 +0000
511 date: Thu Jan 01 00:00:00 1970 +0000
453 summary: commit on test
512 summary: commit on test
454
513
455 % log -b 2
514 % log -b 2
456 changeset: 2:c3a4f03cc9a7
515 changeset: 2:c3a4f03cc9a7
457 parent: 0:24427303d56f
516 parent: 0:24427303d56f
458 user: test
517 user: test
459 date: Thu Jan 01 00:00:00 1970 +0000
518 date: Thu Jan 01 00:00:00 1970 +0000
460 summary: commit on default
519 summary: commit on default
461
520
462 changeset: 0:24427303d56f
521 changeset: 0:24427303d56f
463 user: test
522 user: test
464 date: Thu Jan 01 00:00:00 1970 +0000
523 date: Thu Jan 01 00:00:00 1970 +0000
465 summary: commit on default
524 summary: commit on default
466
525
467 % log -p --cwd dir (in subdir)
526 % log -p --cwd dir (in subdir)
468 changeset: 3:f5d8de11c2e2
527 changeset: 3:f5d8de11c2e2
469 branch: test
528 branch: test
470 tag: tip
529 tag: tip
471 parent: 1:d32277701ccb
530 parent: 1:d32277701ccb
472 user: test
531 user: test
473 date: Thu Jan 01 00:00:00 1970 +0000
532 date: Thu Jan 01 00:00:00 1970 +0000
474 summary: commit on test
533 summary: commit on test
475
534
476 diff -r d32277701ccb -r f5d8de11c2e2 c
535 diff -r d32277701ccb -r f5d8de11c2e2 c
477 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
536 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
478 +++ b/c Thu Jan 01 00:00:00 1970 +0000
537 +++ b/c Thu Jan 01 00:00:00 1970 +0000
479 @@ -0,0 +1,1 @@
538 @@ -0,0 +1,1 @@
480 +c
539 +c
481
540
482 changeset: 2:c3a4f03cc9a7
541 changeset: 2:c3a4f03cc9a7
483 parent: 0:24427303d56f
542 parent: 0:24427303d56f
484 user: test
543 user: test
485 date: Thu Jan 01 00:00:00 1970 +0000
544 date: Thu Jan 01 00:00:00 1970 +0000
486 summary: commit on default
545 summary: commit on default
487
546
488 diff -r 24427303d56f -r c3a4f03cc9a7 c
547 diff -r 24427303d56f -r c3a4f03cc9a7 c
489 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
548 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
490 +++ b/c Thu Jan 01 00:00:00 1970 +0000
549 +++ b/c Thu Jan 01 00:00:00 1970 +0000
491 @@ -0,0 +1,1 @@
550 @@ -0,0 +1,1 @@
492 +c
551 +c
493
552
494 changeset: 1:d32277701ccb
553 changeset: 1:d32277701ccb
495 branch: test
554 branch: test
496 user: test
555 user: test
497 date: Thu Jan 01 00:00:00 1970 +0000
556 date: Thu Jan 01 00:00:00 1970 +0000
498 summary: commit on test
557 summary: commit on test
499
558
500 diff -r 24427303d56f -r d32277701ccb b
559 diff -r 24427303d56f -r d32277701ccb b
501 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
560 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
502 +++ b/b Thu Jan 01 00:00:00 1970 +0000
561 +++ b/b Thu Jan 01 00:00:00 1970 +0000
503 @@ -0,0 +1,1 @@
562 @@ -0,0 +1,1 @@
504 +b
563 +b
505
564
506 changeset: 0:24427303d56f
565 changeset: 0:24427303d56f
507 user: test
566 user: test
508 date: Thu Jan 01 00:00:00 1970 +0000
567 date: Thu Jan 01 00:00:00 1970 +0000
509 summary: commit on default
568 summary: commit on default
510
569
511 diff -r 000000000000 -r 24427303d56f a
570 diff -r 000000000000 -r 24427303d56f a
512 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
571 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
513 +++ b/a Thu Jan 01 00:00:00 1970 +0000
572 +++ b/a Thu Jan 01 00:00:00 1970 +0000
514 @@ -0,0 +1,1 @@
573 @@ -0,0 +1,1 @@
515 +a
574 +a
516
575
517 % log -p -R repo
576 % log -p -R repo
518 changeset: 0:24427303d56f
577 changeset: 0:24427303d56f
519 user: test
578 user: test
520 date: Thu Jan 01 00:00:00 1970 +0000
579 date: Thu Jan 01 00:00:00 1970 +0000
521 summary: commit on default
580 summary: commit on default
522
581
523 diff -r 000000000000 -r 24427303d56f a
582 diff -r 000000000000 -r 24427303d56f a
524 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
583 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
525 +++ b/a Thu Jan 01 00:00:00 1970 +0000
584 +++ b/a Thu Jan 01 00:00:00 1970 +0000
526 @@ -0,0 +1,1 @@
585 @@ -0,0 +1,1 @@
527 +a
586 +a
528
587
General Comments 0
You need to be logged in to leave comments. Login now