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
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
Summary:
The old order fix was not quite right, since it modified a local copy of _order
instead of the extension modules copy.
Test Plan:
Added a test that verifies the hooks can see a pushvar even through
remotenames
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2275767
Summary:
Remotenames wraps the push command and sometimes doesn't call the original
implementation. Since pushvars relies on being called as part of push, we need
to make sure pushvars wraps push after remotenames.
It turns out pushrebase's solution to this was broken as well, so fix it up too.
Test Plan:
Pushed to fbjava_test with and without the change. Verified I could
circumvent the reviewers hook only after the change.
Reviewers: akushner, rmcelroy, pyd
Differential Revision: https://phabricator.fb.com/D2220774
Summary:
Create an extension that allows shell variables to be passed to the
server via command line option. When pushing with the following command:
hg push --pushvars "DEBUG=1"
will make HG_SCM_DEBUG=1 available to the hooks. Note the prepending of HG_SCM_
Test Plan: Run run_tests
Reviewers: pyd, rmcelroy, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D1991994
Tasks: 4841351
Signature: t1:1991994:1430417209:9a05fb11f9ecdeab3a1d89cf331014dafe7d959f