sapling/tests/test-smartlog-inhibit.t
Jun Wu 4a936cee21 codemod: remove extpath in tests
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
2017-06-16 18:31:25 -07:00

46 lines
1.0 KiB
Perl

$ cat >> $HGRCPATH << EOF
> [extensions]
> directaccess=$TESTDIR/../hgext3rd/directaccess.py
> fbamend=$TESTDIR/../hgext3rd/fbamend
> inhibit=$TESTDIR/../hgext3rd/inhibit.py
> rebase=
> smartlog=$TESTDIR/../hgext3rd/smartlog.py
> [experimental]
> evolution = createmarkers
> EOF
Test that changesets with visible precursors are rendered as x's, even
with the inhibit extension enabled.
$ hg init repo
$ cd repo
$ hg debugbuilddag +4
$ hg book -r 3 test
$ hg up 1
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg amend -m "amended"
warning: the changeset's children were left behind
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
$ hg smartlog -T '{rev} {bookmarks}'
@ 4
|
| o 3 test
| |
| o 2
| |
| x 1 59cf2bc6d22f.preamend
|/
o 0
$ hg unamend
$ hg up 2
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg smartlog -T '{rev} {bookmarks}'
o 3 test
|
@ 2
|
o 1 59cf2bc6d22f.preamend
|
o 0