Show More
@@ -147,6 +147,15 b' class ui(object):' | |||||
147 |
|
147 | |||
148 | self.httppasswordmgrdb = urlreq.httppasswordmgrwithdefaultrealm() |
|
148 | self.httppasswordmgrdb = urlreq.httppasswordmgrwithdefaultrealm() | |
149 |
|
149 | |||
|
150 | allowed = self.configlist('experimental', 'exportableenviron') | |||
|
151 | if '*' in allowed: | |||
|
152 | self._exportableenviron = self.environ | |||
|
153 | else: | |||
|
154 | self._exportableenviron = {} | |||
|
155 | for k in allowed: | |||
|
156 | if k in self.environ: | |||
|
157 | self._exportableenviron[k] = self.environ[k] | |||
|
158 | ||||
150 | @classmethod |
|
159 | @classmethod | |
151 | def load(cls): |
|
160 | def load(cls): | |
152 | """Create a ui and load global and user configs""" |
|
161 | """Create a ui and load global and user configs""" | |
@@ -1211,6 +1220,12 b' class ui(object):' | |||||
1211 | " update your code.)") % version |
|
1220 | " update your code.)") % version | |
1212 | self.develwarn(msg, stacklevel=2, config='deprec-warn') |
|
1221 | self.develwarn(msg, stacklevel=2, config='deprec-warn') | |
1213 |
|
1222 | |||
|
1223 | def exportableenviron(self): | |||
|
1224 | """The environment variables that are safe to export, e.g. through | |||
|
1225 | hgweb. | |||
|
1226 | """ | |||
|
1227 | return self._exportableenviron | |||
|
1228 | ||||
1214 | @contextlib.contextmanager |
|
1229 | @contextlib.contextmanager | |
1215 | def configoverride(self, overrides, source=""): |
|
1230 | def configoverride(self, overrides, source=""): | |
1216 | """Context manager for temporary config overrides |
|
1231 | """Context manager for temporary config overrides |
General Comments 0
You need to be logged in to leave comments.
Login now