Mercurial > hg
diff contrib/phabricator.py @ 37976:20a4543e9a2b
phabricator: drop support for the deprecated `phabricator.token` config
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 10 May 2018 22:13:13 -0400 |
parents | 6cf5f5b4eb57 |
children | 0fa050bc68cb |
line wrap: on
line diff
--- a/contrib/phabricator.py Thu May 03 18:22:02 2018 +0900 +++ b/contrib/phabricator.py Thu May 10 22:13:13 2018 -0400 @@ -21,10 +21,6 @@ # Phabricator URL url = https://phab.example.com/ - # API token. Get it from https://$HOST/conduit/login/ - # Deprecated: see [phabricator.auth] below - #token = cli-xxxxxxxxxxxxxxxxxxxxxxxxxxxx - # Repo callsign. If a repo has a URL https://$HOST/diffusion/FOO, then its # callsign is "FOO". callsign = FOO @@ -104,21 +100,6 @@ process('', params) return util.urlreq.urlencode(flatparams) -printed_token_warning = False - -def readlegacytoken(repo): - """Transitional support for old phabricator tokens. - - Remove before the 4.6 release. - """ - global printed_token_warning - token = repo.ui.config('phabricator', 'token') - if token and not printed_token_warning: - printed_token_warning = True - repo.ui.warn(_('phabricator.token is deprecated - please ' - 'migrate to the phabricator.auth section.\n')) - return token - def readurltoken(repo): """return conduit url, token and make sure they exist @@ -148,10 +129,8 @@ break if not token: - token = readlegacytoken(repo) - if not token: - raise error.Abort(_('Can\'t find conduit token associated to %s') - % (url,)) + raise error.Abort(_('Can\'t find conduit token associated to %s') + % (url,)) return url, token