Show More
@@ -29,6 +29,8 from . import ( | |||
|
29 | 29 | util, |
|
30 | 30 | ) |
|
31 | 31 | |
|
32 | urlreq = util.urlreq | |
|
33 | ||
|
32 | 34 | samplehgrcs = { |
|
33 | 35 | 'user': |
|
34 | 36 | """# example user config (see "hg help config" for more info) |
@@ -124,6 +126,8 class ui(object): | |||
|
124 | 126 | self.callhooks = src.callhooks |
|
125 | 127 | self.insecureconnections = src.insecureconnections |
|
126 | 128 | self.fixconfig() |
|
129 | ||
|
130 | self.httppasswordmgrdb = src.httppasswordmgrdb | |
|
127 | 131 | else: |
|
128 | 132 | self.fout = sys.stdout |
|
129 | 133 | self.ferr = sys.stderr |
@@ -135,6 +139,8 class ui(object): | |||
|
135 | 139 | for f in scmutil.rcpath(): |
|
136 | 140 | self.readconfig(f, trust=True) |
|
137 | 141 | |
|
142 | self.httppasswordmgrdb = urlreq.httppasswordmgrwithdefaultrealm() | |
|
143 | ||
|
138 | 144 | def copy(self): |
|
139 | 145 | return self.__class__(self) |
|
140 | 146 | |
@@ -142,6 +148,7 class ui(object): | |||
|
142 | 148 | """Clear internal state that shouldn't persist across commands""" |
|
143 | 149 | if self._progbar: |
|
144 | 150 | self._progbar.resetstate() # reset last-print time of progress bar |
|
151 | self.httppasswordmgrdb = urlreq.httppasswordmgrwithdefaultrealm() | |
|
145 | 152 | |
|
146 | 153 | def formatter(self, topic, opts): |
|
147 | 154 | return formatter.formatter(self, topic, opts) |
@@ -365,7 +365,7 if has_https: | |||
|
365 | 365 | urlreq.httpshandler.__init__(self) |
|
366 | 366 | self.ui = ui |
|
367 | 367 | self.pwmgr = passwordmgr(self.ui, |
|
368 |
|
|
|
368 | self.ui.httppasswordmgrdb) | |
|
369 | 369 | |
|
370 | 370 | def _start_transaction(self, h, req): |
|
371 | 371 | _generic_start_transaction(self, h, req) |
@@ -482,7 +482,7 def opener(ui, authinfo=None): | |||
|
482 | 482 | handlers = [ |
|
483 | 483 | httpconnectionmod.http2handler( |
|
484 | 484 | ui, |
|
485 |
passwordmgr(ui, u |
|
|
485 | passwordmgr(ui, ui.httppasswordmgrdb)) | |
|
486 | 486 | ] |
|
487 | 487 | else: |
|
488 | 488 | handlers = [httphandler()] |
@@ -491,7 +491,7 def opener(ui, authinfo=None): | |||
|
491 | 491 | |
|
492 | 492 | handlers.append(proxyhandler(ui)) |
|
493 | 493 | |
|
494 |
passmgr = passwordmgr(ui, u |
|
|
494 | passmgr = passwordmgr(ui, ui.httppasswordmgrdb) | |
|
495 | 495 | if authinfo is not None: |
|
496 | 496 | passmgr.add_password(*authinfo) |
|
497 | 497 | user, passwd = authinfo[2:4] |
General Comments 0
You need to be logged in to leave comments.
Login now