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

sync: handle selection of configured paths

Changeset 02308a7244de

Parent 8d0757d5d18f

by Steve Borho

Changes to one file · Browse files at 02308a7244de Showing diff from parent 8d0757d5d18f Diff from another changeset...

 
82
83
84
 
 
85
86
87
 
159
160
161
 
 
 
 
 
 
 
162
163
164
 
165
166
167
 
168
169
170
171
172
173
174
 
 
 
175
176
177
 
214
215
216
217
 
218
219
220
 
82
83
84
85
86
87
88
89
 
161
162
163
164
165
166
167
168
169
170
171
172
 
173
174
175
 
176
177
178
179
180
 
 
 
181
182
183
184
185
186
 
223
224
225
 
226
227
228
229
@@ -82,6 +82,8 @@
  hbox.addWidget(self.siteauth)   layout.addLayout(hbox)   + self.tv.clicked.connect(self.pathSelected) +   pathsframe = QFrame()   pathsframe.setFrameStyle(QFrame.Panel|QFrame.Raised)   pathsbox = QVBoxLayout() @@ -159,19 +161,26 @@
  parts.extend(['/', unicode(path)])   self.urlentry.setText(''.join(parts))   + def pathSelected(self, index): + pathindex = index.sibling(index.row(), 1) + path = pathindex.data(Qt.DisplayRole).toString() + self.setUrl(unicode(path)) + aliasindex = index.sibling(index.row(), 0) + alias = aliasindex.data(Qt.DisplayRole).toString() + self.curalias = alias     def setUrl(self, newurl): - 'User has selected a new URL, in local encoding' + 'User has selected a new URL'   user, host, port, folder, passwd, scheme = self.urlparse(newurl)   self.updateInProgress = True - self.urlentry.setText(hglib.tounicode(newurl)) + self.urlentry.setText(newurl)   for i, val in enumerate(_schemes):   if scheme == val:   self.schemecombo.setCurrentIndex(i)   break - self.hostentry.setText(hglib.tounicode(host or '')) - self.portentry.setText(hglib.tounicode(port or '')) - self.pathentry.setText(hglib.tounicode(folder or '')) + self.hostentry.setText(host or '') + self.portentry.setText(port or '') + self.pathentry.setText(folder or '')   self.curuser = user   self.curpw = passwd   self.hostentry.setEnabled(scheme != 'local') @@ -214,7 +223,7 @@
 class PathsTree(QTreeView):   def __init__(self, root, parent=None):   QTreeView.__init__(self, parent) - self.setSelectionMode(QTreeView.ExtendedSelection) + self.setSelectionMode(QTreeView.SingleSelection)   self.setContextMenuPolicy(Qt.CustomContextMenu)   self.connect(self, SIGNAL('customContextMenuRequested(const QPoint &)'),   self.customContextMenuRequested)