by
Changes to 3 files · Browse files at 1ac53134b385 Showing diff from parent d6363fbfe2c8 413a86ef8cfd Diff from another changeset...
@@ -40,6 +40,8 @@ usrc = hglib.tounicode(src)
ucwd = hglib.tounicode(cwd)
+ self.prev_dest = None
+
# base layout box
box = QVBoxLayout()
box.setSpacing(6)
@@ -65,7 +67,6 @@ self.dest_combo = QComboBox()
self.dest_combo.setEditable(True)
self.dest_combo.setMinimumWidth(310)
- self.dest_combo.lineEdit().returnPressed.connect(self.clone)
self.dest_btn = QPushButton(_('Browse...'))
self.dest_btn.setAutoDefault(False)
self.dest_btn.clicked.connect(self.browse_dest)
@@ -308,6 +309,14 @@ cmdline.append('--')
cmdline.append(dest)
+ # do not make the same clone twice (see #514)
+ if dest == self.prev_dest:
+ qtlib.ErrorMsgBox(_('TortoiseHg Clone'),
+ _('Please enter a new destination path.'))
+ self.dest_combo.setFocus()
+ return
+ self.prev_dest = dest
+
# start cloning
self.cmd.run(cmdline)
|
@@ -62,6 +62,9 @@ if model._ctx is not None:
self.contextChanged(model._ctx)
+ def setRepo(self, repo):
+ self.model().repo = repo
+
def contextChanged(self, ctx):
real = type(ctx.rev()) is int
wd = ctx.rev() is None
|
@@ -50,6 +50,7 @@ def setRepo(self, repo):
self.repo = repo
self.fileview.setRepo(repo)
+ self.filelist.setRepo(repo)
def setupUi(self):
SP = QSizePolicy
|
Loading...