Commits

Toshi MARUYAMA committed 288806e

backout 470498258bf1

  • Participants
  • Parent commits c1b3f22
  • Branches hgtk-default-mine

Comments (0)

Files changed (1)

File tortoisehg/hgtk/history.py

             m.append_submenu(_('Mercurial Queues'), self.mq_context_menu(),
                              'menupatch.ico')
 
-        m.append(_('Gra_ft to Local'), self.graft_rev,
-                 gtk.STOCK_CONVERT)
+        # need transplant extension for transplant command
+        if 'transplant' in self.exs:
+            m.append(_('Transp_lant to Local'), self.transplant_rev,
+                     gtk.STOCK_CONVERT)
 
         m.append_sep()
         m.append_submenu(_('Bisect'), self.bisect_context_menu(),
             can_merge = c0.branch() != c1.branch() or c0.ancestor(c1) != c1
         mmerge.set_sensitive(can_merge)
 
-        m.append(_('Graft Revision range to local'),
-                 self.graft_revs, gtk.STOCK_CONVERT)
+        # need transplant extension for transplant command
+        if 'transplant' in self.exs:
+            m.append(_('Transplant Revision range to local'),
+                     self.transplant_revs, gtk.STOCK_CONVERT)
 
         # need rebase extension for rebase command
         if 'rebase' in self.exs:
         self.reload_log()
         self.changeview.clear()
 
-    def graft_rev(self, menuitem):
-        """Graft selection on top of current revision."""
+    def transplant_rev(self, menuitem):
+        """Transplant selection on top of current revision."""
         rev = str(self.currevid)
-        self.graft_revs(menuitem, rev)
+        self.transplant_revs(menuitem, rev)
 
-    def graft_revs(self, menuitem, rev=None):
-        """Graft revision range on top of current revision."""
+    def transplant_revs(self, menuitem, rev=None):
+        """Transplant revision range on top of current revision."""
         if rev is None:
             revs = list(self.revrange)
             revs.sort()
             rev = '%d:%d' % (revs[0], revs[1])
-        cmdline = ['hg', 'graft', rev]
+        cmdline = ['hg', 'transplant', rev]
         self.execute_command(cmdline, force=True)
         self.repo.invalidate()
         self.reload_log()