Commit Graph

5 Commits

Author SHA1 Message Date
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
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
Durham Goode
27729358a1 Fix pushvars with remotenames
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
2015-07-17 15:47:30 -07:00
Durham Goode
2d195fccb5 pushvars: fix integration with remotenames
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
2015-07-06 17:01:25 -07:00
Aaron Kushner
215c96605c Add extension to push shell variables to server side hg
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
2015-04-14 16:43:51 -04:00