Commit Graph

16 Commits

Author SHA1 Message Date
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
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
Wez Furlong
7972567aef phabdiff: make phabdiff more URL-agnostic
Summary: We want out phabricator diff parsers to recognize both https://phabricator.intern.facebook.com/ and https://phabricator.fb.com/ URLs (and a bigger class as well).

Test Plan:
- updated some tests (for `phabdiff` and `pullcreatemarkers` other files don't even seem to be used)
- ran tests
- tested phabdiff manually as well:
{F60696023}

Reviewers: #sourcecontrol, andersonmat, mitrandir, simpkins, lcharignon, quark, ttung, ikostia, rmcelroy

Reviewed By: ikostia, rmcelroy

Subscribers: wez, rmcelroy, net-systems-diffs@, mjpieters

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

Tasks: 11013909, 11017978

Signature: t1:3229776:1461839346:08b9b3414e43ff9966bc05591ca5662ef9691aac
2016-04-28 10:55:06 -07:00
Adam Simpkins
db56b7802d [pullcreatemarkers] also obsolete parents of commits landed in this pull
Summary:
When a pull causes commits on the tip of a branch to be obsoleted due to
landing, make sure that parent commits that were landed in previous pulls also
get hidden.  The parent commits would already have obsolete markers, but they
would have been inhibited because there were non-obsolete children.  Once their
children are landed their obsolete markers can now be deinhibited.

Test Plan: Added a new test case.

Reviewers: #sourcecontrol, durham, lcharignon, ikostia, pyd, ttung

Subscribers: net-systems-diffs@, yogeshwer, mjpieters

Differential Revision: https://phabricator.fb.com/D3028597
2016-03-21 18:08:04 -07:00
Adam Simpkins
3a980ca96a [pullcreatemarkers] fix issues creating obsolescence markers
Summary:
Use a transaction, to make sure commits get hidden properly.  Currently it
fails to hide all commits if multiple commits on the same branch are all
obsoleted in the same pull.  When creating obsolescence markers for some of the
earlier commits, it thinks they still have non-hidden successors, and doesn't
know that these successors are also going to be hidden by the same pull
operation.

Also avoid walking all draft commits if nothing new was landed in this pull.

Test Plan:
Updated the tests to exercise the case where a pull obsoletes multiple commits
all at the tip of a branch.

Reviewers: #sourcecontrol, lcharignon, ikostia, durham, ttung

Reviewed By: durham

Subscribers: durham, net-systems-diffs@, yogeshwer, mjpieters

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

Signature: t1:3013783:1457136740:cbcd0220e82d044d25a34692793e70f5be61d63e
2016-03-04 16:28:58 -08:00
Tony Tung
7061c1092f store the pushvars in the bundle2 operation object
Summary:
The pushvars extension ensures that it precedes the hooks.
Unfortunately, that means pushrebase does not have access to the hook
variables unless it obtains the transaction.  If it does that, then the
prepushrebase step will have the lock, defeating the purpose of the hook.

By storing the pushvars in the operation, we can retrieve it without
starting the transaction.

Test Plan: passes the BYPASS_REVIEW test when it is moved to prepushrebase

Reviewers: #sourcecontrol, durham, lcharignon

Reviewed By: durham

Subscribers: durham, mitrandir

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

Tasks: 9872386

Signature: t1:2890191:1454526611:503a30015494eef467ad545b92077bf42cdd30d5
2016-02-18 21:32:11 -08:00
Tony Tung
2226da3c6e [pull-createmarkers] fix test to match output
Test Plan: passed test

Reviewers: #sourcecontrol, lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir

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

Signature: t1:2913021:1454964727:a7cafa3812ef3080ebf6b811784aa4013bdfc05a
2016-02-08 15:56:50 -08:00
Tony Tung
c6681e3e6d [pushrebase] change the pushrebase tests to use the PYTHONPATH setup
Summary: Just a bit cleaner.  Also this makes it so pushrebase can source any hypothetically shared code.  Mostly because I'm too lazy to type bundle2hooks=PATH_OF_FILE.

Test Plan: same unit tests pass.

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: durham, mitrandir

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

Signature: t1:2903928:1454648999:81f6cc64f708dc4709640b2a214e1b3dbc11caa5
2016-02-04 22:47:14 -08:00
Durham Goode
245e1ddcd7 pullcreate: update test output
Upstream changed some wording.
2016-01-20 13:40:15 -08:00
Laurent Charignon
3d3817831c fix-test: fix quoting in [...] expressions
Summary:
We changed from [[ ]] to [ ] without adding the quoting and @mitrandir
pointed out that it could cause issues.

Test Plan: tests run

Reviewers: #sourcecontrol, ttung

Subscribers: mitrandir

Differential Revision: https://phabricator.fb.com/D2820161
2016-01-11 10:45:36 -08:00
Laurent Charignon
068feee7db test: make test-pullcreatemarkers use createmarkers permission
Summary: This way we actually test against the config that we ship to our users.

Test Plan: Test pass and expectedly changes a little bit.

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2819095
2016-01-11 10:27:48 -08:00
Laurent Charignon
9d1997a454 cleanup: replace [[ ... ]] by [ ... ]
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/D2812197
2016-01-07 18:30:24 -08:00
Laurent Charignon
da37a505a8 cleanup: fix whitespaces in expression and trailing whitespaces
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/D2812015
2016-01-07 18:30:24 -08:00
Laurent Charignon
1584b3e9fb tests: fix test-pull-createmarkers.t dummyssh path 2015-12-23 10:41:51 -08:00
Laurent Charignon
4502578fbf pullcreatemarkers: add a new extension to create markers on pull
Summary:
The goal of this extensions is to create obsolescence markers locally for
commits previously landed.
It uses the phabricator revision number in the commit message to detect the
relationship between a draft commit and its landed counterpart.
Thanks to these markers, less information is displayed and rebases can have
less irrelevant conflicts.

Test Plan: Added a new test

Reviewers: pyd, ericsumner, durham

Differential Revision: https://phabricator.fb.com/D2665923
2015-12-10 10:31:47 -08:00