Submitter | phabricator |
---|---|
Date | March 6, 2018, 7 p.m. |
Message ID | <differential-rev-PHID-DREV-rrtofzv7tm4bb5h6pk65-req@phab.mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/29075/ |
State | Superseded |
Headers | show |
Comments
mharbison72 added inline comments. INLINE COMMENTS > phabricator.py:107 > + """ > + token = ui.config('phabricator', 'token') > + if token: This wants a `repo.ui` REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2703 To: durin42, #hg-reviewers, indygreg Cc: mharbison72, mercurial-devel
durin42 marked an inline comment as done. durin42 added inline comments. INLINE COMMENTS > mharbison72 wrote in phabricator.py:107 > This wants a `repo.ui` Ouch. Amended the change for that, thanks. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2703 To: durin42, #hg-reviewers, indygreg Cc: mharbison72, mercurial-devel
Patch
diff --git a/contrib/phabricator.py b/contrib/phabricator.py --- a/contrib/phabricator.py +++ b/contrib/phabricator.py @@ -99,6 +99,17 @@ process('', params) return util.urlreq.urlencode(flatparams) +def readlegacytoken(repo): + """Transitional support for old phabricator tokens. + + Remove before the 4.6 release. + """ + token = ui.config('phabricator', 'token') + if token: + 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 @@ -128,8 +139,10 @@ break if not token: - raise error.Abort(_('Can\'t find conduit token associated to %s') - % (url,)) + token = readlegacytoken(repo) + if not token: + raise error.Abort(_('Can\'t find conduit token associated to %s') + % (url,)) return url, token