Commit Graph

9 Commits

Author SHA1 Message Date
Mateusz Kwapich
760d982e3e tests: change the name of backup files
Summary: Looks like the upstream has changed it on us.

Reviewers: quark

Reviewed By: quark

Subscribers: quark

Differential Revision: https://phab.mercurial-scm.org/D40
2017-07-11 09:44:53 -07:00
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
Adam Simpkins
1b9a5fdc5c tweakdefaults: fix hg pull --rebase with a --tool argument
Summary:
Fix the tweakdefaults code to extract the --tool argument when extracting
--rebase, and to pass it in to the rebasemodule.rebase() function correctly.

Test Plan: Included a new test.

Reviewers: #mercurial, rmcelroy, quark

Reviewed By: quark

Subscribers: quark, net-systems-diffs@fb.com, mjpieters

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

Tasks: 18770938

Signature: t1:5134466:1495848690:308a8d3fbad39e6ecfeaee04b1b3267c1fa1118c
2017-05-31 10:58:49 -07:00
Jun Wu
3884602d28 check-code: enfore checking before using common foreign extensions
Summary:
It's a common mistake that our tests require foreign extensions (namely evolve
and remotenames) without checking them first.

This diff adds checks to catch these mistakes, adds missing checks, and unifies
our checking logic using `require-ext.sh`, which is aware of `hgext3rd` and
prints skip message.

This affects `arc lint` so hopefully our new testing code would be free of this
kind of mistakes.

Test Plan: `arc lint` would catch errors

Reviewers: #mercurial, ttung, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

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

Signature: t1:3550977:1468455857:e849dfd9e3cbc446cc6e6c662050ee88a3366e6c
2016-07-12 20:39:34 +01:00
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
Laurent Charignon
0ca941a08a cleanup: use backtick instead of parent to capture output of shell cmd
Summary: This diff is part of a series to cleanup fb-hgext and make it pass check-code.

Test Plan: all tests pass

Reviewers: #sourcecontrol, ttung, mitrandir, akushner

Reviewed By: akushner

Subscribers: mpm, akushner, mitrandir

Differential Revision: https://phabricator.fb.com/D2811997

Signature: t1:2811997:1452200059:9e4fca501a22f95d2d9a22d234758f55e292ea9a
2016-01-07 18:30:24 -08:00
Laurent Charignon
7f96983d9e cleanup: make paths in tests comply with windows's paths
Summary: This diff is part of a series to cleanup fb-hgext and make it pass check-code.

Test Plan: all tests pass

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2811930
2016-01-07 18:30:24 -08:00
Ryan McElroy
b991c57123 tweakdefaults: add default pull destination config
Summary: people have complained that this did not have a sensible default

Test Plan: added a new test

Reviewers: #sourcecontrol, cdelahousse

Reviewed By: cdelahousse

Subscribers: cdelahousse

Differential Revision: https://phabricator.fb.com/D2698778

Tasks: 9175076

Signature: t1:2698778:1448503081:defe2ec4a79b0a899107948472815a54a98d1fff
2015-11-25 18:23:07 -08:00
Ryan McElroy
2bf48d3eac tweakdefaults: abort updating pulls with no explicit destination
Summary: This allows unambiguous `hg pull --update` and `hg pull --rebase` calls.

Test Plan: Updated tweakdefault tests

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: durham

Differential Revision: https://phabricator.fb.com/D2535805

Tasks: 8252277

Signature: t1:2535805:1444783814:35a72356cf1eb67ebab908441ed613e3d606b0cb
2015-11-13 18:10:52 -08:00