mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
4a936cee21
Summary: Previously, the following pattern is common in our tests: ``` $ extpath=`dirname $TESTDIR` $ cp $extpath/hgext3rd/name.py $TESTTMP # use $TESTTMP substitution in message $ cat >> $HGRCPATH<<EOF > [extensions] > name=$TESTTMP/name.py > EOF ``` Now, it gets simplified to: ``` $ cat >> $HGRCPATH<<EOF > [extensions] > name=$TESTDIR/../hgext3rd/name.py > EOF ``` This removes unnecessary `dirname` and `cp`. Also fixed a regex that does not match `bytes`: ``` - transferred 268 bytes in [\d.]+ seconds \([\d.]+ KB/sec\) (re) + transferred 268 bytes in 0.3 seconds (939 bytes/sec) ``` Test Plan: arc unit Reviewers: #mercurial, phillco Reviewed By: phillco Subscribers: medson, mjpieters Differential Revision: https://phabricator.intern.facebook.com/D5270897 Signature: t1:5270897:1497663052:bf860a0b480c751b1e4b53cebf6526193f0f6652
18 lines
345 B
Perl
18 lines
345 B
Perl
$ cat >> $HGRCPATH << EOF
|
|
> [extensions]
|
|
> commitextras=$TESTDIR/../hgext3rd/commitextras.py
|
|
> EOF
|
|
|
|
Test stuff
|
|
|
|
$ hg init repo
|
|
$ cd repo
|
|
$ touch a
|
|
$ hg commit -Aqm a
|
|
$ echo a > a
|
|
$ hg commit -qm a2 --extra oldhash=foo --extra source=bar
|
|
$ hg log -r . -T '{extras % "{extra}\n"}'
|
|
branch=default
|
|
oldhash=foo
|
|
source=bar
|