# HG changeset patch # User Steve Borho <st...@borho.org> # Date 1254539902 18000 # Node ID e934183f6f76983df2bc0673e0edf3ce8520a7c4 # Parent 6c36e4400f01f0331ab44f4d35e05d9c4703d926 history: add 'pull to here' menu option in preview mode
Allows incremental pulling of changes from the incoming bundle. Bundle overlay mode is not ended until the user hits 'Accept' or 'Reject' diff -r 6c36e4400f01 -r e934183f6f76 tortoisehg/hgtk/history.py --- a/tortoisehg/hgtk/history.py Fri Oct 02 18:47:14 2009 -0300 +++ b/tortoisehg/hgtk/history.py Fri Oct 02 22:18:22 2009 -0500 @@ -575,6 +575,8 @@ m.append(create_menu(_('diff to local'), self.vdiff_local)) m.append(create_menu(_('_copy hash'), self.copy_hash)) if self.bfile: + if self.currevid >= len(self.repo) - self.npreviews: + m.append(create_menu(_('pull to here'), self.pull_to)) m.show_all() return m @@ -1407,6 +1409,19 @@ statopts) dialog.display() + def pull_to(self, menuitem): + cmdline = ['hg', 'pull', '--rev', str(self.currevid), self.bfile] + dlg = hgcmd.CmdDialog(cmdline) + dlg.show_all() + dlg.run() + dlg.hide() + curtip = len(hg.repository(self.ui, self.repo.root)) + self.repo = hg.repository(self.ui, path=self.bfile) + self.graphview.set_repo(self.repo, self.stbar) + self.changeview.repo = self.repo + self.npreviews = len(self.repo) - curtip + self.reload_log() + def copy_hash(self, menuitem): hash = self.repo[self.currevid].hex() clipboard = gtk.Clipboard() ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Tortoisehg-develop mailing list Tortoisehg-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop