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: Transplant single revision on top of active revision.

Changeset dcae101b75e3

Parent 09c63f5a9cfa

by Dimitris Glezos

Changes to one file · Browse files at dcae101b75e3 Showing diff from parent 09c63f5a9cfa Diff from another changeset...

Change 1 of 2 Show Entire File hggtk/​history.py Stacked
 
389
390
391
 
 
 
 
 
 
 
392
393
394
395
396
 
844
845
846
 
 
 
 
 
 
 
 
 
 
 
 
 
847
848
849
 
389
390
391
392
393
394
395
396
397
398
399
 
400
401
402
 
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
@@ -389,8 +389,14 @@
  m.append(create_menu(_('_revert'), self.revert))   m.append(create_menu(_('_archive'), self.archive))   + # Load extension support for commands which need it + extensions.loadall(self.ui) + + # need transplant extension for transplant command + extensions.load(self.ui, 'transplant', None) + m.append(create_menu(_('transp_lant to local'), self.transplant_rev)) +   # need mq extension for strip command - extensions.loadall(self.ui)   extensions.load(self.ui, 'mq', None)   m.append(create_menu(_('strip revision'), self.strip_rev))   @@ -844,6 +850,19 @@
  dialog.present()   dialog.set_transient_for(None)   + def transplant_rev(self, menuitem): + """Transplant selection on top of current revision.""" + rev = self.currow[treemodel.REVID] + cmdline = ['hg', 'transplant', str(rev)] + dialog = hgcmd.CmdDialog(cmdline) + dialog.show_all() + dialog.run() + dialog.hide() + self.repo.invalidate() + self.reload_log() + self.changeview._buffer.set_text('') + self.changeview._filelist.clear() +   def selection_changed(self, treeview):   self.currow = self.graphview.get_revision()   rev = self.currow[treemodel.REVID]