Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.1.2 and tip

stable thgimport: move commit launching logic to a member function

I've seen hard-crashes after opening the commit tool from the import dialog. I
suspect they were related to this signal connection to a local function

Changeset bb515093a3d2

Parent 6104cd067fc7

by Steve Borho

Changes to one file · Browse files at bb515093a3d2 Showing diff from parent 6104cd067fc7 Diff from another changeset...

 
101
102
103
 
104
105
106
 
143
144
145
 
 
 
 
 
 
146
147
148
149
150
151
152
153
154
 
156
157
158
159
160
161
162
 
101
102
103
104
105
106
107
 
144
145
146
147
148
149
150
151
152
153
 
 
 
 
 
154
155
156
 
158
159
160
 
161
162
163
@@ -101,6 +101,7 @@
  box.addWidget(self.cmd)     self.stlabel = QLabel(_('Checking working directory status...')) + self.stlabel.linkActivated.connect(self.commitActivated)   box.addWidget(self.stlabel)   QTimer.singleShot(0, self.checkStatus)   @@ -143,12 +144,13 @@
    ### Private Methods ###   + def commitActivated(self): + dlg = commit.CommitDialog(self.repo, [], {}, self) + dlg.finished.connect(dlg.deleteLater) + dlg.exec_() + self.checkStatus() +   def checkStatus(self): - def activated(): - dlg = commit.CommitDialog(self.repo, [], {}, self) - dlg.finished.connect(dlg.deleteLater) - dlg.exec_() - self.checkStatus()   self.repo.dirstate.invalidate()   wctx = self.repo[None]   M, A, R = wctx.status()[:3] @@ -156,7 +158,6 @@
  text = _('Working directory is not clean! '   '<a href="view">View changes...</a>')   self.stlabel.setText(text) - self.stlabel.linkActivated.connect(activated)   else:   self.stlabel.clear()