mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
b27a46c987
Summary: This is a big bulk of generally almost-obvious fixes to the moved tests. Mostly these fixes have to do with correct importing of the actual extensions. Depends on D6675329 Test Plan: - ./run-tests.py fails less after this commit - see further commits for more test fixes Reviewers: #sourcecontrol Differential Revision: https://phabricator.intern.facebook.com/D6675344
75 lines
2.1 KiB
Perl
75 lines
2.1 KiB
Perl
Setup
|
|
|
|
$ PYTHONPATH=$TESTDIR/..:$PYTHONPATH
|
|
$ export PYTHONPATH
|
|
$ cat >> $HGRCPATH << EOF
|
|
> [extensions]
|
|
> myparent=
|
|
> EOF
|
|
$ hg init repo
|
|
$ cd repo
|
|
$ touch foo
|
|
$ cat >> ../commitmessage << EOF
|
|
> [prefix] My title
|
|
>
|
|
> Summary: Very good summary of my commit.
|
|
>
|
|
> Test Plan: cat foo
|
|
>
|
|
> Reviewers: #sourcecontrol, rmcelroy
|
|
>
|
|
> Subscribers: rmcelroy, mjpieters
|
|
>
|
|
> Differential Revision: https://phabricator.fb.com/D42
|
|
>
|
|
> Tasks: 1337
|
|
> EOF
|
|
$ hg commit -qAl ../commitmessage
|
|
$ touch bar
|
|
$ hg commit -qAm 'Differential Revision: https://phabricator.fb.com/D2'
|
|
|
|
All template keywords work if the current author matches the other of the
|
|
previous commit.
|
|
|
|
$ hg log -T '{myparentdiff}\n' -r .
|
|
D42
|
|
$ hg log -T '{myparentreviewers}\n' -r .
|
|
#sourcecontrol, rmcelroy
|
|
$ hg log -T '{myparentsubscribers}\n' -r .
|
|
rmcelroy, mjpieters
|
|
$ hg log -T '{myparenttasks}\n' -r .
|
|
1337
|
|
$ hg log -T '{myparenttitleprefix}\n' -r .
|
|
[prefix]
|
|
|
|
If the authors do not match the keywords will be empty.
|
|
|
|
$ hg commit -q --amend --user hacker2
|
|
$ hg log -T '{myparentdiff}' -r .
|
|
$ hg log -T '{myparentreviewers}' -r .
|
|
$ hg log -T '{myparentsubscribers}' -r .
|
|
$ hg log -T '{myparenttasks}' -r .
|
|
$ hg log -T '{myparenttitleprefix}' -r .
|
|
|
|
Make sure the template keywords are documented correctly
|
|
|
|
$ hg help templates | grep -A2 myparent
|
|
myparentdiff Show the differential revision of the commit's parent, if it
|
|
has the same author as this commit.
|
|
-- (?)
|
|
myparentreviewers
|
|
Show the reviewers of the commit's parent, if it has the
|
|
same author as this commit.
|
|
-- (?)
|
|
myparentsubscribers
|
|
Show the subscribers of the commit's parent, if it has the
|
|
same author as this commit.
|
|
-- (?)
|
|
myparenttasks
|
|
Show the tasks from the commit's parent, if it has the same
|
|
author as this commit.
|
|
-- (?)
|
|
myparenttitleprefix
|
|
Show the title prefix of the commit's parent, if it has the
|
|
same author as this commit.
|