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

stable filedialogs: add "Edit local" command to context menu

Also, the order of the commands has been changed to match the order in the
corresponding context menu on the repo history.

Changeset ec625507fa75

Parent e4e367dc1d59

by Angel Ezquerra

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

 
207
208
209
 
 
 
 
 
 
210
211
212
213
214
215
216
217
218
 
248
249
250
 
 
 
 
 
 
251
252
253
 
260
261
262
263
264
265
266
 
207
208
209
210
211
212
213
214
215
216
217
218
 
 
 
219
220
221
 
251
252
253
254
255
256
257
258
259
260
261
262
 
269
270
271
 
272
273
274
@@ -207,12 +207,15 @@
  a.setIcon(qtlib.getmenuicon('ldiff'))   a.triggered.connect(self.onVisualDiffFileToLocal)   menu.addSeparator() + a = menu.addAction(_('View at revision...')) + a.setIcon(qtlib.getmenuicon('view-at-revision')) + a.triggered.connect(self.onViewFileAtRevision) + a = menu.addAction(_('Edit local')) + a.setIcon(qtlib.getmenuicon('edit-file')) + a.triggered.connect(self.onEditLocal)   a = menu.addAction(_('Revert to revision...'))   a.setIcon(qtlib.getmenuicon('hg-revert'))   a.triggered.connect(self.onRevertFileToRevision) - a = menu.addAction(_('View at revision...')) - a.setIcon(qtlib.getmenuicon('view-at-revision')) - a.triggered.connect(self.onViewFileAtRevision)   self.selection = selection   self.menu.exec_(point)   @@ -248,6 +251,12 @@
  dlg.exec_()   dlg.deleteLater()   + def onEditLocal(self): + filenames = [self.filename] + if not filenames: + return + qtlib.editfiles(self.repo, filenames, parent=self) +   def onRevertFileToRevision(self):   rev = self.selection[0]   if rev is None: @@ -260,7 +269,6 @@
  dlg.exec_()   dlg.deleteLater()   -   def onViewFileAtRevision(self):   rev = self.selection[0]   filenames = [self.filerevmodel.graph.filename(rev)]