test-log.t
1844 lines
| 41.1 KiB
| text/troff
|
Tads3Lexer
/ tests / test-log.t
Alexander Plavin
|
r18991 | Log on empty repository: checking consistency | ||
$ hg init empty | ||||
$ cd empty | ||||
$ hg log | ||||
$ hg log -r 1 | ||||
abort: unknown revision '1'! | ||||
[255] | ||||
$ hg log -r -1:0 | ||||
abort: unknown revision '-1'! | ||||
[255] | ||||
$ hg log -r 'branch(name)' | ||||
abort: unknown revision 'name'! | ||||
[255] | ||||
$ hg log -r null -q | ||||
-1:000000000000 | ||||
Patrick Mezard
|
r16164 | The g is crafted to have 2 filelog topological heads in a linear | ||
changeset graph | ||||
Nicolas Dumazet
|
r11900 | $ hg init a | ||
$ cd a | ||||
$ echo a > a | ||||
Patrick Mezard
|
r16164 | $ echo f > f | ||
Nicolas Dumazet
|
r11900 | $ hg ci -Ama -d '1 0' | ||
adding a | ||||
Patrick Mezard
|
r16164 | adding f | ||
Nicolas Dumazet
|
r11900 | |||
$ hg cp a b | ||||
Patrick Mezard
|
r16164 | $ hg cp f g | ||
Nicolas Dumazet
|
r11900 | $ hg ci -mb -d '2 0' | ||
$ mkdir dir | ||||
$ hg mv b dir | ||||
Patrick Mezard
|
r16164 | $ echo g >> g | ||
$ echo f >> f | ||||
Nicolas Dumazet
|
r11900 | $ hg ci -mc -d '3 0' | ||
$ hg mv a b | ||||
Patrick Mezard
|
r16164 | $ hg cp -f f g | ||
Nicolas Dumazet
|
r11900 | $ echo a > d | ||
$ hg add d | ||||
$ hg ci -md -d '4 0' | ||||
$ hg mv dir/b e | ||||
$ hg ci -me -d '5 0' | ||||
$ hg log a | ||||
Patrick Mezard
|
r16164 | changeset: 0:9161b9aeaf16 | ||
Nicolas Dumazet
|
r11900 | user: test | ||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: a | ||||
Mads Kiilerich
|
r18340 | log on directory | ||
$ hg log dir | ||||
changeset: 4:7e4639b4691b | ||||
tag: tip | ||||
user: test | ||||
date: Thu Jan 01 00:00:05 1970 +0000 | ||||
summary: e | ||||
changeset: 2:f8954cd4dc1f | ||||
user: test | ||||
date: Thu Jan 01 00:00:03 1970 +0000 | ||||
summary: c | ||||
$ hg log somethingthatdoesntexist dir | ||||
changeset: 4:7e4639b4691b | ||||
tag: tip | ||||
user: test | ||||
date: Thu Jan 01 00:00:05 1970 +0000 | ||||
summary: e | ||||
changeset: 2:f8954cd4dc1f | ||||
user: test | ||||
date: Thu Jan 01 00:00:03 1970 +0000 | ||||
summary: c | ||||
Nicolas Dumazet
|
r11900 | |||
Durham Goode
|
r21998 | -f, non-existent directory | ||
Nicolas Dumazet
|
r11900 | |||
$ hg log -f dir | ||||
Patrick Mezard
|
r16165 | abort: cannot follow file not in parent revision: "dir" | ||
Matt Mackall
|
r12316 | [255] | ||
Nicolas Dumazet
|
r11900 | |||
Durham Goode
|
r21998 | -f, directory | ||
$ hg up -q 3 | ||||
$ hg log -f dir | ||||
changeset: 2:f8954cd4dc1f | ||||
user: test | ||||
date: Thu Jan 01 00:00:03 1970 +0000 | ||||
summary: c | ||||
-f, directory with --patch | ||||
$ hg log -f dir -p | ||||
changeset: 2:f8954cd4dc1f | ||||
user: test | ||||
date: Thu Jan 01 00:00:03 1970 +0000 | ||||
summary: c | ||||
diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | ||||
--- /dev/null* (glob) | ||||
+++ b/dir/b* (glob) | ||||
@@ -0,0 +1,1 @@ | ||||
+a | ||||
-f, pattern | ||||
$ hg log -f -I 'dir**' -p | ||||
changeset: 2:f8954cd4dc1f | ||||
user: test | ||||
date: Thu Jan 01 00:00:03 1970 +0000 | ||||
summary: c | ||||
diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | ||||
--- /dev/null* (glob) | ||||
+++ b/dir/b* (glob) | ||||
@@ -0,0 +1,1 @@ | ||||
+a | ||||
$ hg up -q 4 | ||||
Iulian Stana
|
r19125 | -f, a wrong style | ||
$ hg log -f -l1 --style something | ||||
abort: style 'something' not found | ||||
Augie Fackler
|
r19127 | (available styles: bisect, changelog, compact, default, phases, xml) | ||
Iulian Stana
|
r19125 | [255] | ||
Iulian Stana
|
r19126 | -f, phases style | ||
$ hg log -f -l1 --style phases | ||||
changeset: 4:7e4639b4691b | ||||
tag: tip | ||||
phase: draft | ||||
user: test | ||||
date: Thu Jan 01 00:00:05 1970 +0000 | ||||
summary: e | ||||
Iulian Stana
|
r19125 | |||
Nicolas Dumazet
|
r11900 | -f, but no args | ||
$ hg log -f | ||||
Patrick Mezard
|
r16164 | changeset: 4:7e4639b4691b | ||
Nicolas Dumazet
|
r11900 | tag: tip | ||
user: test | ||||
date: Thu Jan 01 00:00:05 1970 +0000 | ||||
summary: e | ||||
Patrick Mezard
|
r16164 | changeset: 3:2ca5ba701980 | ||
Nicolas Dumazet
|
r11900 | user: test | ||
date: Thu Jan 01 00:00:04 1970 +0000 | ||||
summary: d | ||||
Patrick Mezard
|
r16164 | changeset: 2:f8954cd4dc1f | ||
Nicolas Dumazet
|
r11900 | user: test | ||
date: Thu Jan 01 00:00:03 1970 +0000 | ||||
summary: c | ||||
Patrick Mezard
|
r16164 | changeset: 1:d89b0a12d229 | ||
Nicolas Dumazet
|
r11900 | user: test | ||
date: Thu Jan 01 00:00:02 1970 +0000 | ||||
summary: b | ||||
Patrick Mezard
|
r16164 | changeset: 0:9161b9aeaf16 | ||
Nicolas Dumazet
|
r11900 | user: test | ||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: a | ||||
one rename | ||||
Patrick Mezard
|
r16165 | $ hg up -q 2 | ||
Nicolas Dumazet
|
r11900 | $ hg log -vf a | ||
Patrick Mezard
|
r16164 | changeset: 0:9161b9aeaf16 | ||
Nicolas Dumazet
|
r11900 | user: test | ||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
Patrick Mezard
|
r16164 | files: a f | ||
Nicolas Dumazet
|
r11900 | description: | ||
a | ||||
many renames | ||||
Patrick Mezard
|
r16165 | $ hg up -q tip | ||
Nicolas Dumazet
|
r11900 | $ hg log -vf e | ||
Patrick Mezard
|
r16164 | changeset: 4:7e4639b4691b | ||
Nicolas Dumazet
|
r11900 | tag: tip | ||
user: test | ||||
date: Thu Jan 01 00:00:05 1970 +0000 | ||||
files: dir/b e | ||||
description: | ||||
e | ||||
Patrick Mezard
|
r16164 | changeset: 2:f8954cd4dc1f | ||
Nicolas Dumazet
|
r11900 | user: test | ||
date: Thu Jan 01 00:00:03 1970 +0000 | ||||
Patrick Mezard
|
r16164 | files: b dir/b f g | ||
Nicolas Dumazet
|
r11900 | description: | ||
c | ||||
Patrick Mezard
|
r16164 | changeset: 1:d89b0a12d229 | ||
Nicolas Dumazet
|
r11900 | user: test | ||
date: Thu Jan 01 00:00:02 1970 +0000 | ||||
Patrick Mezard
|
r16164 | files: b g | ||
Nicolas Dumazet
|
r11900 | description: | ||
b | ||||
Patrick Mezard
|
r16164 | changeset: 0:9161b9aeaf16 | ||
Nicolas Dumazet
|
r11900 | user: test | ||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
Patrick Mezard
|
r16164 | files: a f | ||
Nicolas Dumazet
|
r11900 | description: | ||
a | ||||
log -pf dir/b | ||||
Patrick Mezard
|
r16165 | $ hg up -q 3 | ||
Nicolas Dumazet
|
r11900 | $ hg log -pf dir/b | ||
Patrick Mezard
|
r16164 | changeset: 2:f8954cd4dc1f | ||
Nicolas Dumazet
|
r11900 | user: test | ||
date: Thu Jan 01 00:00:03 1970 +0000 | ||||
summary: c | ||||
Patrick Mezard
|
r16164 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | ||
Nicolas Dumazet
|
r11900 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||
+++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 | ||||
@@ -0,0 +1,1 @@ | ||||
+a | ||||
Patrick Mezard
|
r16164 | changeset: 1:d89b0a12d229 | ||
Nicolas Dumazet
|
r11900 | user: test | ||
date: Thu Jan 01 00:00:02 1970 +0000 | ||||
summary: b | ||||
Patrick Mezard
|
r16164 | diff -r 9161b9aeaf16 -r d89b0a12d229 b | ||
Nicolas Dumazet
|
r11900 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||
+++ b/b Thu Jan 01 00:00:02 1970 +0000 | ||||
@@ -0,0 +1,1 @@ | ||||
+a | ||||
Patrick Mezard
|
r16164 | changeset: 0:9161b9aeaf16 | ||
Nicolas Dumazet
|
r11900 | user: test | ||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: a | ||||
Patrick Mezard
|
r16164 | diff -r 000000000000 -r 9161b9aeaf16 a | ||
Nicolas Dumazet
|
r11900 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||
+++ b/a Thu Jan 01 00:00:01 1970 +0000 | ||||
@@ -0,0 +1,1 @@ | ||||
+a | ||||
Siddharth Agarwal
|
r21876 | log -pf b inside dir | ||
$ hg --cwd=dir log -pf b | ||||
changeset: 2:f8954cd4dc1f | ||||
user: test | ||||
date: Thu Jan 01 00:00:03 1970 +0000 | ||||
summary: c | ||||
diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | ||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||||
+++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 | ||||
@@ -0,0 +1,1 @@ | ||||
+a | ||||
changeset: 1:d89b0a12d229 | ||||
user: test | ||||
date: Thu Jan 01 00:00:02 1970 +0000 | ||||
summary: b | ||||
diff -r 9161b9aeaf16 -r d89b0a12d229 b | ||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||||
+++ b/b Thu Jan 01 00:00:02 1970 +0000 | ||||
@@ -0,0 +1,1 @@ | ||||
+a | ||||
changeset: 0:9161b9aeaf16 | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: a | ||||
diff -r 000000000000 -r 9161b9aeaf16 a | ||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||||
+++ b/a Thu Jan 01 00:00:01 1970 +0000 | ||||
@@ -0,0 +1,1 @@ | ||||
+a | ||||
Yuya Nishihara
|
r21966 | log -pf, but no args | ||
$ hg log -pf | ||||
changeset: 3:2ca5ba701980 | ||||
user: test | ||||
date: Thu Jan 01 00:00:04 1970 +0000 | ||||
summary: d | ||||
diff -r f8954cd4dc1f -r 2ca5ba701980 a | ||||
--- a/a Thu Jan 01 00:00:03 1970 +0000 | ||||
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||||
@@ -1,1 +0,0 @@ | ||||
-a | ||||
diff -r f8954cd4dc1f -r 2ca5ba701980 b | ||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||||
+++ b/b Thu Jan 01 00:00:04 1970 +0000 | ||||
@@ -0,0 +1,1 @@ | ||||
+a | ||||
diff -r f8954cd4dc1f -r 2ca5ba701980 d | ||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||||
+++ b/d Thu Jan 01 00:00:04 1970 +0000 | ||||
@@ -0,0 +1,1 @@ | ||||
+a | ||||
diff -r f8954cd4dc1f -r 2ca5ba701980 g | ||||
--- a/g Thu Jan 01 00:00:03 1970 +0000 | ||||
+++ b/g Thu Jan 01 00:00:04 1970 +0000 | ||||
@@ -1,2 +1,2 @@ | ||||
f | ||||
-g | ||||
+f | ||||
changeset: 2:f8954cd4dc1f | ||||
user: test | ||||
date: Thu Jan 01 00:00:03 1970 +0000 | ||||
summary: c | ||||
diff -r d89b0a12d229 -r f8954cd4dc1f b | ||||
--- a/b Thu Jan 01 00:00:02 1970 +0000 | ||||
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||||
@@ -1,1 +0,0 @@ | ||||
-a | ||||
diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | ||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||||
+++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 | ||||
@@ -0,0 +1,1 @@ | ||||
+a | ||||
diff -r d89b0a12d229 -r f8954cd4dc1f f | ||||
--- a/f Thu Jan 01 00:00:02 1970 +0000 | ||||
+++ b/f Thu Jan 01 00:00:03 1970 +0000 | ||||
@@ -1,1 +1,2 @@ | ||||
f | ||||
+f | ||||
diff -r d89b0a12d229 -r f8954cd4dc1f g | ||||
--- a/g Thu Jan 01 00:00:02 1970 +0000 | ||||
+++ b/g Thu Jan 01 00:00:03 1970 +0000 | ||||
@@ -1,1 +1,2 @@ | ||||
f | ||||
+g | ||||
changeset: 1:d89b0a12d229 | ||||
user: test | ||||
date: Thu Jan 01 00:00:02 1970 +0000 | ||||
summary: b | ||||
diff -r 9161b9aeaf16 -r d89b0a12d229 b | ||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||||
+++ b/b Thu Jan 01 00:00:02 1970 +0000 | ||||
@@ -0,0 +1,1 @@ | ||||
+a | ||||
diff -r 9161b9aeaf16 -r d89b0a12d229 g | ||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||||
+++ b/g Thu Jan 01 00:00:02 1970 +0000 | ||||
@@ -0,0 +1,1 @@ | ||||
+f | ||||
changeset: 0:9161b9aeaf16 | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: a | ||||
diff -r 000000000000 -r 9161b9aeaf16 a | ||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||||
+++ b/a Thu Jan 01 00:00:01 1970 +0000 | ||||
@@ -0,0 +1,1 @@ | ||||
+a | ||||
diff -r 000000000000 -r 9161b9aeaf16 f | ||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||||
+++ b/f Thu Jan 01 00:00:01 1970 +0000 | ||||
@@ -0,0 +1,1 @@ | ||||
+f | ||||
Nicolas Dumazet
|
r11900 | log -vf dir/b | ||
$ hg log -vf dir/b | ||||
Patrick Mezard
|
r16164 | changeset: 2:f8954cd4dc1f | ||
Nicolas Dumazet
|
r11900 | user: test | ||
date: Thu Jan 01 00:00:03 1970 +0000 | ||||
Patrick Mezard
|
r16164 | files: b dir/b f g | ||
Nicolas Dumazet
|
r11900 | description: | ||
c | ||||
Patrick Mezard
|
r16164 | changeset: 1:d89b0a12d229 | ||
Nicolas Dumazet
|
r11900 | user: test | ||
date: Thu Jan 01 00:00:02 1970 +0000 | ||||
Patrick Mezard
|
r16164 | files: b g | ||
Nicolas Dumazet
|
r11900 | description: | ||
b | ||||
Patrick Mezard
|
r16164 | changeset: 0:9161b9aeaf16 | ||
Nicolas Dumazet
|
r11900 | user: test | ||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
Patrick Mezard
|
r16164 | files: a f | ||
Nicolas Dumazet
|
r11900 | description: | ||
a | ||||
Patrick Mezard
|
r16165 | -f and multiple filelog heads | ||
$ hg up -q 2 | ||||
$ hg log -f g --template '{rev}\n' | ||||
2 | ||||
1 | ||||
0 | ||||
$ hg up -q tip | ||||
$ hg log -f g --template '{rev}\n' | ||||
3 | ||||
2 | ||||
0 | ||||
Nicolas Dumazet
|
r11900 | log copies with --copies | ||
$ hg log -vC --template '{rev} {file_copies}\n' | ||||
4 e (dir/b) | ||||
Patrick Mezard
|
r16164 | 3 b (a)g (f) | ||
Nicolas Dumazet
|
r11900 | 2 dir/b (b) | ||
Patrick Mezard
|
r16164 | 1 b (a)g (f) | ||
Nicolas Dumazet
|
r11900 | 0 | ||
log copies switch without --copies, with old filecopy template | ||||
$ hg log -v --template '{rev} {file_copies_switch%filecopy}\n' | ||||
4 | ||||
3 | ||||
2 | ||||
1 | ||||
0 | ||||
log copies switch with --copies | ||||
$ hg log -vC --template '{rev} {file_copies_switch}\n' | ||||
4 e (dir/b) | ||||
Patrick Mezard
|
r16164 | 3 b (a)g (f) | ||
Nicolas Dumazet
|
r11900 | 2 dir/b (b) | ||
Patrick Mezard
|
r16164 | 1 b (a)g (f) | ||
Nicolas Dumazet
|
r11900 | 0 | ||
log copies with hardcoded style and with --style=default | ||||
$ hg log -vC -r4 | ||||
Patrick Mezard
|
r16164 | changeset: 4:7e4639b4691b | ||
Nicolas Dumazet
|
r11900 | tag: tip | ||
user: test | ||||
date: Thu Jan 01 00:00:05 1970 +0000 | ||||
files: dir/b e | ||||
copies: e (dir/b) | ||||
description: | ||||
e | ||||
$ hg log -vC -r4 --style=default | ||||
Patrick Mezard
|
r16164 | changeset: 4:7e4639b4691b | ||
Nicolas Dumazet
|
r11900 | tag: tip | ||
user: test | ||||
date: Thu Jan 01 00:00:05 1970 +0000 | ||||
files: dir/b e | ||||
copies: e (dir/b) | ||||
description: | ||||
e | ||||
log copies, non-linear manifest | ||||
$ hg up -C 3 | ||||
1 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
$ hg mv dir/b e | ||||
$ echo foo > foo | ||||
$ hg ci -Ame2 -d '6 0' | ||||
adding foo | ||||
created new head | ||||
$ hg log -v --template '{rev} {file_copies}\n' -r 5 | ||||
5 e (dir/b) | ||||
log copies, execute bit set | ||||
Adrian Buehlmann
|
r16887 | #if execbit | ||
Nicolas Dumazet
|
r11900 | $ chmod +x e | ||
$ hg ci -me3 -d '7 0' | ||||
$ hg log -v --template '{rev} {file_copies}\n' -r 6 | ||||
6 | ||||
Adrian Buehlmann
|
r16887 | #endif | ||
Nicolas Dumazet
|
r11900 | |||
log -p d | ||||
$ hg log -pv d | ||||
Patrick Mezard
|
r16164 | changeset: 3:2ca5ba701980 | ||
Nicolas Dumazet
|
r11900 | user: test | ||
date: Thu Jan 01 00:00:04 1970 +0000 | ||||
Patrick Mezard
|
r16164 | files: a b d g | ||
Nicolas Dumazet
|
r11900 | description: | ||
d | ||||
Patrick Mezard
|
r16164 | diff -r f8954cd4dc1f -r 2ca5ba701980 d | ||
Nicolas Dumazet
|
r11900 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||
+++ b/d Thu Jan 01 00:00:04 1970 +0000 | ||||
@@ -0,0 +1,1 @@ | ||||
+a | ||||
log --removed file | ||||
$ hg log --removed -v a | ||||
Patrick Mezard
|
r16164 | changeset: 3:2ca5ba701980 | ||
Nicolas Dumazet
|
r11900 | user: test | ||
date: Thu Jan 01 00:00:04 1970 +0000 | ||||
Patrick Mezard
|
r16164 | files: a b d g | ||
Nicolas Dumazet
|
r11900 | description: | ||
d | ||||
Patrick Mezard
|
r16164 | changeset: 0:9161b9aeaf16 | ||
Nicolas Dumazet
|
r11900 | user: test | ||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
Patrick Mezard
|
r16164 | files: a f | ||
Nicolas Dumazet
|
r11900 | description: | ||
a | ||||
log --removed revrange file | ||||
$ hg log --removed -v -r0:2 a | ||||
Patrick Mezard
|
r16164 | changeset: 0:9161b9aeaf16 | ||
Nicolas Dumazet
|
r11900 | user: test | ||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
Patrick Mezard
|
r16164 | files: a f | ||
Nicolas Dumazet
|
r11900 | description: | ||
a | ||||
Mads Kiilerich
|
r16912 | $ cd .. | ||
Nicolas Dumazet
|
r11900 | |||
log --follow tests | ||||
Mads Kiilerich
|
r16912 | $ hg init follow | ||
$ cd follow | ||||
Nicolas Dumazet
|
r11900 | |||
$ echo base > base | ||||
$ hg ci -Ambase -d '1 0' | ||||
adding base | ||||
$ echo r1 >> base | ||||
$ hg ci -Amr1 -d '1 0' | ||||
$ echo r2 >> base | ||||
$ hg ci -Amr2 -d '1 0' | ||||
$ hg up -C 1 | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ echo b1 > b1 | ||||
$ hg ci -Amb1 -d '1 0' | ||||
adding b1 | ||||
created new head | ||||
log -f | ||||
$ hg log -f | ||||
changeset: 3:e62f78d544b4 | ||||
tag: tip | ||||
parent: 1:3d5bf5654eda | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: b1 | ||||
changeset: 1:3d5bf5654eda | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: r1 | ||||
changeset: 0:67e992f2c4f3 | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: base | ||||
log -f -r 1:tip | ||||
$ hg up -C 0 | ||||
1 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
$ echo b2 > b2 | ||||
$ hg ci -Amb2 -d '1 0' | ||||
adding b2 | ||||
created new head | ||||
$ hg log -f -r 1:tip | ||||
changeset: 1:3d5bf5654eda | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: r1 | ||||
changeset: 2:60c670bf5b30 | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: r2 | ||||
changeset: 3:e62f78d544b4 | ||||
parent: 1:3d5bf5654eda | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: b1 | ||||
log -r . with two parents | ||||
$ hg up -C 3 | ||||
2 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
$ hg merge tip | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
(branch merge, don't forget to commit) | ||||
$ hg log -r . | ||||
changeset: 3:e62f78d544b4 | ||||
parent: 1:3d5bf5654eda | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: b1 | ||||
log -r . with one parent | ||||
$ hg ci -mm12 -d '1 0' | ||||
$ hg log -r . | ||||
changeset: 5:302e9dd6890d | ||||
tag: tip | ||||
parent: 3:e62f78d544b4 | ||||
parent: 4:ddb82e70d1a1 | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: m12 | ||||
$ echo postm >> b1 | ||||
$ hg ci -Amb1.1 -d'1 0' | ||||
log --follow-first | ||||
$ hg log --follow-first | ||||
changeset: 6:2404bbcab562 | ||||
tag: tip | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: b1.1 | ||||
changeset: 5:302e9dd6890d | ||||
parent: 3:e62f78d544b4 | ||||
parent: 4:ddb82e70d1a1 | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: m12 | ||||
changeset: 3:e62f78d544b4 | ||||
parent: 1:3d5bf5654eda | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: b1 | ||||
changeset: 1:3d5bf5654eda | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: r1 | ||||
changeset: 0:67e992f2c4f3 | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: base | ||||
log -P 2 | ||||
$ hg log -P 2 | ||||
changeset: 6:2404bbcab562 | ||||
tag: tip | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: b1.1 | ||||
changeset: 5:302e9dd6890d | ||||
parent: 3:e62f78d544b4 | ||||
parent: 4:ddb82e70d1a1 | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: m12 | ||||
changeset: 4:ddb82e70d1a1 | ||||
parent: 0:67e992f2c4f3 | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: b2 | ||||
changeset: 3:e62f78d544b4 | ||||
parent: 1:3d5bf5654eda | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: b1 | ||||
log -r tip -p --git | ||||
$ hg log -r tip -p --git | ||||
changeset: 6:2404bbcab562 | ||||
tag: tip | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: b1.1 | ||||
diff --git a/b1 b/b1 | ||||
--- a/b1 | ||||
+++ b/b1 | ||||
@@ -1,1 +1,2 @@ | ||||
b1 | ||||
+postm | ||||
log -r "" | ||||
$ hg log -r '' | ||||
hg: parse error: empty query | ||||
Matt Mackall
|
r12316 | [255] | ||
Nicolas Dumazet
|
r11900 | |||
log -r <some unknown node id> | ||||
$ hg log -r 1000000000000000000000000000000000000000 | ||||
abort: unknown revision '1000000000000000000000000000000000000000'! | ||||
Matt Mackall
|
r12316 | [255] | ||
Nicolas Dumazet
|
r11900 | |||
log -k r1 | ||||
$ hg log -k r1 | ||||
changeset: 1:3d5bf5654eda | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: r1 | ||||
log -p -l2 --color=always | ||||
$ hg --config extensions.color= --config color.mode=ansi \ | ||||
> log -p -l2 --color=always | ||||
Mads Kiilerich
|
r12942 | \x1b[0;33mchangeset: 6:2404bbcab562\x1b[0m (esc) | ||
Nicolas Dumazet
|
r11900 | tag: tip | ||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: b1.1 | ||||
Mads Kiilerich
|
r12942 | \x1b[0;1mdiff -r 302e9dd6890d -r 2404bbcab562 b1\x1b[0m (esc) | ||
\x1b[0;31;1m--- a/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) | ||||
\x1b[0;32;1m+++ b/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) | ||||
\x1b[0;35m@@ -1,1 +1,2 @@\x1b[0m (esc) | ||||
Nicolas Dumazet
|
r11900 | b1 | ||
Mads Kiilerich
|
r12942 | \x1b[0;32m+postm\x1b[0m (esc) | ||
Nicolas Dumazet
|
r11900 | |||
Mads Kiilerich
|
r12942 | \x1b[0;33mchangeset: 5:302e9dd6890d\x1b[0m (esc) | ||
Nicolas Dumazet
|
r11900 | parent: 3:e62f78d544b4 | ||
parent: 4:ddb82e70d1a1 | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: m12 | ||||
Mads Kiilerich
|
r12942 | \x1b[0;1mdiff -r e62f78d544b4 -r 302e9dd6890d b2\x1b[0m (esc) | ||
\x1b[0;31;1m--- /dev/null Thu Jan 01 00:00:00 1970 +0000\x1b[0m (esc) | ||||
\x1b[0;32;1m+++ b/b2 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) | ||||
\x1b[0;35m@@ -0,0 +1,1 @@\x1b[0m (esc) | ||||
\x1b[0;32m+b2\x1b[0m (esc) | ||||
Nicolas Dumazet
|
r11900 | |||
log -r tip --stat | ||||
$ hg log -r tip --stat | ||||
changeset: 6:2404bbcab562 | ||||
tag: tip | ||||
user: test | ||||
date: Thu Jan 01 00:00:01 1970 +0000 | ||||
summary: b1.1 | ||||
b1 | 1 + | ||||
1 files changed, 1 insertions(+), 0 deletions(-) | ||||
$ cd .. | ||||
Mads Kiilerich
|
r16912 | |||
User | ||||
Nicolas Dumazet
|
r11900 | $ hg init usertest | ||
$ cd usertest | ||||
$ echo a > a | ||||
$ hg ci -A -m "a" -u "User One <user1@example.org>" | ||||
adding a | ||||
$ echo b > b | ||||
$ hg ci -A -m "b" -u "User Two <user2@example.org>" | ||||
adding b | ||||
$ hg log -u "User One <user1@example.org>" | ||||
changeset: 0:29a4c94f1924 | ||||
user: User One <user1@example.org> | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: a | ||||
$ hg log -u "user1" -u "user2" | ||||
changeset: 1:e834b5e69c0e | ||||
tag: tip | ||||
user: User Two <user2@example.org> | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: b | ||||
changeset: 0:29a4c94f1924 | ||||
user: User One <user1@example.org> | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: a | ||||
$ hg log -u "user3" | ||||
$ cd .. | ||||
$ hg init branches | ||||
$ cd branches | ||||
$ echo a > a | ||||
$ hg ci -A -m "commit on default" | ||||
adding a | ||||
$ hg branch test | ||||
marked working directory as branch test | ||||
Matt Mackall
|
r15615 | (branches are permanent and global, did you want a bookmark?) | ||
Nicolas Dumazet
|
r11900 | $ echo b > b | ||
$ hg ci -A -m "commit on test" | ||||
adding b | ||||
$ hg up default | ||||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
$ echo c > c | ||||
$ hg ci -A -m "commit on default" | ||||
adding c | ||||
$ hg up test | ||||
1 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
$ echo c > c | ||||
$ hg ci -A -m "commit on test" | ||||
adding c | ||||
log -b default | ||||
$ hg log -b default | ||||
changeset: 2:c3a4f03cc9a7 | ||||
parent: 0:24427303d56f | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on default | ||||
changeset: 0:24427303d56f | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on default | ||||
log -b test | ||||
$ hg log -b test | ||||
changeset: 3:f5d8de11c2e2 | ||||
branch: test | ||||
tag: tip | ||||
parent: 1:d32277701ccb | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on test | ||||
changeset: 1:d32277701ccb | ||||
branch: test | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on test | ||||
log -b dummy | ||||
$ hg log -b dummy | ||||
abort: unknown revision 'dummy'! | ||||
Matt Mackall
|
r12316 | [255] | ||
Nicolas Dumazet
|
r11900 | |||
log -b . | ||||
$ hg log -b . | ||||
changeset: 3:f5d8de11c2e2 | ||||
branch: test | ||||
tag: tip | ||||
parent: 1:d32277701ccb | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on test | ||||
changeset: 1:d32277701ccb | ||||
branch: test | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on test | ||||
log -b default -b test | ||||
$ hg log -b default -b test | ||||
changeset: 3:f5d8de11c2e2 | ||||
branch: test | ||||
tag: tip | ||||
parent: 1:d32277701ccb | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on test | ||||
changeset: 2:c3a4f03cc9a7 | ||||
parent: 0:24427303d56f | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on default | ||||
changeset: 1:d32277701ccb | ||||
branch: test | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on test | ||||
changeset: 0:24427303d56f | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on default | ||||
log -b default -b . | ||||
$ hg log -b default -b . | ||||
changeset: 3:f5d8de11c2e2 | ||||
branch: test | ||||
tag: tip | ||||
parent: 1:d32277701ccb | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on test | ||||
changeset: 2:c3a4f03cc9a7 | ||||
parent: 0:24427303d56f | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on default | ||||
changeset: 1:d32277701ccb | ||||
branch: test | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on test | ||||
changeset: 0:24427303d56f | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on default | ||||
log -b . -b test | ||||
$ hg log -b . -b test | ||||
changeset: 3:f5d8de11c2e2 | ||||
branch: test | ||||
tag: tip | ||||
parent: 1:d32277701ccb | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on test | ||||
changeset: 1:d32277701ccb | ||||
branch: test | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on test | ||||
log -b 2 | ||||
$ hg log -b 2 | ||||
changeset: 2:c3a4f03cc9a7 | ||||
parent: 0:24427303d56f | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on default | ||||
changeset: 0:24427303d56f | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on default | ||||
Sean Farley
|
r23771 | #if gettext | ||
Nicolas Dumazet
|
r11900 | |||
Sean Farley
|
r23771 | Test that all log names are translated (e.g. branches, bookmarks, tags): | ||
$ hg bookmark babar -r tip | ||||
$ HGENCODING=UTF-8 LANGUAGE=de hg log -r tip | ||||
\xc3\x84nderung: 3:f5d8de11c2e2 (esc) | ||||
Zweig: test | ||||
Lesezeichen: babar | ||||
Marke: tip | ||||
Vorg\xc3\xa4nger: 1:d32277701ccb (esc) | ||||
Nutzer: test | ||||
Datum: Thu Jan 01 00:00:00 1970 +0000 | ||||
Zusammenfassung: commit on test | ||||
$ hg bookmark -d babar | ||||
#endif | ||||
Nicolas Dumazet
|
r11900 | |||
log -p --cwd dir (in subdir) | ||||
$ mkdir dir | ||||
$ hg log -p --cwd dir | ||||
changeset: 3:f5d8de11c2e2 | ||||
branch: test | ||||
tag: tip | ||||
parent: 1:d32277701ccb | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on test | ||||
diff -r d32277701ccb -r f5d8de11c2e2 c | ||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||||
+++ b/c Thu Jan 01 00:00:00 1970 +0000 | ||||
@@ -0,0 +1,1 @@ | ||||
+c | ||||
changeset: 2:c3a4f03cc9a7 | ||||
parent: 0:24427303d56f | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on default | ||||
diff -r 24427303d56f -r c3a4f03cc9a7 c | ||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||||
+++ b/c Thu Jan 01 00:00:00 1970 +0000 | ||||
@@ -0,0 +1,1 @@ | ||||
+c | ||||
changeset: 1:d32277701ccb | ||||
branch: test | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on test | ||||
diff -r 24427303d56f -r d32277701ccb b | ||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||||
+++ b/b Thu Jan 01 00:00:00 1970 +0000 | ||||
@@ -0,0 +1,1 @@ | ||||
+b | ||||
changeset: 0:24427303d56f | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on default | ||||
diff -r 000000000000 -r 24427303d56f a | ||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||||
+++ b/a Thu Jan 01 00:00:00 1970 +0000 | ||||
@@ -0,0 +1,1 @@ | ||||
+a | ||||
log -p -R repo | ||||
$ cd dir | ||||
$ hg log -p -R .. ../a | ||||
changeset: 0:24427303d56f | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: commit on default | ||||
diff -r 000000000000 -r 24427303d56f a | ||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||||
+++ b/a Thu Jan 01 00:00:00 1970 +0000 | ||||
@@ -0,0 +1,1 @@ | ||||
+a | ||||
Mads Kiilerich
|
r16912 | $ cd ../.. | ||
Nicolas Dumazet
|
r11900 | |||
$ hg init follow2 | ||||
$ cd follow2 | ||||
# Build the following history: | ||||
# tip - o - x - o - x - x | ||||
# \ / | ||||
# o - o - o - x | ||||
# \ / | ||||
# o | ||||
# | ||||
# Where "o" is a revision containing "foo" and | ||||
# "x" is a revision without "foo" | ||||
$ touch init | ||||
$ hg ci -A -m "init, unrelated" | ||||
adding init | ||||
$ echo 'foo' > init | ||||
$ hg ci -m "change, unrelated" | ||||
$ echo 'foo' > foo | ||||
$ hg ci -A -m "add unrelated old foo" | ||||
adding foo | ||||
$ hg rm foo | ||||
$ hg ci -m "delete foo, unrelated" | ||||
$ echo 'related' > foo | ||||
$ hg ci -A -m "add foo, related" | ||||
adding foo | ||||
$ hg up 0 | ||||
1 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
$ touch branch | ||||
$ hg ci -A -m "first branch, unrelated" | ||||
adding branch | ||||
created new head | ||||
$ touch foo | ||||
$ hg ci -A -m "create foo, related" | ||||
adding foo | ||||
$ echo 'change' > foo | ||||
$ hg ci -m "change foo, related" | ||||
$ hg up 6 | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ echo 'change foo in branch' > foo | ||||
$ hg ci -m "change foo in branch, related" | ||||
created new head | ||||
$ hg merge 7 | ||||
merging foo | ||||
warning: conflicts during merge. | ||||
Matt Mackall
|
r15501 | merging foo incomplete! (edit conflicts, then use 'hg resolve --mark') | ||
Nicolas Dumazet
|
r11900 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | ||
Brodie Rao
|
r12314 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | ||
Matt Mackall
|
r12316 | [1] | ||
Nicolas Dumazet
|
r11900 | $ echo 'merge 1' > foo | ||
$ hg resolve -m foo | ||||
Pierre-Yves David
|
r21947 | (no more unresolved files) | ||
Nicolas Dumazet
|
r11900 | $ hg ci -m "First merge, related" | ||
$ hg merge 4 | ||||
merging foo | ||||
warning: conflicts during merge. | ||||
Matt Mackall
|
r15501 | merging foo incomplete! (edit conflicts, then use 'hg resolve --mark') | ||
Nicolas Dumazet
|
r11900 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | ||
Brodie Rao
|
r12314 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | ||
Matt Mackall
|
r12316 | [1] | ||
Nicolas Dumazet
|
r11900 | $ echo 'merge 2' > foo | ||
$ hg resolve -m foo | ||||
Pierre-Yves David
|
r21947 | (no more unresolved files) | ||
Nicolas Dumazet
|
r11900 | $ hg ci -m "Last merge, related" | ||
Patrick Mezard
|
r17181 | $ hg log --graph | ||
Nicolas Dumazet
|
r11900 | @ changeset: 10:4dae8563d2c5 | ||
|\ tag: tip | ||||
| | parent: 9:7b35701b003e | ||||
| | parent: 4:88176d361b69 | ||||
| | user: test | ||||
| | date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| | summary: Last merge, related | ||||
| | | ||||
| o changeset: 9:7b35701b003e | ||||
| |\ parent: 8:e5416ad8a855 | ||||
| | | parent: 7:87fe3144dcfa | ||||
| | | user: test | ||||
| | | date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| | | summary: First merge, related | ||||
| | | | ||||
| | o changeset: 8:e5416ad8a855 | ||||
| | | parent: 6:dc6c325fe5ee | ||||
| | | user: test | ||||
| | | date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| | | summary: change foo in branch, related | ||||
| | | | ||||
| o | changeset: 7:87fe3144dcfa | ||||
| |/ user: test | ||||
| | date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| | summary: change foo, related | ||||
| | | ||||
| o changeset: 6:dc6c325fe5ee | ||||
| | user: test | ||||
| | date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| | summary: create foo, related | ||||
| | | ||||
| o changeset: 5:73db34516eb9 | ||||
| | parent: 0:e87515fd044a | ||||
| | user: test | ||||
| | date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| | summary: first branch, unrelated | ||||
| | | ||||
o | changeset: 4:88176d361b69 | ||||
| | user: test | ||||
| | date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| | summary: add foo, related | ||||
| | | ||||
o | changeset: 3:dd78ae4afb56 | ||||
| | user: test | ||||
| | date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| | summary: delete foo, unrelated | ||||
| | | ||||
o | changeset: 2:c4c64aedf0f7 | ||||
| | user: test | ||||
| | date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| | summary: add unrelated old foo | ||||
| | | ||||
o | changeset: 1:e5faa7440653 | ||||
|/ user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: change, unrelated | ||||
| | ||||
o changeset: 0:e87515fd044a | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: init, unrelated | ||||
$ hg --traceback log -f foo | ||||
changeset: 10:4dae8563d2c5 | ||||
tag: tip | ||||
parent: 9:7b35701b003e | ||||
parent: 4:88176d361b69 | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: Last merge, related | ||||
changeset: 9:7b35701b003e | ||||
parent: 8:e5416ad8a855 | ||||
parent: 7:87fe3144dcfa | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: First merge, related | ||||
changeset: 8:e5416ad8a855 | ||||
parent: 6:dc6c325fe5ee | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: change foo in branch, related | ||||
changeset: 7:87fe3144dcfa | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: change foo, related | ||||
changeset: 6:dc6c325fe5ee | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: create foo, related | ||||
changeset: 4:88176d361b69 | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: add foo, related | ||||
Mads Kiilerich
|
r12383 | |||
Nicolas Dumazet
|
r12972 | Also check when maxrev < lastrevfilelog | ||
$ hg --traceback log -f -r4 foo | ||||
changeset: 4:88176d361b69 | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: add foo, related | ||||
Mads Kiilerich
|
r16912 | $ cd .. | ||
Nicolas Dumazet
|
r12972 | |||
Martin Geisler
|
r12399 | Issue2383: hg log showing _less_ differences than hg diff | ||
Mads Kiilerich
|
r12383 | |||
$ hg init issue2383 | ||||
$ cd issue2383 | ||||
Create a test repo: | ||||
$ echo a > a | ||||
$ hg ci -Am0 | ||||
adding a | ||||
$ echo b > b | ||||
$ hg ci -Am1 | ||||
adding b | ||||
$ hg co 0 | ||||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
$ echo b > a | ||||
$ hg ci -m2 | ||||
created new head | ||||
Merge: | ||||
$ hg merge | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
(branch merge, don't forget to commit) | ||||
Make sure there's a file listed in the merge to trigger the bug: | ||||
$ echo c > a | ||||
$ hg ci -m3 | ||||
Two files shown here in diff: | ||||
$ hg diff --rev 2:3 | ||||
diff -r b09be438c43a -r 8e07aafe1edc a | ||||
--- a/a Thu Jan 01 00:00:00 1970 +0000 | ||||
+++ b/a Thu Jan 01 00:00:00 1970 +0000 | ||||
@@ -1,1 +1,1 @@ | ||||
-b | ||||
+c | ||||
diff -r b09be438c43a -r 8e07aafe1edc b | ||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||||
+++ b/b Thu Jan 01 00:00:00 1970 +0000 | ||||
@@ -0,0 +1,1 @@ | ||||
+b | ||||
Diff here should be the same: | ||||
$ hg log -vpr 3 | ||||
changeset: 3:8e07aafe1edc | ||||
tag: tip | ||||
parent: 2:b09be438c43a | ||||
parent: 1:925d80f479bb | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
files: a | ||||
description: | ||||
3 | ||||
diff -r b09be438c43a -r 8e07aafe1edc a | ||||
--- a/a Thu Jan 01 00:00:00 1970 +0000 | ||||
+++ b/a Thu Jan 01 00:00:00 1970 +0000 | ||||
@@ -1,1 +1,1 @@ | ||||
-b | ||||
+c | ||||
diff -r b09be438c43a -r 8e07aafe1edc b | ||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||||
+++ b/b Thu Jan 01 00:00:00 1970 +0000 | ||||
@@ -0,0 +1,1 @@ | ||||
+b | ||||
$ cd .. | ||||
Nicolas Dumazet
|
r12972 | |||
'hg log -r rev fn' when last(filelog(fn)) != rev | ||||
Mads Kiilerich
|
r16912 | $ hg init simplelog | ||
$ cd simplelog | ||||
Nicolas Dumazet
|
r12972 | $ echo f > a | ||
$ hg ci -Am'a' -d '0 0' | ||||
adding a | ||||
$ echo f >> a | ||||
$ hg ci -Am'a bis' -d '1 0' | ||||
$ hg log -r0 a | ||||
changeset: 0:9f758d63dcde | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: a | ||||
Pierre-Yves David
|
r18208 | enable obsolete to test hidden feature | ||
Durham Goode
|
r22955 | $ cat >> $HGRCPATH << EOF | ||
> [experimental] | ||||
> evolution=createmarkers | ||||
Pierre-Yves David
|
r14645 | > EOF | ||
Pierre-Yves David
|
r18208 | |||
Pierre-Yves David
|
r14645 | $ hg log --template='{rev}:{node}\n' | ||
1:a765632148dc55d38c35c4f247c618701886cb2f | ||||
0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | ||||
Pierre-Yves David
|
r18208 | $ hg debugobsolete a765632148dc55d38c35c4f247c618701886cb2f | ||
$ hg up null -q | ||||
Pierre-Yves David
|
r14645 | $ hg log --template='{rev}:{node}\n' | ||
0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | ||||
$ hg log --template='{rev}:{node}\n' --hidden | ||||
1:a765632148dc55d38c35c4f247c618701886cb2f | ||||
0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | ||||
Matt Mackall
|
r19471 | $ hg log -r a | ||
Pierre-Yves David
|
r23046 | abort: hidden revision 'a'! | ||
(use --hidden to access hidden revisions) | ||||
Matt Mackall
|
r19471 | [255] | ||
FUJIWARA Katsunori
|
r15725 | |||
Pierre-Yves David
|
r18250 | test that parent prevent a changeset to be hidden | ||
Pierre-Yves David
|
r18267 | $ hg up 1 -q --hidden | ||
Pierre-Yves David
|
r18250 | $ hg log --template='{rev}:{node}\n' | ||
1:a765632148dc55d38c35c4f247c618701886cb2f | ||||
0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | ||||
test that second parent prevent a changeset to be hidden too | ||||
$ hg debugsetparents 0 1 # nothing suitable to merge here | ||||
$ hg log --template='{rev}:{node}\n' | ||||
1:a765632148dc55d38c35c4f247c618701886cb2f | ||||
0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | ||||
Kevin Bullock
|
r18494 | $ hg debugsetparents 1 | ||
$ hg up -q null | ||||
bookmarks prevent a changeset being hidden | ||||
$ hg bookmark --hidden -r 1 X | ||||
$ hg log --template '{rev}:{node}\n' | ||||
1:a765632148dc55d38c35c4f247c618701886cb2f | ||||
0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | ||||
Kevin Bullock
|
r18495 | $ hg bookmark -d X | ||
divergent bookmarks are not hidden | ||||
$ hg bookmark --hidden -r 1 X@foo | ||||
$ hg log --template '{rev}:{node}\n' | ||||
1:a765632148dc55d38c35c4f247c618701886cb2f | ||||
0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | ||||
Pierre-Yves David
|
r18250 | |||
FUJIWARA Katsunori
|
r15725 | clear extensions configuration | ||
$ echo '[extensions]' >> $HGRCPATH | ||||
Pierre-Yves David
|
r18208 | $ echo "obs=!" >> $HGRCPATH | ||
FUJIWARA Katsunori
|
r15725 | $ cd .. | ||
test -u/-k for problematic encoding | ||||
# unicode: cp932: | ||||
# u30A2 0x83 0x41(= 'A') | ||||
# u30C2 0x83 0x61(= 'a') | ||||
$ hg init problematicencoding | ||||
$ cd problematicencoding | ||||
$ python > setup.sh <<EOF | ||||
> print u''' | ||||
> echo a > text | ||||
> hg add text | ||||
> hg --encoding utf-8 commit -u '\u30A2' -m none | ||||
> echo b > text | ||||
> hg --encoding utf-8 commit -u '\u30C2' -m none | ||||
> echo c > text | ||||
> hg --encoding utf-8 commit -u none -m '\u30A2' | ||||
> echo d > text | ||||
> hg --encoding utf-8 commit -u none -m '\u30C2' | ||||
> '''.encode('utf-8') | ||||
> EOF | ||||
$ sh < setup.sh | ||||
test in problematic encoding | ||||
$ python > test.sh <<EOF | ||||
> print u''' | ||||
> hg --encoding cp932 log --template '{rev}\\n' -u '\u30A2' | ||||
> echo ==== | ||||
> hg --encoding cp932 log --template '{rev}\\n' -u '\u30C2' | ||||
> echo ==== | ||||
> hg --encoding cp932 log --template '{rev}\\n' -k '\u30A2' | ||||
> echo ==== | ||||
> hg --encoding cp932 log --template '{rev}\\n' -k '\u30C2' | ||||
> '''.encode('cp932') | ||||
> EOF | ||||
$ sh < test.sh | ||||
0 | ||||
==== | ||||
1 | ||||
==== | ||||
2 | ||||
0 | ||||
==== | ||||
3 | ||||
1 | ||||
$ cd .. | ||||
smuralid
|
r17746 | |||
test hg log on non-existent files and on directories | ||||
$ hg init issue1340 | ||||
$ cd issue1340 | ||||
$ mkdir d1; mkdir D2; mkdir D3.i; mkdir d4.hg; mkdir d5.d; mkdir .d6 | ||||
$ echo 1 > d1/f1 | ||||
$ echo 1 > D2/f1 | ||||
$ echo 1 > D3.i/f1 | ||||
$ echo 1 > d4.hg/f1 | ||||
$ echo 1 > d5.d/f1 | ||||
$ echo 1 > .d6/f1 | ||||
Adrian Buehlmann
|
r17781 | $ hg -q add . | ||
smuralid
|
r17746 | $ hg commit -m "a bunch of weird directories" | ||
$ hg log -l1 d1/f1 | grep changeset | ||||
changeset: 0:65624cd9070a | ||||
$ hg log -l1 f1 | ||||
$ hg log -l1 . | grep changeset | ||||
changeset: 0:65624cd9070a | ||||
$ hg log -l1 ./ | grep changeset | ||||
changeset: 0:65624cd9070a | ||||
$ hg log -l1 d1 | grep changeset | ||||
changeset: 0:65624cd9070a | ||||
$ hg log -l1 D2 | grep changeset | ||||
changeset: 0:65624cd9070a | ||||
$ hg log -l1 D2/f1 | grep changeset | ||||
changeset: 0:65624cd9070a | ||||
$ hg log -l1 D3.i | grep changeset | ||||
changeset: 0:65624cd9070a | ||||
$ hg log -l1 D3.i/f1 | grep changeset | ||||
changeset: 0:65624cd9070a | ||||
$ hg log -l1 d4.hg | grep changeset | ||||
changeset: 0:65624cd9070a | ||||
$ hg log -l1 d4.hg/f1 | grep changeset | ||||
changeset: 0:65624cd9070a | ||||
$ hg log -l1 d5.d | grep changeset | ||||
changeset: 0:65624cd9070a | ||||
$ hg log -l1 d5.d/f1 | grep changeset | ||||
changeset: 0:65624cd9070a | ||||
$ hg log -l1 .d6 | grep changeset | ||||
changeset: 0:65624cd9070a | ||||
$ hg log -l1 .d6/f1 | grep changeset | ||||
changeset: 0:65624cd9070a | ||||
Sean Farley
|
r18466 | |||
issue3772: hg log -r :null showing revision 0 as well | ||||
$ hg log -r :null | ||||
Cristian Zamfir
|
r20699 | changeset: 0:65624cd9070a | ||
tag: tip | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: a bunch of weird directories | ||||
Sean Farley
|
r18466 | changeset: -1:000000000000 | ||
user: | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
Kevin Bullock
|
r18468 | $ hg log -r null:null | ||
changeset: -1:000000000000 | ||||
user: | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
Sean Farley
|
r23773 | Check that adding an arbitrary name shows up in log automatically | ||
Sean Farley
|
r18466 | |||
Sean Farley
|
r23773 | $ cat > ../names.py <<EOF | ||
> """A small extension to test adding arbitrary names to a repo""" | ||||
> from mercurial.namespaces import namespace | ||||
> | ||||
> def reposetup(ui, repo): | ||||
> foo = {'foo': repo[0].node()} | ||||
> ns = namespace("bars", "bar", | ||||
> lambda r: foo.keys(), | ||||
> lambda r, name: foo.get(name), | ||||
> lambda r, node: [name for name, n | ||||
> in foo.iteritems() | ||||
> if n == node]) | ||||
> repo.names.addnamespace(ns) | ||||
> EOF | ||||
$ hg --config extensions.names=../names.py log -r 0 | ||||
changeset: 0:65624cd9070a | ||||
tag: tip | ||||
bar: foo | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: a bunch of weird directories | ||||
smuralid
|
r17746 | $ cd .. | ||
Durham Goode
|
r23500 | |||
hg log -f dir across branches | ||||
$ hg init acrossbranches | ||||
$ cd acrossbranches | ||||
$ mkdir d | ||||
$ echo a > d/a && hg ci -Aqm a | ||||
$ echo b > d/a && hg ci -Aqm b | ||||
$ hg up -q 0 | ||||
$ echo b > d/a && hg ci -Aqm c | ||||
$ hg log -f d -T '{desc}' -G | ||||
@ c | ||||
| | ||||
o a | ||||
$ hg log -f d/a -T '{desc}' -G | ||||
Pierre-Yves David
|
r23704 | @ c | ||
Durham Goode
|
r23500 | | | ||
o a | ||||
$ cd .. | ||||
Pierre-Yves David
|
r23702 | |||
hg log -f with linkrev pointing to another branch | ||||
------------------------------------------------- | ||||
create history with a filerev whose linkrev points to another branch | ||||
$ hg init branchedlinkrev | ||||
$ cd branchedlinkrev | ||||
$ echo 1 > a | ||||
$ hg commit -Am 'content1' | ||||
adding a | ||||
$ echo 2 > a | ||||
$ hg commit -m 'content2' | ||||
$ hg up --rev 'desc(content1)' | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ echo unrelated > unrelated | ||||
$ hg commit -Am 'unrelated' | ||||
adding unrelated | ||||
created new head | ||||
$ hg graft -r 'desc(content2)' | ||||
grafting 1:2294ae80ad84 "content2" | ||||
$ echo 3 > a | ||||
$ hg commit -m 'content3' | ||||
$ hg log -G | ||||
@ changeset: 4:50b9b36e9c5d | ||||
| tag: tip | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: content3 | ||||
| | ||||
o changeset: 3:15b2327059e5 | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: content2 | ||||
| | ||||
o changeset: 2:2029acd1168c | ||||
| parent: 0:ae0a3c9f9e95 | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: unrelated | ||||
| | ||||
| o changeset: 1:2294ae80ad84 | ||||
|/ user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: content2 | ||||
| | ||||
o changeset: 0:ae0a3c9f9e95 | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: content1 | ||||
log -f on the file should list the graft result. | ||||
$ hg log -Gf a | ||||
@ changeset: 4:50b9b36e9c5d | ||||
| tag: tip | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: content3 | ||||
| | ||||
o changeset: 3:15b2327059e5 | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: content2 | ||||
| | ||||
o changeset: 0:ae0a3c9f9e95 | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: content1 | ||||
plain log lists the original version | ||||
(XXX we should probably list both) | ||||
$ hg log -G a | ||||
@ changeset: 4:50b9b36e9c5d | ||||
| tag: tip | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: content3 | ||||
| | ||||
| o changeset: 1:2294ae80ad84 | ||||
|/ user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: content2 | ||||
| | ||||
o changeset: 0:ae0a3c9f9e95 | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: content1 | ||||
Pierre-Yves David
|
r23704 | |||
hg log -f from the grafted changeset | ||||
(The bootstrap should properly take the topology in account) | ||||
$ hg up 'desc(content3)^' | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ hg log -Gf a | ||||
@ changeset: 3:15b2327059e5 | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: content2 | ||||
| | ||||
o changeset: 0:ae0a3c9f9e95 | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: content1 | ||||
Pierre-Yves David
|
r23719 | |||
Test that we use the first non-hidden changeset in that case. | ||||
(hide the changeset) | ||||
$ hg log -T '{node}\n' -r 1 | ||||
2294ae80ad8447bc78383182eeac50cb049df623 | ||||
$ hg debugobsolete 2294ae80ad8447bc78383182eeac50cb049df623 | ||||
$ hg log -G | ||||
o changeset: 4:50b9b36e9c5d | ||||
| tag: tip | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: content3 | ||||
| | ||||
@ changeset: 3:15b2327059e5 | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: content2 | ||||
| | ||||
o changeset: 2:2029acd1168c | ||||
| parent: 0:ae0a3c9f9e95 | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: unrelated | ||||
| | ||||
o changeset: 0:ae0a3c9f9e95 | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: content1 | ||||
Check that log on the file does not drop the file revision. | ||||
$ hg log -G a | ||||
o changeset: 4:50b9b36e9c5d | ||||
| tag: tip | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: content3 | ||||
| | ||||
@ changeset: 3:15b2327059e5 | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: content2 | ||||
| | ||||
o changeset: 0:ae0a3c9f9e95 | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: content1 | ||||
Pierre-Yves David
|
r23720 | Even when a head revision is linkrev-shadowed. | ||
$ hg log -T '{node}\n' -r 4 | ||||
50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2 | ||||
$ hg debugobsolete 50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2 | ||||
$ hg log -G a | ||||
@ changeset: 3:15b2327059e5 | ||||
| tag: tip | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: content2 | ||||
| | ||||
o changeset: 0:ae0a3c9f9e95 | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: content1 | ||||
Pierre-Yves David
|
r23702 | $ cd .. | ||
Pierre-Yves David
|
r23729 | |||
Even when the file revision is missing from some head: | ||||
$ hg init issue4490 | ||||
$ cd issue4490 | ||||
$ echo '[experimental]' >> .hg/hgrc | ||||
$ echo 'evolution=createmarkers' >> .hg/hgrc | ||||
$ echo a > a | ||||
$ hg ci -Am0 | ||||
adding a | ||||
$ echo b > b | ||||
$ hg ci -Am1 | ||||
adding b | ||||
$ echo B > b | ||||
$ hg ci --amend -m 1 | ||||
$ hg up 0 | ||||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
$ echo c > c | ||||
$ hg ci -Am2 | ||||
adding c | ||||
created new head | ||||
$ hg up 'head() and not .' | ||||
1 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
$ hg log -G | ||||
o changeset: 4:db815d6d32e6 | ||||
| tag: tip | ||||
| parent: 0:f7b1eb17ad24 | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: 2 | ||||
| | ||||
| @ changeset: 3:9bc8ce7f9356 | ||||
|/ parent: 0:f7b1eb17ad24 | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: 1 | ||||
| | ||||
o changeset: 0:f7b1eb17ad24 | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: 0 | ||||
$ hg log -f -G b | ||||
@ changeset: 3:9bc8ce7f9356 | ||||
| parent: 0:f7b1eb17ad24 | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: 1 | ||||
| | ||||
$ hg log -G b | ||||
@ changeset: 3:9bc8ce7f9356 | ||||
| parent: 0:f7b1eb17ad24 | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: 1 | ||||
| | ||||