sapling/hgext3rd/pushvars.py
Pulkit Goyal 9c86deebae pushvars: cleanup the extension to just set the server config option
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

Differential Revision: https://phab.mercurial-scm.org/D365
2017-08-23 09:28:07 +05:30

18 lines
733 B
Python

# pushvars.py -- extension for setting environment variables on the server-side
# during pushes.
#
# Copyright 2017 Facebook, Inc.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
def reposetup(ui, repo):
"""
The main pushvars functionality moved into core hg. However, the behavior
of the core version differs from this extension, which originally would
set the environment variables on the server by default when the extension
was enabled. To keep that behavior, this extension now just sets the option.
This makes the transition painless.
"""
repo.ui.setconfig('push', 'pushvars.server', True)