sapling/tests/test-smartlog-tweakdefaults.t
Jun Wu 8a3a99ba21 hgext: move single file extensions to hgext3rd
Summary:
Be a better citizen under system python path.

Fix all tests issues and change setup.py to use glob pattern to include
all extensions.

Test Plan:
Run tests and `make local`.
Also build and install the package and run `hg sl` in major repos.

Reviewers: #mercurial, ttung, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, durham, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3534311

Signature: t1:3534311:1468275426:fe122646c8bd6c541e1889e73e9df28f86747ff2
2016-07-08 13:15:42 +01:00

49 lines
1.7 KiB
Perl

$ extpath=`dirname $TESTDIR`
$ cp $extpath/hgext3rd/smartlog.py $TESTTMP # use $TESTTMP substitution in message
$ cp $extpath/hgext3rd/tweakdefaults.py $TESTTMP
$ cp $extpath/hgext3rd/fbamend.py $TESTTMP
$ cat >> $HGRCPATH << EOF
> [extensions]
> rebase=
> smartlog=$TESTTMP/smartlog.py
> tweakdefaults=$TESTTMP/tweakdefaults.py
> fbamend=$TESTTMP/fbamend.py
> [experimental]
> evolution=createmarkers
> allowdivergence=on
> EOF
Prepare a repo for amend checks
$ hg init repo
$ cd repo
$ echo root > root && hg ci -Am root # rev 0
adding root
$ echo base > base && hg ci -Am base # rev 1
adding base
$ echo a > a && hg ci -Am a # rev 2
adding a
$ echo aa > a && hg amend # rev 3 (aux) and 4 (real)
$ hg up --hidden -r 2
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo aaa > a && hg amend # rev 5 (aux) and 6 (real)
Check the amend template keywords
$ hg log --hidden -r 2 -T "{node} amended as {amendsuccessors % '{short(amendsuccessor)} '}\n"
6e2c701de62843743b3ad0c4397a88605f0aa7c9 amended as [a-f0-9]* [a-f0-9]* (re)
Prepare a repo for rebase checks
$ hg up 0
0 files updated, 0 files merged, 2 files removed, 0 files unresolved
$ echo b > b && hg ci -Am b # rev 7
adding b
created new head
$ hg rebase --hidden -r 7 -d 1 # rev 8
rebasing 7:1e9a3c00cbe9 "b" (tip)
$ hg rebase --hidden -r 7 -d 2 # rev 9
rebasing 7:1e9a3c00cbe9 "b"
Check the rebase template keywords
$ hg log --hidden -r 7 -T "{node} rebased as {rebasesuccessors % '{short(rebasesuccessor)} '}\n"
1e9a3c00cbe90d236ac05ef61efcc5e40b7412bc rebased as [a-f0-9]* [a-f0-9]* (re)