Commit Graph

2 Commits

Author SHA1 Message Date
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
Stanislau Hlebik
bc7415f5e7 fastpartialmatch: use _realopener
Summary:
User reported failures because revlog.opener doesn't have `exists` function.
The reason is that sometimes opener is wrapped inside the function.
Let's use _realopener instead

Test Plan: arc unit

Reviewers: #sourcecontrol, mjpieters

Reviewed By: mjpieters

Subscribers: mjpieters

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

Signature: t1:4571659:1487267797:a950ab7c88d75573df64ec1964755c054307c7ea
2017-02-16 10:17:54 -08:00