Commit Graph

27 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
Jun Wu
5404cd9a3c codemod: get rid of ui.backupconfig
Summary:
The upstream will remove `ui.backupconfig` soon(tm). Let's migrate our code
to `ui.configoverride` to avoid future breakages.

Test Plan: `arc unit`

Reviewers: #sourcecontrol, simonfar

Reviewed By: simonfar

Subscribers: simonfar, mjpieters

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

Signature: t1:4734300:1489803960:a4101d6bc95ab62af67f0076b8e21f57cf926e13
2017-03-17 19:42:50 -07:00
Jun Wu
3c5f5d0bc4 test-mergedriver: fix compatibility with upstream
Upstream has moved debugmergestate from commands.py to debugcommands.py, in
7699b457fd0a. So update our test code accordingly.
2017-02-15 15:08:15 -08:00
Simon Farnsworth
be87628803 Catch up with upstream changes so that our tests pass
Summary: Upstream's done a few changes that we need to catch up with.

Test Plan: Run tests locally on my devserver

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: quark, mjpieters

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

Signature: t1:4058640:1477065516:e2ab2483d054e47b4fe75c6eba185dfd5179f57a
2016-10-21 08:58:52 -07:00
Kostia Balytskyi
6cd744ec1a tests_: adjust test-mergedriver.t tests according to the core changes
Differential Revision: https://phabricator.intern.facebook.com/D4001645
2016-10-11 07:42:20 -07:00
Kostia Balytskyi
8bf34fd038 tests_: fix tests in accordance with the core changes
Differential Revision: https://phabricator.intern.facebook.com/D3967244
2016-10-04 05:25:28 -07:00
Kostia Balytskyi
ded4c889ca tests_: fix failures related to recent renames
Summary: We need to start fixing test failures to test hgbuild e2e :)

Test Plan: run-tests.py against changed files shows that these ones were fixed

Reviewers: quark, mjpieters, rmcelroy, simonfar

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D3907217
2016-09-22 07:44:34 -07:00
Siddharth Agarwal
14a3b298c3 mergedriver: add a test for bug in merge action list
Summary: Test for bug in https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-August/087511.html.

Test Plan: Ran the test.

Reviewers: #sourcecontrol, ttung, simonfar

Reviewed By: simonfar

Subscribers: mjpieters

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

Signature: t1:3762235:1472028110:ad76c9e39f9226f83bd6cb294459936df0b8a93e
2016-08-25 12:20:07 -07: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
84c24b6984 test: match new quoting conventions in core
Summary:
Core changed the quoting convention in some of the warning messages,
this patch makes fb-hgext up to date with these new conventions.

Test Plan: the tests failing before are passing now

Reviewers: durham, quark, mitrandir

Subscribers: mjpieters

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

Tasks: 10906174
2016-04-19 15:33:58 -07:00
Jun Wu
b603929009 mergedriver: fix test caused by upstream change
Summary:
Upstream change 3ceac0 removes the `labels` parameter from
`mergestate.*resolve` methods. Let's update our tests.

Test Plan: Run `test-mergedriver.t` with the latest hg

Reviewers: simonfar, #sourcecontrol, ttung, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

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

Tasks: 10749152

Signature: t1:3153698:1460071369:bca8f52c2cf730513385afbdd809747386a57027
2016-04-07 16:23:49 -07:00
Durham Goode
d4c8e07f8d tests: update mergedriver test with output from upstream 2016-02-17 15:22:56 -08:00
Siddharth Agarwal
cde6b3242f mergedriver: make it clear that artifacts must be regenerated 2016-02-10 00:18:51 -08:00
Siddharth Agarwal
18d788d4c8 mergedriver: remove misleading text from --skip option 2016-02-10 00:14:52 -08:00
Siddharth Agarwal
5d54be8311 mergedriver: unmark driver-resolved files when skipping merge driver
Otherwise with `hg resolve --all --skip && hg resolve --mark --all`, people
could get into an unending, confusing loop.
2016-02-10 00:13:35 -08:00
Siddharth Agarwal
6f961dfc3f test-mergedriver.t: remove XXX that is no longer valid 2016-02-10 00:01:29 -08:00
Mateusz Kwapich
b860a46a63 mergedriver: fix tests
Test Plan: tests are passing now.

Reviewers: #sourcecontrol, ttung, sid0

Reviewed By: sid0

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

Signature: t1:2913880:1454971308:36b95c8b1a952940bd70e147eef0943e1f1a30c5
2016-02-08 14:44:15 -08:00
Durham Goode
e8fde2c226 mergedriver: update tests with simple output change 2016-01-20 13:40:15 -08: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
5ebc03718c cleanup: fix quoting patterns in tests
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/D2811856
2016-01-07 18:30:24 -08:00
Siddharth Agarwal
a31e5c1096 test-mergedriver.t: update --clean in between failing merges
Mercurial changeset e96bb53bb99a changed things so that if there were
unresolved conflicts you could no longer do another merge.
2016-01-03 22:26:32 -08:00
Siddharth Agarwal
ebe6a3b2a1 mergedriver: add an option to resolve to skip merge driver
Sometimes the merge driver might be malfunctioning -- it is important to have a
way to skip it so that this can be resolved later.
2015-12-02 22:58:57 -08:00
Siddharth Agarwal
f07f8b307a mergedriver: don't abort on changed merge driver
We want to retain the flexibility of being able to disable the merge driver if
stuff breaks disastrously.
2015-12-02 16:09:14 -08:00
Siddharth Agarwal
3156dfe5a3 mergedriver: ignore failures where the file wasn't found 2015-12-02 14:20:51 -08:00
Siddharth Agarwal
f82ca9d07a test-mergedriver.t: update output 2015-12-02 13:20:30 -08:00
Siddharth Agarwal
05ebe5655d test-mergedriver.t: update output
This is temporarily broken -- it will be fixed with upcoming mergedriver
changes.
2015-11-17 16:53:47 -08:00
Siddharth Agarwal
e49d9a23dc initial mergedriver implementation 2015-10-15 00:37:45 -07:00