Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

sync: expose more [auth] details

For most users, they should be able to fill in username and
password and save. This will need help documentation.

Changeset f186ff1074b6

Parent a03484f199ac

by Steve Borho

Changes to one file · Browse files at f186ff1074b6 Showing diff from parent a03484f199ac Diff from another changeset...

 
87
88
89
90
 
91
92
93
 
272
273
274
 
 
275
276
277
 
282
283
284
285
 
286
287
288
 
319
320
321
322
323
324
 
325
326
327
328
329
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
330
331
332
333
334
 
335
336
337
338
339
340
 
341
342
343
 
353
354
355
356
 
357
358
359
 
377
378
379
 
 
380
381
382
 
385
386
387
388
 
389
390
 
391
392
393
 
87
88
89
 
90
91
92
93
 
272
273
274
275
276
277
278
279
 
284
285
286
 
287
288
289
290
 
321
322
323
 
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
 
372
373
374
 
375
376
377
378
 
396
397
398
399
400
401
402
403
 
406
407
408
 
409
410
 
411
412
413
414
@@ -87,7 +87,7 @@
  self.pathentry = QLineEdit()   self.pathentry.textChanged.connect(self.refreshUrl)   hbox.addWidget(self.pathentry, 1) - self.authbutton = QPushButton(_('Site Authentication')) + self.authbutton = QPushButton(_('Authentication'))   hbox.addWidget(self.authbutton)   layout.addLayout(hbox)   @@ -272,6 +272,8 @@
  hbox = QHBoxLayout()   hbox.addWidget(QLabel(_('URL')))   self.urlentry = QLineEdit(url) + fontm = QFontMetrics(self.font()) + self.urlentry.setFixedWidth(fontm.width(url)+5)   hbox.addWidget(self.urlentry, 1)   layout.addLayout(hbox)   BB = QDialogButtonBox @@ -282,7 +284,7 @@
  self.bb = bb   layout.addWidget(bb)   self.aliasentry.selectAll() - self.setWindowTitle(_('Save URL: ') + url) + self.setWindowTitle(_('Save Peer Path'))   QTimer.singleShot(0, lambda:self.aliasentry.setFocus())     def accept(self): @@ -319,25 +321,42 @@
  def __init__(self, root, host, user, pw, parent):   super(AuthDialog, self).__init__(parent)   self.root = root - self.host = host   layout = QVBoxLayout()   self.setLayout(layout) +   hbox = QHBoxLayout()   hbox.addWidget(QLabel(_('Site Alias')))   self.aliasentry = QLineEdit(host.split('.', 1)[0])   hbox.addWidget(self.aliasentry, 1)   layout.addLayout(hbox) + + hbox = QHBoxLayout() + hbox.addWidget(QLabel(_('Schemes'))) + self.schemes = QComboBox() + for s in (('http https', 'http', 'https')): + self.schemes.addItem(s) + hbox.addWidget(self.schemes, 1) + layout.addLayout(hbox) + + hbox = QHBoxLayout() + hbox.addWidget(QLabel(_('Prefix'))) + self.prefixentry = QLineEdit(host) + hbox.addWidget(self.prefixentry, 1) + layout.addLayout(hbox) +   hbox = QHBoxLayout()   hbox.addWidget(QLabel(_('Username')))   self.userentry = QLineEdit(user)   hbox.addWidget(self.userentry, 1)   layout.addLayout(hbox) +   hbox = QHBoxLayout()   hbox.addWidget(QLabel(_('Password')))   self.pwentry = QLineEdit(pw)   self.pwentry.setEchoMode(QLineEdit.Password)   hbox.addWidget(self.pwentry, 1)   layout.addLayout(hbox) +   BB = QDialogButtonBox   bb = QDialogButtonBox(BB.Help|BB.Cancel)   bb.rejected.connect(self.reject) @@ -353,7 +372,7 @@
    self.bb = bb   layout.addWidget(bb) - self.setWindowTitle(_('Site Authentication: ') + host) + self.setWindowTitle(_('Authentication: ') + host)   self.userentry.selectAll()   QTimer.singleShot(0, lambda:self.userentry.setFocus())   @@ -377,6 +396,8 @@
  return   if 'auth' not in cfg:   cfg._new_namespace('auth') + schemes = hglib.fromunicode(self.schemes.currentText()) + prefix = hglib.fromunicode(self.prefixentry.text())   username = hglib.fromunicode(self.userentry.text())   password = hglib.fromunicode(self.pwentry.text())   alias = hglib.fromunicode(self.aliasentry.text()) @@ -385,9 +406,9 @@
  _('Authentication info for %s already'   'exists, replace?') % host):   return - cfg['auth'][alias+'.schemes'] = 'https http' + cfg['auth'][alias+'.schemes'] = schemes   cfg['auth'][alias+'.username'] = username - cfg['auth'][alias+'.prefix'] = self.host + cfg['auth'][alias+'.prefix'] = prefix   key = alias+'.password'   if password:   cfg['auth'][key] = password