##// END OF EJS Templates
phabricator: follow-up phab auth improvements with backwards compat mode...
Augie Fackler -
r36806:b434965f default
parent child Browse files
Show More
@@ -99,6 +99,17 b' def urlencodenested(params):'
99 process('', params)
99 process('', params)
100 return util.urlreq.urlencode(flatparams)
100 return util.urlreq.urlencode(flatparams)
101
101
102 def readlegacytoken(repo):
103 """Transitional support for old phabricator tokens.
104
105 Remove before the 4.6 release.
106 """
107 token = repo.ui.config('phabricator', 'token')
108 if token:
109 repo.ui.warn(_('phabricator.token is deprecated - please '
110 'migrate to the phabricator.auth section.\n'))
111 return token
112
102 def readurltoken(repo):
113 def readurltoken(repo):
103 """return conduit url, token and make sure they exist
114 """return conduit url, token and make sure they exist
104
115
@@ -128,8 +139,10 b' def readurltoken(repo):'
128 break
139 break
129
140
130 if not token:
141 if not token:
131 raise error.Abort(_('Can\'t find conduit token associated to %s')
142 token = readlegacytoken(repo)
132 % (url,))
143 if not token:
144 raise error.Abort(_('Can\'t find conduit token associated to %s')
145 % (url,))
133
146
134 return url, token
147 return url, token
135
148
General Comments 0
You need to be logged in to leave comments. Login now