This is an archive of the discontinued Mercurial Phabricator instance.

pushvars: cleanup the extension to just set the server config option
ClosedPublic

Authored by pulkit on Aug 12 2017, 4:52 PM.
Tags
None
Subscribers

Details

Summary

The --pushvars option to push is moved to core with an extra config named
push.pushvars.server which defualts to False. This config controls whether the
server to unbundle the variables send by pushvars.

To make sure nothing breaks for those with pushvars extension enabled,
this should be added to the configuration file:

[push]
pushvars.server = True

Diff Detail

Repository
rFBHGX Facebook Mercurial Extensions
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pulkit created this revision.Aug 12 2017, 4:52 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptAug 12 2017, 4:52 PM
ryanmce accepted this revision.Aug 14 2017, 4:26 AM
This revision is now accepted and ready to land.Aug 14 2017, 4:26 AM
quark requested changes to this revision.Aug 16 2017, 5:35 PM
quark added a subscriber: quark.
quark added inline comments.
tests/test-pushvars-remotenames.t
15 ↗(On Diff #827)

This line shouldn't be removed. Otherwise remotenames extension will not be loaded and the test will fail.

This revision now requires changes to proceed.Aug 16 2017, 5:35 PM
quark added a comment.EditedAug 16 2017, 5:35 PM

I think we might want to keep the extension for compatibility. It could be simplified to just set the config item:

def uisetup(ui):
    ui.setconfig('push', 'pushvars.server', True)

Also, it seems remotenames does not work with --pushvars. I think we need to change remotenames after D423 to make sure it works.

I'm in I'm just going to make the change that @quark suggests.

ryanmce edited reviewers, added: pulkit; removed: ryanmce.Aug 17 2017, 10:30 AM
ryanmce commandeered this revision.
ryanmce edited edge metadata.Aug 17 2017, 10:32 AM
ryanmce updated this revision to Diff 1028.

Per suggestions from @quark

ryanmce marked an inline comment as done.Aug 17 2017, 10:32 AM
ryanmce planned changes to this revision.Aug 17 2017, 1:59 PM

This doesn't seem to work.

hgext3rd/pushvars.py
16

Doesn't seem to work.

I'm just going to go back to nuking this extension. Sorry for the hash.

pulkit edited edge metadata.Aug 19 2017, 7:21 PM

Sorry for the late reply. @ryanmce did it worked? Otherwise I will try.

quark added a comment.Aug 20 2017, 4:37 PM

I'm just going to go back to nuking this extension. Sorry for the hash.

Do you mean removing the remotenames test too? I think that's risky.

It's expected that the remotenames test won't pass no matter how the extension code is changed. D423 and D424 need to be applied. Or we can find another way to patch remotenames.

hgext3rd/pushvars.py
16

Do you mean it does not work even with renamenames disabled?

Do you mean removing the remotenames test too? I think that's risky.

I agree it's too risky, and no I wouldn't do that. I mean that we can delete the extension instead of replacing it with a "enable a config only" version. As far I I could tell, the config approach didn't work.

It's expected that the remotenames test won't pass no matter how the extension code is changed. D423 and D424 need to be applied. Or we can find another way to patch remotenames.

I agree, this is what is currently blocking our build. I'll follow up with an internal group post about the status.

hgext3rd/pushvars.py
16

Yeah, I couldn't get the test-pushvars.t test to work when I changed the extension to have only this line. Maybe I did something stupid?

@pulkit: go ahead and take another shot at it if you'd like. You'll probably want to coordinate with @kulshrax who's running our release this week. I think for now we will need to keep at least tests/test-pushvars-remotenames.t to ensure that remotenames continues to work with pushvars. Or now that I think about it, this test should probably live in the remotenames repo now since the functionality is in core.

With https://phab.mercurial-scm.org/D473, test-pushvars.t passes. :)

hgext3rd/pushvars.py
16

I debugged and found two different ui objects going around. So instead I did def reposetup(..) repo.ui.setconfig(...) and it worked. https://phab.mercurial-scm.org/D473

pulkit edited reviewers, added: ryanmce; removed: pulkit.Aug 22 2017, 1:39 PM
pulkit commandeered this revision.
pulkit retitled this revision from pushvars: remove the extension from hgext3rd as it is moved to core to pushvars: cleanup the extension to just set the server config option.Aug 22 2017, 1:56 PM
pulkit updated this revision to Diff 1160.

@kulshrax please let me know if you are taking in this in the current release and it does not work.

This revision was automatically updated to reflect the committed changes.

I have pushed the change. Thanks!

I noticed that the remotenames fix was not enough and updated D424.