2014-10-18 00:35:52 +04:00
|
|
|
$ cat >> $HGRCPATH <<EOF
|
|
|
|
> [extensions]
|
2016-07-08 15:15:42 +03:00
|
|
|
> smartlog = $TESTDIR/../hgext3rd/smartlog.py
|
2016-04-19 13:19:20 +03:00
|
|
|
> [experimental]
|
|
|
|
> graphstyle.grandparent=|
|
|
|
|
> graphstyle.missing=|
|
2014-10-18 00:35:52 +04:00
|
|
|
> EOF
|
|
|
|
|
|
|
|
Build up a repo
|
|
|
|
|
|
|
|
$ hg init repo
|
|
|
|
$ cd repo
|
2015-09-16 02:13:13 +03:00
|
|
|
|
|
|
|
Confirm smartlog doesn't error on an empty repo
|
|
|
|
$ hg smartlog
|
|
|
|
|
|
|
|
Continue repo setup
|
2014-10-18 00:35:52 +04:00
|
|
|
$ hg book master
|
2015-09-16 02:13:13 +03:00
|
|
|
$ hg sl -r 'smartlog() + master'
|
2014-10-18 00:35:52 +04:00
|
|
|
$ touch a1 && hg add a1 && hg ci -ma1
|
|
|
|
$ touch a2 && hg add a2 && hg ci -ma2
|
|
|
|
$ hg book feature1
|
|
|
|
$ touch b && hg add b && hg ci -mb
|
|
|
|
$ hg up -q master
|
|
|
|
$ touch c1 && hg add c1 && hg ci -mc1
|
|
|
|
created new head
|
|
|
|
$ touch c2 && hg add c2 && hg ci -mc2
|
|
|
|
$ hg book feature2
|
|
|
|
$ touch d && hg add d && hg ci -md
|
|
|
|
$ hg log -G -T compact
|
|
|
|
@ 5[tip][feature2] db92053d5c83 1970-01-01 00:00 +0000 test
|
|
|
|
| d
|
|
|
|
|
|
|
|
|
o 4[master] 38d85b506754 1970-01-01 00:00 +0000 test
|
|
|
|
| c2
|
|
|
|
|
|
|
|
|
o 3:1 ec7553f7b382 1970-01-01 00:00 +0000 test
|
|
|
|
| c1
|
|
|
|
|
|
|
|
|
| o 2[feature1] 49cdb4091aca 1970-01-01 00:00 +0000 test
|
|
|
|
|/ b
|
|
|
|
|
|
|
|
|
o 1 b68836a6e2ca 1970-01-01 00:00 +0000 test
|
|
|
|
| a2
|
|
|
|
|
|
|
|
|
o 0 df4fd610a3d6 1970-01-01 00:00 +0000 test
|
|
|
|
a1
|
|
|
|
|
|
|
|
|
|
|
|
Basic test
|
|
|
|
$ hg smartlog -T compact
|
|
|
|
@ 5[tip][feature2] db92053d5c83 1970-01-01 00:00 +0000 test
|
|
|
|
| d
|
|
|
|
|
|
|
|
|
o 4[master] 38d85b506754 1970-01-01 00:00 +0000 test
|
2016-09-17 02:51:26 +03:00
|
|
|
. c2
|
2014-10-18 00:35:52 +04:00
|
|
|
.
|
|
|
|
| o 2[feature1] 49cdb4091aca 1970-01-01 00:00 +0000 test
|
|
|
|
|/ b
|
|
|
|
|
|
|
|
|
o 1 b68836a6e2ca 1970-01-01 00:00 +0000 test
|
|
|
|
| a2
|
|
|
|
|
|
|
|
|
|
2014-11-11 05:45:39 +03:00
|
|
|
With commit info
|
|
|
|
$ echo "hello" >c2 && hg ci --amend
|
hgext: fix many tests, run-tests, writecg2 for hg3.3
Summary: Still need to fix pushrebase
Test Plan: ##run-tests.py##
Reviewers: sid0, daviser, davidsp, mitrandir, akushner, rmcelroy, pyd, mpm, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1813630
Signature: t1:1813630:1422573745:c5ea2a8acdfda0e555d1ae56a16f4fb5e5618174
2015-01-30 02:06:06 +03:00
|
|
|
saved backup bundle to $TESTTMP/repo/.hg/strip-backup/db92053d5c83-f9f5e1aa-amend-backup.hg (glob)
|
2014-11-11 05:45:39 +03:00
|
|
|
$ hg smartlog -T compact --commit-info
|
|
|
|
@ 5[tip][feature2] 05d10250273e 1970-01-01 00:00 +0000 test
|
|
|
|
| d
|
|
|
|
|
|
|
|
|
| M c2
|
|
|
|
| A d
|
|
|
|
|
|
|
|
|
o 4[master] 38d85b506754 1970-01-01 00:00 +0000 test
|
2016-09-17 02:51:26 +03:00
|
|
|
. c2
|
2014-11-11 05:45:39 +03:00
|
|
|
.
|
|
|
|
| o 2[feature1] 49cdb4091aca 1970-01-01 00:00 +0000 test
|
|
|
|
|/ b
|
|
|
|
|
|
|
|
|
o 1 b68836a6e2ca 1970-01-01 00:00 +0000 test
|
|
|
|
| a2
|
|
|
|
|
|
|
|
|
|
2015-01-21 23:20:33 +03:00
|
|
|
As a revset
|
|
|
|
$ hg log -G -T compact -r 'smartlog()'
|
2015-01-22 22:34:42 +03:00
|
|
|
@ 5[tip][feature2] 05d10250273e 1970-01-01 00:00 +0000 test
|
2015-01-21 23:20:33 +03:00
|
|
|
| d
|
|
|
|
|
|
|
|
|
o 4[master] 38d85b506754 1970-01-01 00:00 +0000 test
|
|
|
|
| c2
|
|
|
|
|
|
|
|
|
| o 2[feature1] 49cdb4091aca 1970-01-01 00:00 +0000 test
|
|
|
|
| | b
|
|
|
|
| |
|
|
|
|
|
2015-02-20 01:39:54 +03:00
|
|
|
With --master
|
2015-05-19 03:36:21 +03:00
|
|
|
$ hg smartlog -T compact --master 1
|
2015-02-24 22:51:16 +03:00
|
|
|
@ 5[tip][feature2] 05d10250273e 1970-01-01 00:00 +0000 test
|
2015-02-20 01:39:54 +03:00
|
|
|
| d
|
|
|
|
|
|
|
|
|
o 4[master] 38d85b506754 1970-01-01 00:00 +0000 test
|
|
|
|
| c2
|
|
|
|
|
|
|
|
|
o 3:1 ec7553f7b382 1970-01-01 00:00 +0000 test
|
|
|
|
| c1
|
|
|
|
|
|
|
|
|
| o 2[feature1] 49cdb4091aca 1970-01-01 00:00 +0000 test
|
|
|
|
|/ b
|
|
|
|
|
|
|
|
|
o 1 b68836a6e2ca 1970-01-01 00:00 +0000 test
|
|
|
|
| a2
|
|
|
|
|
|
|
|
|
|
2015-01-21 23:20:33 +03:00
|
|
|
Specific revs
|
|
|
|
$ hg smartlog -T compact -r 2 -r 4
|
|
|
|
o 4[master] 38d85b506754 1970-01-01 00:00 +0000 test
|
2016-09-17 02:51:26 +03:00
|
|
|
. c2
|
2015-01-21 23:20:33 +03:00
|
|
|
.
|
|
|
|
| o 2[feature1] 49cdb4091aca 1970-01-01 00:00 +0000 test
|
|
|
|
|/ b
|
|
|
|
|
|
|
|
|
o 1 b68836a6e2ca 1970-01-01 00:00 +0000 test
|
|
|
|
| a2
|
|
|
|
|
|
2014-11-11 05:45:39 +03:00
|
|
|
|
2015-01-21 23:20:33 +03:00
|
|
|
$ hg smartlog -T compact -r 'smartlog()' -r 0
|
2015-01-22 22:34:42 +03:00
|
|
|
@ 5[tip][feature2] 05d10250273e 1970-01-01 00:00 +0000 test
|
2015-01-21 23:20:33 +03:00
|
|
|
| d
|
|
|
|
|
|
|
|
|
o 4[master] 38d85b506754 1970-01-01 00:00 +0000 test
|
2016-09-17 02:51:26 +03:00
|
|
|
. c2
|
|
|
|
.
|
2015-01-21 23:20:33 +03:00
|
|
|
| o 2[feature1] 49cdb4091aca 1970-01-01 00:00 +0000 test
|
|
|
|
|/ b
|
|
|
|
|
|
|
|
|
o 0 df4fd610a3d6 1970-01-01 00:00 +0000 test
|
|
|
|
a1
|
|
|
|
|
2015-02-20 02:50:16 +03:00
|
|
|
|
|
|
|
Test master ordering
|
|
|
|
$ hg boo -f master -r 49cdb4091aca
|
|
|
|
$ hg smartlog -T compact
|
|
|
|
o 2[feature1,master] 49cdb4091aca 1970-01-01 00:00 +0000 test
|
|
|
|
| b
|
|
|
|
|
|
2015-02-24 22:51:16 +03:00
|
|
|
| @ 5[tip][feature2] 05d10250273e 1970-01-01 00:00 +0000 test
|
2015-02-20 02:50:16 +03:00
|
|
|
| | d
|
|
|
|
| |
|
|
|
|
| o 4 38d85b506754 1970-01-01 00:00 +0000 test
|
|
|
|
| | c2
|
|
|
|
| |
|
|
|
|
| o 3:1 ec7553f7b382 1970-01-01 00:00 +0000 test
|
|
|
|
|/ c1
|
|
|
|
|
|
|
|
|
o 1 b68836a6e2ca 1970-01-01 00:00 +0000 test
|
|
|
|
| a2
|
|
|
|
|
|
2015-02-20 03:03:41 +03:00
|
|
|
|
|
|
|
Test overriding master
|
|
|
|
$ hg boo -f master -r 38d85b506754
|
|
|
|
$ hg smartlog -T compact
|
2015-02-24 22:51:16 +03:00
|
|
|
@ 5[tip][feature2] 05d10250273e 1970-01-01 00:00 +0000 test
|
2015-02-20 03:03:41 +03:00
|
|
|
| d
|
|
|
|
|
|
|
|
|
o 4[master] 38d85b506754 1970-01-01 00:00 +0000 test
|
2016-09-17 02:51:26 +03:00
|
|
|
. c2
|
2015-02-20 03:03:41 +03:00
|
|
|
.
|
|
|
|
| o 2[feature1] 49cdb4091aca 1970-01-01 00:00 +0000 test
|
|
|
|
|/ b
|
|
|
|
|
|
|
|
|
o 1 b68836a6e2ca 1970-01-01 00:00 +0000 test
|
|
|
|
| a2
|
|
|
|
|
|
|
|
|
|
|
|
|
$ hg smartlog -T compact --master feature1
|
|
|
|
o 2[feature1] 49cdb4091aca 1970-01-01 00:00 +0000 test
|
|
|
|
| b
|
|
|
|
|
|
2015-02-24 22:51:16 +03:00
|
|
|
| @ 5[tip][feature2] 05d10250273e 1970-01-01 00:00 +0000 test
|
2015-02-20 03:03:41 +03:00
|
|
|
| | d
|
|
|
|
| |
|
|
|
|
| o 4[master] 38d85b506754 1970-01-01 00:00 +0000 test
|
|
|
|
| | c2
|
|
|
|
| |
|
|
|
|
| o 3:1 ec7553f7b382 1970-01-01 00:00 +0000 test
|
|
|
|
|/ c1
|
|
|
|
|
|
|
|
|
o 1 b68836a6e2ca 1970-01-01 00:00 +0000 test
|
|
|
|
| a2
|
|
|
|
|
|
|
|
|
|
|
|
|
$ hg smartlog -T compact --config smartlog.master=feature1
|
|
|
|
o 2[feature1] 49cdb4091aca 1970-01-01 00:00 +0000 test
|
|
|
|
| b
|
|
|
|
|
|
2015-02-24 22:51:16 +03:00
|
|
|
| @ 5[tip][feature2] 05d10250273e 1970-01-01 00:00 +0000 test
|
2015-02-20 03:03:41 +03:00
|
|
|
| | d
|
|
|
|
| |
|
|
|
|
| o 4[master] 38d85b506754 1970-01-01 00:00 +0000 test
|
|
|
|
| | c2
|
|
|
|
| |
|
|
|
|
| o 3:1 ec7553f7b382 1970-01-01 00:00 +0000 test
|
|
|
|
|/ c1
|
|
|
|
|
|
|
|
|
o 1 b68836a6e2ca 1970-01-01 00:00 +0000 test
|
|
|
|
| a2
|
|
|
|
|
|
|
|
|
|
|
|
|
$ hg smartlog -T compact --config smartlog.master=feature2 --master feature1
|
|
|
|
o 2[feature1] 49cdb4091aca 1970-01-01 00:00 +0000 test
|
|
|
|
| b
|
|
|
|
|
|
2015-02-24 22:51:16 +03:00
|
|
|
| @ 5[tip][feature2] 05d10250273e 1970-01-01 00:00 +0000 test
|
2015-02-20 03:03:41 +03:00
|
|
|
| | d
|
|
|
|
| |
|
|
|
|
| o 4[master] 38d85b506754 1970-01-01 00:00 +0000 test
|
|
|
|
| | c2
|
|
|
|
| |
|
|
|
|
| o 3:1 ec7553f7b382 1970-01-01 00:00 +0000 test
|
|
|
|
|/ c1
|
|
|
|
|
|
|
|
|
o 1 b68836a6e2ca 1970-01-01 00:00 +0000 test
|
|
|
|
| a2
|
|
|
|
|
|
2015-02-24 09:54:08 +03:00
|
|
|
|
|
|
|
Test draft branches
|
|
|
|
|
|
|
|
$ hg branch foo
|
|
|
|
marked working directory as branch foo
|
|
|
|
(branches are permanent and global, did you want a bookmark?)
|
|
|
|
$ hg commit -m 'create branch foo'
|
|
|
|
$ hg sl
|
2015-02-24 22:51:16 +03:00
|
|
|
@ changeset: 6:26d4a421c339
|
2015-02-24 09:54:08 +03:00
|
|
|
| branch: foo
|
|
|
|
| bookmark: feature2
|
|
|
|
| tag: tip
|
|
|
|
| user: test
|
|
|
|
| date: Thu Jan 01 00:00:00 1970 +0000
|
2016-09-17 02:51:26 +03:00
|
|
|
. summary: create branch foo
|
2015-02-24 09:54:08 +03:00
|
|
|
.
|
|
|
|
o changeset: 4:38d85b506754
|
|
|
|
| bookmark: master
|
|
|
|
| user: test
|
|
|
|
| date: Thu Jan 01 00:00:00 1970 +0000
|
2016-09-17 02:51:26 +03:00
|
|
|
. summary: c2
|
2015-02-24 09:54:08 +03:00
|
|
|
.
|
|
|
|
| o changeset: 2:49cdb4091aca
|
|
|
|
|/ bookmark: feature1
|
|
|
|
| user: test
|
|
|
|
| date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
| summary: b
|
|
|
|
|
|
|
|
|
o changeset: 1:b68836a6e2ca
|
|
|
|
| user: test
|
|
|
|
| date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
| summary: a2
|
|
|
|
|
|
2015-04-30 01:00:31 +03:00
|
|
|
|
|
|
|
Test with weird bookmark names
|
|
|
|
|
2015-05-19 03:36:21 +03:00
|
|
|
$ hg book -r 2 foo-bar
|
|
|
|
$ hg smartlog -r 'foo-bar + .' -T compact
|
|
|
|
@ 6[tip][feature2] 26d4a421c339 1970-01-01 00:00 +0000 test
|
2016-09-17 02:51:26 +03:00
|
|
|
. create branch foo
|
2015-05-19 03:36:21 +03:00
|
|
|
.
|
|
|
|
| o 2[feature1,foo-bar] 49cdb4091aca 1970-01-01 00:00 +0000 test
|
|
|
|
|/ b
|
|
|
|
|
|
|
|
|
o 1 b68836a6e2ca 1970-01-01 00:00 +0000 test
|
|
|
|
| a2
|
|
|
|
|
|
|
|
|
$ hg smartlog --config smartlog.master=foo-bar -T compact
|
|
|
|
o 2[feature1,foo-bar] 49cdb4091aca 1970-01-01 00:00 +0000 test
|
|
|
|
| b
|
|
|
|
|
|
|
|
|
| @ 6[tip][feature2] 26d4a421c339 1970-01-01 00:00 +0000 test
|
2016-09-17 02:51:26 +03:00
|
|
|
| . create branch foo
|
2015-05-19 03:36:21 +03:00
|
|
|
| .
|
|
|
|
| o 4[master] 38d85b506754 1970-01-01 00:00 +0000 test
|
|
|
|
| | c2
|
|
|
|
| |
|
|
|
|
| o 3:1 ec7553f7b382 1970-01-01 00:00 +0000 test
|
|
|
|
|/ c1
|
|
|
|
|
|
|
|
|
o 1 b68836a6e2ca 1970-01-01 00:00 +0000 test
|
|
|
|
| a2
|
|
|
|
|
|
|
|
|
$ hg smartlog --config smartlog.master=xxxx -T compact
|
|
|
|
abort: unknown revision 'xxxx'!
|
|
|
|
[255]
|
2016-02-11 18:11:59 +03:00
|
|
|
|
2016-02-12 04:31:42 +03:00
|
|
|
Test with two unrelated histories
|
|
|
|
$ hg update null
|
|
|
|
0 files updated, 0 files merged, 5 files removed, 0 files unresolved
|
|
|
|
(leaving bookmark feature2)
|
|
|
|
$ touch u1 && hg add u1 && hg ci -mu1
|
|
|
|
created new head
|
|
|
|
$ touch u2 && hg add u2 && hg ci -mu2
|
|
|
|
|
|
|
|
$ hg smartlog -T compact
|
|
|
|
@ 8[tip] 806aaef35296 1970-01-01 00:00 +0000 test
|
|
|
|
| u2
|
|
|
|
|
|
|
|
|
o 7:-1 8749dc393678 1970-01-01 00:00 +0000 test
|
2016-03-31 21:26:15 +03:00
|
|
|
u1
|
|
|
|
|
|
|
|
o 6[feature2] 26d4a421c339 1970-01-01 00:00 +0000 test
|
2016-09-17 02:51:26 +03:00
|
|
|
. create branch foo
|
2016-03-31 21:26:15 +03:00
|
|
|
.
|
|
|
|
o 4[master] 38d85b506754 1970-01-01 00:00 +0000 test
|
2016-09-17 02:51:26 +03:00
|
|
|
. c2
|
2016-03-31 21:26:15 +03:00
|
|
|
.
|
|
|
|
| o 2[feature1,foo-bar] 49cdb4091aca 1970-01-01 00:00 +0000 test
|
|
|
|
|/ b
|
|
|
|
|
|
|
|
|
o 1 b68836a6e2ca 1970-01-01 00:00 +0000 test
|
|
|
|
| a2
|
2016-02-12 04:31:42 +03:00
|
|
|
|
|
|
|
|
note: hiding 1 old heads without bookmarks
|
|
|
|
(use --all to see them)
|
|
|
|
|
|
|
|
$ hg update 26d4a421c339
|
|
|
|
5 files updated, 0 files merged, 2 files removed, 0 files unresolved
|
|
|
|
|
|
|
|
Test singlepublicsuccessor template keyword
|
2016-02-11 18:11:59 +03:00
|
|
|
$ echo "[extensions]" >> $HGRCPATH
|
|
|
|
$ echo "rebase=" >> $HGRCPATH
|
|
|
|
$ echo "[experimental]" >> $HGRCPATH
|
|
|
|
$ echo "evolution=all" >> $HGRCPATH
|
|
|
|
$ cd ..
|
|
|
|
$ hg init kwrepo && cd kwrepo
|
|
|
|
$ echo a > a && hg ci -Am a
|
|
|
|
adding a
|
|
|
|
$ echo b > b && hg ci -Am b
|
|
|
|
adding b
|
|
|
|
$ hg up 0
|
|
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
$ echo c > c && hg ci -Am c
|
|
|
|
adding c
|
|
|
|
created new head
|
|
|
|
$ hg rebase -s 2 -d 1
|
|
|
|
rebasing 2:d36c0562f908 "c" (tip)
|
|
|
|
$ hg phase -r 3 --public
|
|
|
|
$ hg smartlog -r 2 -T "SPS: {singlepublicsuccessor}" --hidden
|
|
|
|
x SPS: 2b5806c2ca1e228838315bbffeb7d1504c38c9d6
|
|
|
|
|
|
|
|
|
|
2016-09-16 18:36:10 +03:00
|
|
|
A draft stack at the top
|
|
|
|
$ cd ..
|
|
|
|
$ hg init repo2
|
|
|
|
$ cd repo2
|
|
|
|
$ hg debugbuilddag '+4'
|
|
|
|
$ hg bookmark curr
|
|
|
|
$ hg bookmark master -r 1
|
|
|
|
$ hg phase --public -r 1
|
|
|
|
$ hg smartlog -T compact --all
|
|
|
|
o 3[tip] 2dc09a01254d 1970-01-01 00:00 +0000 debugbuilddag
|
|
|
|
| r3
|
|
|
|
|
|
|
|
|
o 2 01241442b3c2 1970-01-01 00:00 +0000 debugbuilddag
|
|
|
|
| r2
|
|
|
|
|
|
|
|
|
o 1[master] 66f7d451a68b 1970-01-01 00:00 +0000 debugbuilddag
|
|
|
|
| r1
|
|
|
|
|
|
|
|
|
$ hg smartlog -T compact --all --config smartlog.indentnonpublic=1
|
2016-09-17 04:22:36 +03:00
|
|
|
o 3[tip] 2dc09a01254d 1970-01-01 00:00 +0000 debugbuilddag
|
|
|
|
| r3
|
|
|
|
|
|
|
|
|
o 2 01241442b3c2 1970-01-01 00:00 +0000 debugbuilddag
|
|
|
|
/ r2
|
|
|
|
|
|
|
|
|
o 1[master] 66f7d451a68b 1970-01-01 00:00 +0000 debugbuilddag
|
|
|
|
| r1
|
|
|
|
|
|
|
|
|
|
|
|
|
Different number of lines per node
|
|
|
|
|
|
|
|
$ hg smartlog -T '{rev}' --all --config smartlog.indentnonpublic=1
|
|
|
|
o 3
|
|
|
|
|
|
|
|
|
o 2
|
|
|
|
/
|
|
|
|
o 1
|
|
|
|
|
|
|
|
|
$ hg smartlog -T 'default' --all --config smartlog.indentnonpublic=1
|
|
|
|
o changeset: 3:2dc09a01254d
|
|
|
|
| tag: tip
|
|
|
|
| user: debugbuilddag
|
|
|
|
| date: Thu Jan 01 00:00:03 1970 +0000
|
|
|
|
| summary: r3
|
|
|
|
|
|
|
|
|
o changeset: 2:01241442b3c2
|
|
|
|
/ user: debugbuilddag
|
|
|
|
| date: Thu Jan 01 00:00:02 1970 +0000
|
|
|
|
| summary: r2
|
|
|
|
|
|
|
|
|
o changeset: 1:66f7d451a68b
|
|
|
|
| bookmark: master
|
|
|
|
| user: debugbuilddag
|
|
|
|
| date: Thu Jan 01 00:00:01 1970 +0000
|
|
|
|
| summary: r1
|
|
|
|
|
|
|
|
|
|
|
|
|
Add other draft stacks
|
|
|
|
$ hg up 1 -q
|
|
|
|
$ echo 1 > a
|
|
|
|
$ hg ci -A a -m a -q
|
|
|
|
$ echo 2 >> a
|
|
|
|
$ hg ci -A a -m a -q
|
|
|
|
$ hg up 2 -q
|
|
|
|
$ echo 2 > b
|
|
|
|
$ hg ci -A b -m b -q
|
|
|
|
$ hg smartlog -T compact --all --config smartlog.indentnonpublic=1
|
|
|
|
o 5 a60fccdcd9e9 1970-01-01 00:00 +0000 test
|
|
|
|
| a
|
|
|
|
|
|
|
|
|
o 4:1 8d92afe5abfd 1970-01-01 00:00 +0000 test
|
|
|
|
/ a
|
|
|
|
|
|
|
|
|
| @ 6[tip]:2 401cd6213b51 1970-01-01 00:00 +0000 test
|
|
|
|
| | b
|
|
|
|
| |
|
|
|
|
| | o 3 2dc09a01254d 1970-01-01 00:00 +0000 debugbuilddag
|
|
|
|
| |/ r3
|
2016-09-16 18:36:10 +03:00
|
|
|
| |
|
|
|
|
| o 2 01241442b3c2 1970-01-01 00:00 +0000 debugbuilddag
|
|
|
|
|/ r2
|
|
|
|
|
|
|
|
|
o 1[master] 66f7d451a68b 1970-01-01 00:00 +0000 debugbuilddag
|
|
|
|
| r1
|
|
|
|
|
|
templates: fix help messages for template keywords
Summary:
Many of the template keywords in our extensions were being registered
incorrectly, causing their help output to be rendered incorrectly in the
"hg help templates" output. The ones in smartlog.py were particularly bad, as
most of them showed only their description, without displaying the name of the
template. In smartlog.py only singlepublicsuccessor was being displayed
correctly, because it's docstring explicitly included it's own name at the
start.
This fixes all of our extensions to consistently use the
registrar.templatekeyword() decorator to register the keywords. This decorator
automatically prefixes the help message with the keyword name. The
mercurial/extensions.py code will explicitly check to see if an extension
contains an "templatekeyword" attribute, and if so it will register any
keywords contained in this registry after calling extsetup().
Test Plan:
Added new unit tests to check the output of "hg help templates" for the
affected keywords.
Reviewers: #sourcecontrol, kulshrax, ikostia, rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy, net-systems-diffs@, yogeshwer, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D4427729
Signature: t1:4427729:1484831476:17b478a5e867dfc3f85402588c381bf8b1831107
2017-01-19 23:52:54 +03:00
|
|
|
|
|
|
|
Make sure the template keywords are documented correctly
|
|
|
|
$ hg help templates | grep -A1 successor
|
|
|
|
amendsuccessors
|
|
|
|
Return all of the node's successors created as a result of
|
|
|
|
amend
|
|
|
|
--
|
|
|
|
foldsuccessors
|
|
|
|
Return all of the node's successors created as a result of
|
|
|
|
fold
|
|
|
|
--
|
|
|
|
histeditsuccessors
|
|
|
|
Return all of the node's successors created as a result of
|
|
|
|
histedit
|
|
|
|
--
|
|
|
|
rebasesuccessors
|
|
|
|
Return all of the node's successors created as a result of
|
|
|
|
rebase
|
|
|
|
--
|
|
|
|
singlepublicsuccessor
|
|
|
|
String. Get a single public successor for a given node. If
|
|
|
|
there's none or more than one, return empty string. This is
|
|
|
|
--
|
|
|
|
splitsuccessors
|
|
|
|
Return all of the node's successors created as a result of
|
|
|
|
split
|