Commit Graph

10 Commits

Author SHA1 Message Date
Jun Wu
090d0eb5b7 tests: update tests output
Upstream 4a405ffd8b20 ("transaction-summary: show the range of new revisions
upon pull/unbundle (BC)", 2017-10-12) has changed the output.
2017-10-17 13:05:18 -07:00
Stanislau Hlebik
3ea83ba4bc infinitepush: handle remotenames hoisting correctly
Summary:
There was a report from an infinitepush user who complained about
`hg update remote/scratch/book` failing to pull the bookmark, while
`hg update scratch/book` pulling fine. It confuses users because they see
`remote/scratch/book` in smartlog.

On the other hand let's not allow `hg pull -B remote/scratch/book` to stay
consistent with remotenames.

Test Plan: Slowly run tests

Reviewers: #fbhgext, ryanmce

Reviewed By: #fbhgext, ryanmce

Subscribers: ryanmce

Differential Revision: https://phab.mercurial-scm.org/D172
2017-07-21 08:19:59 -07:00
Durham Goode
3102e456ab infinitepush: backout lfs fix
Summary: This broke hg bundle on non-generaldelta repositories.

Test Plan: Ran the tests

Reviewers: #fbhgext, stash, quark

Reviewed By: #fbhgext, quark

Differential Revision: https://phab.mercurial-scm.org/D74
2017-07-13 13:53:40 -07:00
stash@fb.com
35d988093a infinitepush: handle lfs correctly
Summary:
Make sure that infinitepush work fine with lfs. To achieve it we try to use
changegroup3 if it's available and also run prepush hook before infinitepush.

Test Plan: Run `arc unit`

Reviewers: #fbhgext, quark, dsp

Reviewed By: #fbhgext, dsp

Differential Revision: https://phab.mercurial-scm.org/D17
2017-07-12 09:52:03 -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
Jun Wu
5d5fedd10c tweakdefaults: fix check config test
Summary:
This fixes test-check-config-hg.t for tweakdefaults. And did some clean-up
for other minor issues.

I was trying to implement another feature (along with the clean-up) in
tweakdefaults and finally realized it's infeasible and drop the feature. But
the clean-up seems useful thus sent here.

Also change `cp -r` to `cp -R` to pass the usptream check-code test.

Test Plan: `arc unit`

Reviewers: #sourcecontrol, mitrandir

Reviewed By: mitrandir

Subscribers: mjpieters

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

Signature: t1:4253852:1480613350:398e9b234fcc2360dcb8a3e3ad4e5bc5c4377857
2016-11-30 20:58:08 +00:00
Simon Farnsworth
7e461f256a Fix test-infinitepush-remotenames.t
Summary: Trivially broken, trivially fixed

Test Plan: Run on my devserver

Reviewers: #sourcecontrol, quark

Reviewed By: quark

Subscribers: mjpieters

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

Signature: t1:4069146:1477334534:a7973dd14d6de3698d47bbd1de46ca852b6e4683
2016-10-24 11:48:51 -07:00
Stanislau Hlebik
0ead2362af infinitepush: fix tests
Summary:
Tests were broken because there were internal API changes in
upstream mercurial:

1) `hg book` outputs nothing instead of `no bookmarks set`
2) `getbundle` function was removed, new `getbundlechunks` function was added

Test Plan: Run `test-infinitepush-*` and run integration tests

Reviewers: durham, rmcelroy, mitrandir, simonfar

Reviewed By: simonfar

Subscribers: mjpieters

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

Tasks: 14035546

Signature: t1:4067223:1477305056:f705764ff3cdd70fcc61e677ccb184870077ec86
2016-10-24 06:07:35 -07:00
Stanislau Hlebik
88085025a6 infinitepush: make scratch bookmark remote
Summary:
User should see no difference between scratch and non-scratch remote bookmarks.
So let's make scratch bookmarks remote if remotenames is enabled.
Unfortunately it requires saving scratch remote bookmarks before push/pull and
restoring it afterwards because `remotenames` extension doesn't know about
them.

Test Plan: Run `test-infinitepush-*`

Reviewers: rmcelroy, mitrandir, durham

Reviewed By: durham

Subscribers: mjpieters, #sourcecontrol

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

Tasks: 12479677

Signature: t1:4036653:1476985129:b5c1afdab4c7585c8b12c2962a4b95a56751091b
2016-10-21 06:36:14 -07:00
Stanislau Hlebik
4b61f94df6 infinitepush: create separate remotenames test
Summary:
Fix infinitepush tests for Mac. Let's split test in two.
Now if remotenames extension is unavailable most of the tests will still run.

Test Plan: Run `python run-tests.py test-infinitepush-*`

Reviewers: simonfar, durham, rmcelroy, mitrandir, quark

Reviewed By: quark

Subscribers: mjpieters, #sourcecontrol

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

Tasks: 12479677

Signature: t1:4029394:1476706777:95473f493e10d3f7f21f4679976b33d75d8821f2
2016-10-17 05:36:26 -07:00