Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9.3, 2.0, and 2.0.1

stable sync: warn and recover from redundant authentication configuration

Changeset edce54f839b5

Parent 6664735dc4fe

by Steve Borho

Changes to one file · Browse files at edce54f839b5 Showing diff from parent 6664735dc4fe Diff from another changeset...

 
536
537
538
539
540
 
 
541
542
543
544
545
546
 
547
548
549
 
 
 
 
 
 
 
 
 
 
 
 
 
 
550
551
552
553
 
554
555
 
556
557
558
 
1001
1002
1003
1004
 
 
1005
1006
1007
 
536
537
538
 
 
539
540
541
542
543
544
545
 
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
 
567
568
 
569
570
571
572
 
1015
1016
1017
 
1018
1019
1020
1021
1022
@@ -536,23 +536,37 @@
  if self.opts.get('noproxy'):   cmdline += ['--config', 'http_proxy.host=']   - url = self.currentUrl(False) - if not url: + cururl = self.currentUrl(False) + if not cururl:   qtlib.InfoMsgBox(_('No URL selected'),   _('An URL must be selected for this operation.'),   parent=self)   return   - user, host, port, folder, passwd, scheme = parseurl(url) + user, host, port, folder, passwd, scheme = parseurl(cururl)   if scheme == 'https':   if self.repo.ui.configbool('insecurehosts', host):   cmdline.append('--insecure') + if user: + cleanurl = url.removeauth(cururl) + res = url.readauthforuri(self.repo.ui, cleanurl) + if res: + group, auth = res + if auth.get('username'): + if qtlib.QuestionMsgBox( + _('Redundant authentication info'), + _('You have authentication info configured for ' + 'this host and inside this URL. Remove ' + 'authentication info from this URL?'), + parent=self): + self.setUrl(cleanurl) + self.saveclicked()     safeurl = self.currentUrl(True)   display = ' '.join(cmdline + [safeurl]).replace('\n', '^M') - cmdline.append(url) + cmdline.append(cururl)   self.repo.incrementBusyCount() - self.cmd.run(cmdline, display=display, useproc='p4://' in url) + self.cmd.run(cmdline, display=display, useproc='p4://' in cururl)     ##   ## Workbench toolbar buttons @@ -1001,7 +1015,8 @@
  ~Qt.WindowContextHelpButtonHint)     # if the already user has an [auth] configuration for this URL, use it - res = url.readauthforuri(repo.ui, origurl) + cleanurl = url.removeauth(origurl) + res = url.readauthforuri(repo.ui, cleanurl)   if res:   self.alias, auth = res   else: