# HG changeset patch
# User Kyle Altendorf <kyle.altend...@gmail.com>
# Date 1252703280 25200
# Node ID a9537c9a118aa0c5fb8f580b82dbc4d953bf6b76
# Parent  fd21c82a6abf7f2ef323e4a683d31f7eb1c159d4
sync: add 'check' checkbox to update button

Closes #462

diff -r fd21c82a6abf -r a9537c9a118a hggtk/synch.py
--- a/hggtk/synch.py    Fri Sep 11 11:16:24 2009 -0500
+++ b/hggtk/synch.py    Fri Sep 11 14:08:00 2009 -0700
@@ -258,8 +258,12 @@
         self.viewpulled.connect('clicked', self._view_pulled_changes)
         self.updatetip = gtk.Button(_('Update to branch tip'))
         self.updatetip.connect('clicked', self._update_to_tip)
+        self.updatetipcheck = gtk.CheckButton(_('Check update'))
+        self.tips.set_tip(self.updatetipcheck, _('Force update unless there'
+            ' are uncommitted changes'))
         self.buttonhbox.pack_start(self.viewpulled, False, False, 2)
         self.buttonhbox.pack_start(self.updatetip, False, False, 2)
+        self.buttonhbox.pack_start(self.updatetipcheck, False, False, 2)
         basevbox.pack_start(self.buttonhbox, False, False, 2)

         # statusbar
@@ -345,9 +349,11 @@
         parents = repo.parents()
         if len(parents) > 1 or parents[0].node() == branchhead or not
branchhead:
             self.updatetip.hide()
+            self.updatetipcheck.hide()
         else:
             self.buttonhbox.show()
             self.updatetip.show()
+            self.updatetipcheck.show()
         self.repo = repo

     def _view_pulled_changes(self, button):
@@ -360,6 +366,8 @@
         gobject.timeout_add(10, self.process_queue)
         self.write("", False)
         cmdline = ['update', '-v']
+        if self.updatetipcheck.get_active():
+            cmdline += ['--check']
         self.hgthread = hgthread.HgThread(cmdline)
         self.hgthread.start()
         self.stbar.begin()
# HG changeset patch
# User Kyle Altendorf <kyle.altend...@gmail.com>
# Date 1252703280 25200
# Node ID a9537c9a118aa0c5fb8f580b82dbc4d953bf6b76
# Parent  fd21c82a6abf7f2ef323e4a683d31f7eb1c159d4
sync: add 'check' checkbox to update button

Closes #462

diff -r fd21c82a6abf -r a9537c9a118a hggtk/synch.py
--- a/hggtk/synch.py	Fri Sep 11 11:16:24 2009 -0500
+++ b/hggtk/synch.py	Fri Sep 11 14:08:00 2009 -0700
@@ -258,8 +258,12 @@
         self.viewpulled.connect('clicked', self._view_pulled_changes)
         self.updatetip = gtk.Button(_('Update to branch tip'))
         self.updatetip.connect('clicked', self._update_to_tip)
+        self.updatetipcheck = gtk.CheckButton(_('Check update'))
+        self.tips.set_tip(self.updatetipcheck, _('Force update unless there'
+            ' are uncommitted changes'))
         self.buttonhbox.pack_start(self.viewpulled, False, False, 2)
         self.buttonhbox.pack_start(self.updatetip, False, False, 2)
+        self.buttonhbox.pack_start(self.updatetipcheck, False, False, 2)
         basevbox.pack_start(self.buttonhbox, False, False, 2)
 
         # statusbar
@@ -345,9 +349,11 @@
         parents = repo.parents()
         if len(parents) > 1 or parents[0].node() == branchhead or not branchhead:
             self.updatetip.hide()
+            self.updatetipcheck.hide()
         else:
             self.buttonhbox.show()
             self.updatetip.show()
+            self.updatetipcheck.show()
         self.repo = repo
 
     def _view_pulled_changes(self, button):
@@ -360,6 +366,8 @@
         gobject.timeout_add(10, self.process_queue)
         self.write("", False)
         cmdline = ['update', '-v']
+        if self.updatetipcheck.get_active():
+            cmdline += ['--check']
         self.hgthread = hgthread.HgThread(cmdline)
         self.hgthread.start()
         self.stbar.begin()
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to