comparison mercurial/ui.py @ 38575:152f4822d210

pycompat: move rapply() from util I want to use rapply() in utils.* modules, but that would introduce a reference cycle util -> utils.* -> util. Moving rapply() to pycompat should be okay since it mostly serves as a compatibility helper.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 10 Jun 2018 17:07:29 +0900
parents 313a940d49a3
children 92c845c097aa
comparison
equal deleted inserted replaced
38574:f442c9494ec7 38575:152f4822d210
154 # churn = 154 # churn =
155 """, 155 """,
156 } 156 }
157 157
158 def _maybestrurl(maybebytes): 158 def _maybestrurl(maybebytes):
159 return util.rapply(pycompat.strurl, maybebytes) 159 return pycompat.rapply(pycompat.strurl, maybebytes)
160 160
161 def _maybebytesurl(maybestr): 161 def _maybebytesurl(maybestr):
162 return util.rapply(pycompat.bytesurl, maybestr) 162 return pycompat.rapply(pycompat.bytesurl, maybestr)
163 163
164 class httppasswordmgrdbproxy(object): 164 class httppasswordmgrdbproxy(object):
165 """Delays loading urllib2 until it's needed.""" 165 """Delays loading urllib2 until it's needed."""
166 def __init__(self): 166 def __init__(self):
167 self._mgr = None 167 self._mgr = None