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

sync: introduce a currentUrl() method

Changeset a7a0bb486180

Parent 68c68e858bd6

by Steve Borho

Changes to one file · Browse files at a7a0bb486180 Showing diff from parent 68c68e858bd6 Diff from another changeset...

 
146
147
148
 
 
 
 
 
 
 
149
150
151
152
153
154
 
155
156
157
158
159
160
161
 
163
164
165
166
 
167
168
169
170
171
172
 
173
174
175
 
254
255
256
257
 
 
 
258
259
 
 
 
260
261
 
 
 
262
263
 
 
264
265
266
 
146
147
148
149
150
151
152
153
154
155
156
157
 
 
 
 
158
159
 
 
 
160
161
162
 
164
165
166
 
167
168
169
170
171
172
 
173
174
175
176
 
255
256
257
 
258
259
260
261
 
262
263
264
265
 
266
267
268
269
 
270
271
272
273
274
@@ -146,16 +146,17 @@
  'User has changed schema/host/port/path'   if self.updateInProgress:   return + self.urlentry.setText(self.currentUrl(True)) + notlocal = (self.schemecombo.currentIndex() != 0) + self.hostentry.setEnabled(notlocal) + self.portentry.setEnabled(notlocal) + self.authbutton.setEnabled(notlocal) + + def currentUrl(self, hidepw):   scheme = _schemes[self.schemecombo.currentIndex()]   if scheme == 'local': - self.hostentry.setEnabled(False) - self.portentry.setEnabled(False) - self.authbutton.setEnabled(False) - self.urlentry.setText(self.pathentry.text()) + return unicode(self.pathentry.text())   else: - self.hostentry.setEnabled(True) - self.portentry.setEnabled(True) - self.authbutton.setEnabled(True)   path = self.pathentry.text()   host = self.hostentry.text()   port = self.portentry.text() @@ -163,13 +164,13 @@
  if self.curuser:   parts.append(self.curuser)   if self.curpw: - parts.append(':***') + parts.append(hidepw and ':***' or self.curpw)   parts.append('@')   parts.append(unicode(host))   if port:   parts.extend([':', unicode(port)])   parts.extend(['/', unicode(path)]) - self.urlentry.setText(''.join(parts)) + return ''.join(parts)     def pathSelected(self, index):   pathindex = index.sibling(index.row(), 1) @@ -254,13 +255,20 @@
  self.curuser, self.curpw = '', ''     def inclicked(self): - pass + url = self.currentUrl(False) + print 'hg incoming', url +   def pullclicked(self): - pass + url = self.currentUrl(False) + print 'hg pull', url +   def outclicked(self): - pass + url = self.currentUrl(False) + print 'hg outgoing', url +   def pushclicked(self): - pass + url = self.currentUrl(False) + print 'hg push', url    class SaveDialog(QDialog):   def __init__(self, root, alias, url, parent):