Commit Graph

593 Commits

Author SHA1 Message Date
Laurent Charignon
81f7238774 cleanup: remove crecord from fb-hgext
Summary:
Now that crecord is in core we no longer need it here.
This diff is part of a series to cleanup fb-hgext and make it pass check-code.

Test Plan: All tests pass

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.fb.com/D2811836
2016-01-07 18:30:24 -08:00
Michael Lee
5ed662ae76 [dirsync] Remove dirsync mirroring message
Summary:
^^^

https://fb.facebook.com/groups/sourcecontrol/permalink/932848996764721/

Test Plan:
    ../../hg-crew/tests/run-tests.py test-dirsync.t

Reviewers: lcharignon, durham

Reviewed By: durham

Subscribers: seanc, knekritz

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

Tasks: 9584342

Signature: t1:2802500:1452026176:4813992ae1f42836d30921a4a1e79e86a01ce52b
2016-01-05 16:52:13 -05:00
Laurent Charignon
255bb09a46 fbamend: fix test with new hashes computation from core
Summary:
Something in core changed the way we compute the hashes and it was
changing the output of this test. We change one hash to another and the test
seems to run well like before

Test Plan: Test pass

Reviewers: ericsumner

Differential Revision: https://phabricator.fb.com/D2804307
2016-01-05 12:49:15 -08:00
Siddharth Agarwal
405d6bc6cd sparse: add backup flag to get actions
Summary:
This flag is used by an in-progress series.

This has no compatibility implications because all the users of it in Mercurial's current `@` do `args[0]` rather than something like `fl, = args`.

Test Plan: Ran `test-sparse.t` with and without my series.

Reviewers: #sourcecontrol, durham, ttung, ericsumner

Reviewed By: ericsumner

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

Tasks: 9583477

Signature: t1:2803566:1452021310:a24edd460b8a33dff34ea05f03e334950ca87c03
2016-01-05 12:18:44 -08:00
Mateusz Kwapich
90e7845035 fbhistedit: make changes to pass tests with recent histedit changes
Summary:
 - use decorator to add action
 - add torule, tostate and verify methods
 - use actions objects instead of pairs in rebase -i code

Test Plan: the fbhistedit tests are passing

Reviewers: #sourcecontrol, ttung, ericsumner

Reviewed By: ericsumner

Subscribers: ericsumner

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

Tasks: 9539722

Signature: t1:2800161:1451939637:c46875133eed576eb418723b44321b1b52ed3e77
2016-01-04 12:39:25 -08:00
Mateusz Kwapich
0c4250cc6d fbhistedit: Fix tests
Summary: Due to recent upstream changes the output of histedit is a bit less verbose

Test Plan: ran tests - less failures

Reviewers: #sourcecontrol, ttung, ericsumner

Reviewed By: ericsumner

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

Tasks: 9539722

Signature: t1:2800039:1451935970:7fa0b21f1639e167891430c89d5aa8b32a15ec49
2016-01-04 11:33:21 -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
Laurent Charignon
baf5e9ba04 manifestdiskcache: make the test more portable
Summary:
Before this patch, the test was giving different output on mac os and
on centos.
This patch makes the test output more portable and legible by adding two
helpers functions, one to check if a file is present and one to check if a file is absent.

Test Plan: test pass

Reviewers: ericsumner, ttung

Differential Revision: https://phabricator.fb.com/D2796056
2015-12-30 13:34:29 -08:00
Laurent Charignon
327bb91e86 copytrace: reorder test output
Summary:
The test output got reordered, I tried to figure out why but I didn't
find the root cause. It does not look like an issue, so let's just patch the
changes.

Test Plan: test pass

Reviewers: ericsumner

Differential Revision: https://phabricator.fb.com/D2794131
2015-12-30 12:38:26 -08:00
Laurent Charignon
3c3a557d92 fbamend: use fbhistedit from the same repo
Summary:
Before this patch we were testing against the fbhistedit installed on the
system. This patch makes us use the module under test from the fb-hgext repo.

Test Plan: test is using the right implementation

Reviewers: ericsumner

Differential Revision: https://phabricator.fb.com/D2795908
2015-12-30 11:40:27 -08:00
Laurent Charignon
c4fc4bdfab rename test-bundle2.t to test-copytrace-bundle2.t
Summary: Simple rename to make it clear what this is testing

Test Plan: Simple rename, no test change

Reviewers: ericsumner

Differential Revision: https://phabricator.fb.com/D2793594
2015-12-29 15:19:07 -08:00
Laurent Charignon
f359b04e95 test-writecg2.t update output matching changes in core
Summary:
Bundle format seems to have changed in core, test-writecg2's output
consequently changed. We have been hotfixing this test for the past two
releases, this patch fixes it in trunk.

Test Plan: Test is passing

Reviewers: ericsumner

Differential Revision: https://phabricator.fb.com/D2793776
2015-12-29 15:17:54 -08:00
Laurent Charignon
26a8911e9e githelp: fix compat with core
Summary:
7dbd3db608c5 in core removed the cast to string in ui.write, we now
have to do it in the extension code.

Test Plan: The test pass

Reviewers: ericsumner

Differential Revision: https://phabricator.fb.com/D2793797
2015-12-29 15:17:34 -08:00
Laurent Charignon
06f70f05dc reset: hold lock when calling repair.strip
Summary:
Before this patch we were not holding a lock when calling repair.strip that
required it. This patch adds locking around the call to repair.strip.
With this change the tests of reset is not failing anymore.

Test Plan: Test is passing now

Reviewers: ericsumner

Differential Revision: https://phabricator.fb.com/D2793359
2015-12-29 15:17:19 -08:00
Laurent Charignon
2ae906b4f2 cleanup: make smartlog pass check-code
Summary: This will make it easier to move it into core

Test Plan: tests still pass

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2784459
2015-12-29 11:36:15 -08:00
Laurent Charignon
acdb02fdb7 cleanup: make upgradegeneraldelta pass check-code
Summary: This makes it easier to move it into core if we want to

Test Plan: All tests that passed before still pass

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2788053
2015-12-29 11:35:38 -08:00
Laurent Charignon
f0b274f4e9 cleanup: make automv pass check-code
Summary: This will make it easier to move it into core

Test Plan: All the tests that passed before are still passing

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2788061
2015-12-29 11:35:14 -08:00
Laurent Charignon
bc3dcc3726 cleanup: make backups pass check-code
Summary: This will make it easier to move the functionality into core

Test Plan: No test before, seems simple enough

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.fb.com/D2784422
2015-12-29 11:34:30 -08:00
Laurent Charignon
e8aa27731b backups: fix compatibility issues with core
Summary:
hg backups has been broken since mid october (see 2b16ffcd3 in core)
This patch fixes it and adds a test for it.

Test Plan: Adds a new test

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2788217
2015-12-29 11:34:30 -08:00
Laurent Charignon
a5b8b12669 tweakdefaults: update test with latest core
A warning was there because core was using a deprecated API for writing
bookmarks. Now that the issue is fixed in core, this test has to be updated to
remove the warning.
2015-12-29 11:30:13 -08:00
Laurent Charignon
c30575891a sparse: fix compat with upstream
Summary: Upstream changed _calculateupdates, this patch fixes our wrapping

Test Plan: tests pass

Reviewers: ericsumner

Differential Revision: https://phabricator.fb.com/D2791576
2015-12-28 17:01:01 -08:00
Laurent Charignon
a024de142b reset: take lock when creating markers
Summary: obsolete.createmarkers expects a lock to be taken

Test Plan:
The devel-warning message disappears from the test output, test is
clean with new changes submitted to core

Reviewers: ericsumner

Differential Revision: https://phabricator.fb.com/D2791694
2015-12-28 14:23:29 -08:00
Laurent Charignon
d8d13bcb10 cleanup: make chistedit pass check-code
Summary: This will allow us to move it into core

Test Plan: it still works

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2784362
2015-12-23 14:43:05 -08:00
Laurent Charignon
e4f1184ac8 cleanup: make pushvars pass check-code
Summary: This will allow us to move it into core under contrib more easily.

Test Plan: N/A

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2784334
2015-12-23 14:43:05 -08:00
Laurent Charignon
51a8884b12 cleanup: make reflog pass check-code
Summary: This will make it easier to move it into core

Test Plan: Tests are still passing

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2784492
2015-12-23 14:42:31 -08:00
Laurent Charignon
b4ae29f1d8 reflog: remove mutable default argument pattern
Summary:
Before this patch we were using {} as a default argument.
{} is mutable and would have leads to confusion if the function was to
be called multiple times.

Test Plan: Tests are passing

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2784485
2015-12-23 14:42:31 -08:00
Laurent Charignon
1584b3e9fb tests: fix test-pull-createmarkers.t dummyssh path 2015-12-23 10:41:51 -08:00
Laurent Charignon
2af271bf20 cleanup: remove dbg extension
Summary: It exists in core as contrib/debugshell.py

Test Plan: N/A

Reviewers: pyd, durham, rmcelroy, cdelahousse

Differential Revision: https://phabricator.fb.com/D2784306
2015-12-22 20:16:30 -08:00
Bryan O'Sullivan
6b105b7324 smartlog: remove expensive use of list.index
Summary:
This is only an issue for large numbers of revs, but it has a big
impact.

Performance of "hg sl -r 0::tip" in the main Mercurial repo improves
from 19 seconds to 15 as a result of this change.

Test Plan: works on my machine

Reviewers: #sourcecontrol, ttung, cdelahousse

Reviewed By: cdelahousse

Subscribers: cdelahousse

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

Signature: t1:2785882:1450832482:9248787390fff398ae44a285d0f879b970a5fc55
2015-12-22 18:39:39 -08:00
Pierre-Yves David
3cafa7d1f2 test: backout e221a52 (remove run-tests.py once again)
Shipping your own `run-tests.py` is a bad practice as the custom version will
slowly diverge from important fixes and upgrade from the upstream one. Using the
core one is simple and we should use it.

I'm not convinced by the arguments used in the re-installation (e221a52),

- It is easy to run the test against any version of Mercurial including the
  installed one using `--with-hg=`,

- If you have people contributing to this level of extensions, having them
  clone Mercurial is fairly cheap. If this is really seen a blocker, completing
  the Mercurial's upstream plan to have run-tests.py installable as a developer
  tools seems a cheap way to move forward instead,

- If you own a complex installation with multiple Mercurial related dependencies,
  you already have a way to handle version dependency in this context and your
  contributor can use this very same infrastructure to make sure they run at the
  right version. And they probably should use it already anyway to make sure
  they are testing the stack properly.

This changesets also install a README explaining how to obtains the test runner
and runs it against various Mercurial version.
2015-12-16 16:42:17 +00:00
Tony Tung
4f762f6d07 [manifestdiskcache] unbreak test by enabling manifest disk cache
Summary: D2745769 added a enabled=True flag, which needs to be in the test.

Test Plan: passed unit test.

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: mitrandir

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

Signature: t1:2773075:1450463047:9a29f677bf5bec7b9b1789ec2791ead5ebfd8a7a

Blame Revision: D2745769
2015-12-18 23:12:12 -08:00
Laurent Charignon
ae933b4f58 morestatus: fix deprecation warning
Summary: repo.parents() is deprecated, we should use repo[None].parents()

Test Plan: Test is still passing

Reviewers: cdelahousse, durham

Differential Revision: https://phabricator.fb.com/D2770918
2015-12-18 18:05:35 -08:00
Laurent Charignon
0ad0da0c93 fbamend: add test with inhibit 2015-12-18 14:22:10 -08:00
Laurent Charignon
0001b13276 fbamend: fix transaction issue with inhibit
Summary:
Before this patch, fbamend with inhibit was leaving commits behind
when using --fixup. This was because we had two separates transaction, one for
the bookmarks and one for the markers. This patchs makes the marker creation
happen in the same transaction as the bookmark move.

Test Plan: check hg amend --fixup and hg amend --rebase
https://phabricator.fb.com/P56056980

Reviewers: ericsumner, durham

Differential Revision: https://phabricator.fb.com/D2771188
2015-12-18 14:22:10 -08:00
Kostia Balytskyi
7e0f40375f #9421810: disable histgrep if ran on the whole repo
Differential Revision: https://phabricator.fb.com/D2769383
2015-12-18 05:59:43 -08:00
Jun Wu
f4389dfd0d errorredirect: simplify environment variables
Summary:
Add $WARNING to make it easier to get the original behavior (print the
`***` contact support stuff). Remove misc environment variables included
in $WARNING to make the code simpler and less dependent.

Besides, store traceback in $TRACE so that it will be easier to read it
for multiple times. For example, try to upload it (first read) and if
failed, print it locally (second read). Otherwise we need ugly hack like
`A=$(cat)` in the script.

Test Plan: Check the new examples manually and run test-errorredirect.t

Reviewers: #sourcecontrol, ttung, rmcelroy

Reviewed By: rmcelroy

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

Tasks: 9259456

Signature: t1:2770557:1450384683:672e76752040d3d1b440522dd54ac43306c76bf9
2015-12-17 20:28:31 +00:00
Jun Wu
ecff889185 smartlog: be compatiable with upstream change
Summary:
Upstream commit a0f2789070ce changes the signature of `cmdutil.displaygraph`
This patch detects it and use the new signature when needed.

Test Plan: Run `hg sl` with new hg on my laptop and old hg on devserver.

Reviewers: #sourcecontrol, ttung, durham

Reviewed By: durham

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

Tasks: 9446957

Signature: t1:2769659:1450376979:83f94e9bf30dea5b3c6115295ee92fdd456263af
2015-12-17 17:56:05 +00:00
Kostia Balytskyi
bda30b50ec #9433233: made pats argument of histgrep being passed downstream
Differential Revision: https://phabricator.fb.com/D2768986
2015-12-17 07:36:58 -08:00
Durham Goode
186105860d sparse: don't stat .hg/sparse for every sparsematch call
Summary:
The old behavior would check that the cached sparse matcher was up to date by
performing a checksum on the contents of the .hg/sparse and .hg/tempsparse
files. This caused a lot of extra syscalls when sparse match was used inside a
loop.

The fix is to cache the .hg/sparse signature, and only refresh them when the
lock is acquired (similar to how most caches in Mercurial already work).

Test Plan: Ran the tests

Reviewers: #sourcecontrol, ttung, mitrandir

Reviewed By: mitrandir

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

Tasks: 9259321

Signature: t1:2758452:1450317072:6b0a962d336eda616cb27ef1b5e761d5153f64a3
2015-12-16 18:52:14 -08:00
Mateusz Kwapich
47cc0ea0b8 phabdiff: improve the {tasks} template
Summary:
There were some comments under my diff after landing. Included:

 * Old "Task ID" syntax
 * Removing the "T" prefix
 * Fixing the copypasted docstring

Test Plan: tests

Reviewers: #sourcecontrol, rmcelroy, ttung

Reviewed By: rmcelroy

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

Signature: t1:2765417:1450294877:4a50ecfdb1fb295ffaf01ecee6fe257b52e359bc
2015-12-16 15:53:53 -08:00
Thu Trang Pham
86db6ddc5c Remove --name from githelp for git stash drop
Summary:
Verified that the issue does occur.
Verified that using `hg shelve -d my_shelve_name` works for default and arbitrary shelve name.

Test Plan: Updated the tests for githelp

Reviewers: ericsumner, durham

Reviewed By: durham

Subscribers: de-engagement-diffs@

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

Tasks: 7632472

Signature: t1:2762983:1450289196:f25d757d158d110e8fc5503f974170c4a9892718
2015-12-16 10:19:40 -08:00
Durham Goode
f6354f898a pushrebase: fix pushing merge commits with date rewriting on
Summary:
When pushing a rewritten merge commit, we were trying to look up it's original
parent in the current repo (which no longer had that commit). We need to look in
the bundle repo instead.

Test Plan: Added a test. Also tried it manually on one of the hg servers

Reviewers: #sourcecontrol, ttung, mitrandir

Reviewed By: mitrandir

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

Signature: t1:2763182:1450230086:c560d4b8bbfe5d5387e23c1cc2e09109f49f255b
2015-12-16 09:47:23 -08:00
Eric Sumner
7f1d040e2c tweakdefaults: only apply default destination if rebasing or updating 2015-12-15 14:52:27 -08:00
Pierre-Yves David
584ef5f66e remove devel-warning from expected test-output
Summary:
Devel warnings are pointing at issues in the code that need to be fixed. The
right way to get the tests to pass is to fix the warning cause, not to the
warning to the tests.

This practically backout an handful of test that added such warning output in
the test.

Test Plan:
  Well, test are now broken to match the state of the borken code.

Reviewers: lcharignon

Differential Revision: https://phabricator.fb.com/D2760523
2015-12-15 11:08:20 -08:00
Mateusz Kwapich
74ec221aab extorder: Fix test 2015-12-15 09:23:53 -08:00
Mateusz Kwapich
c0481c096d pushrebase: improve tests to include prepushkey hook
Test Plan: whoteststhetests

Reviewers: #sourcecontrol, rmcelroy, ttung

Reviewed By: rmcelroy

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

Signature: t1:2751233:1449882198:4695c63c5172fc8f20e123b3da055b41b59c07e2
2015-12-14 15:38:11 -08:00
Laurent Charignon
7cc5fb3206 reset: use bookmarks.recordchange instead of bookmarks.write
Summary: bookmarks.write is deprecated

Test Plan: The test still passes

Reviewers: ericsumner, pyd, durham

Reviewed By: durham

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

Signature: t1:2747007:1449794510:09af0635c722a7aaf3b8aa444a116deaebada9b2
2015-12-14 11:31:53 -08:00
Laurent Charignon
695e2fdfcd fbamend: use bookmarks.recordchange instead of bookmarks.write
Summary: bookmarks.write is deprecated

Test Plan: the test is still passing

Reviewers: ericsumner, pyd, durham

Reviewed By: durham

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

Signature: t1:2747002:1449794465:a6ded4ed8f5249812c97cea13d9d6ce809109bd2
2015-12-14 11:30:33 -08:00
Mateusz Kwapich
77c008fae4 phabdiff: add {tasks} template
Summary: .

Test Plan: see tests

Reviewers: #sourcecontrol, rmcelroy, ttung

Reviewed By: rmcelroy

Subscribers: cdelahousse, mbasmanova

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

Tasks: 9408540

Signature: t1:2755231:1450115291:b0cbdbf7a3b02e614e4268ecc1b2ee837917aabd
2015-12-14 11:20:43 -08:00
Mateusz Kwapich
97c188373c extdeps extension
Summary: Our extensions dependecies are getting tricky. Let's make it right. (the logic still need to be tested - it worked on one very simple example so far).

Test Plan: no tests yet

Reviewers: pyd, lcharignon, rmcelroy

Reviewed By: rmcelroy

Subscribers: lcharignon, #sourcecontrol

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

Signature: t1:2710943:1449881799:16abe49529aa79df7d6ebe84a0bae0c0970b419a
2015-12-11 17:57:58 -08:00