Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

history: open strip dialog instead of the prompt

Changeset 2cc85bc2aa92

Parent fd8f16c3ecd8

by Yuki KODAMA

Changes to one file · Browse files at 2cc85bc2aa92 Showing diff from parent fd8f16c3ecd8 Diff from another changeset...

 
22
23
24
25
 
26
27
28
 
1322
1323
1324
 
 
 
 
 
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
 
 
 
1339
1340
1341
 
22
23
24
 
25
26
27
28
 
1322
1323
1324
1325
1326
1327
1328
1329
1330
 
 
 
 
 
 
 
 
 
 
 
 
 
1331
1332
1333
1334
1335
1336
@@ -22,7 +22,7 @@
   from tortoisehg.hgtk.logview.treeview import TreeView as LogTreeView   -from tortoisehg.hgtk import gdialog, gtklib, hgcmd, gorev +from tortoisehg.hgtk import gdialog, gtklib, hgcmd, gorev, thgstrip  from tortoisehg.hgtk import backout, status, hgemail, tagadd, update, merge  from tortoisehg.hgtk import archive, changeset, thgconfig, thgmq, histdetails   @@ -1322,20 +1322,15 @@
  self.graphview.set_revision_id(rid, load=True)     def strip_rev(self, menuitem): + def strip_completed(): + self.repo.invalidate() + self.reload_log() + self.changeview._buffer.set_text('') + self.changeview._filelist.clear()   rev = self.currevid - res = gdialog.Confirm(_('Confirm Strip Revisions'), [], self, - _('Remove revision %d and all descendants?') % rev).run() - if res != gtk.RESPONSE_YES: - return - cmdline = ['hg', 'strip', str(rev)] - dlg = hgcmd.CmdDialog(cmdline) - dlg.show_all() - dlg.run() - dlg.hide() - self.repo.invalidate() - self.reload_log() - self.changeview._buffer.set_text('') - self.changeview._filelist.clear() + dialog = thgstrip.StripDialog(rev) + dialog.set_notify_func(strip_completed) + self.show_dialog(dialog)     def show_dialog(self, dlg):   dlg.set_transient_for(self)