# HG changeset patch # User Joerg Sonnenberger # Date 2018-03-09 15:09:27 # Node ID 98cbfbbe33bbe27eeaee6be13dff5c50e9f702a3 # Parent 9ab7eba99fe52ae2cbb3e9cb9c18156bf952deee phabricator: print deprecation warning only once Differential Revision: https://phab.mercurial-scm.org/D2754 diff --git a/contrib/phabricator.py b/contrib/phabricator.py --- a/contrib/phabricator.py +++ b/contrib/phabricator.py @@ -99,13 +99,17 @@ def urlencodenested(params): 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: + 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