Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

history: reintroduce stop button to syncbar

Changeset 3d975e22b4cb

Parent 9cb65f3f50ac

by Yuki KODAMA

Changes to one file · Browse files at 3d975e22b4cb Showing diff from parent 9cb65f3f50ac Diff from another changeset...

 
301
302
303
 
 
304
305
306
 
1054
1055
1056
 
 
 
1057
 
1058
1059
 
1060
1061
1062
 
1112
1113
1114
 
1115
1116
1117
 
1292
1293
1294
 
 
1295
1296
1297
 
1302
1303
1304
 
 
1305
1306
1307
 
1342
1343
1344
1345
 
1346
1347
1348
 
1402
1403
1404
 
 
1405
1406
1407
 
1419
1420
1421
 
 
1422
1423
1424
 
1438
1439
1440
 
 
1441
1442
1443
 
1456
1457
1458
 
 
1459
1460
1461
 
1514
1515
1516
 
 
1517
1518
1519
 
1524
1525
1526
 
 
1527
1528
1529
 
1548
1549
1550
 
 
 
1551
1552
1553
 
1933
1934
1935
 
 
1936
1937
1938
 
1944
1945
1946
 
 
1947
1948
1949
 
1955
1956
1957
 
 
1958
1959
1960
 
1973
1974
1975
 
 
1976
1977
1978
 
301
302
303
304
305
306
307
308
 
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
 
1119
1120
1121
1122
1123
1124
1125
 
1300
1301
1302
1303
1304
1305
1306
1307
 
1312
1313
1314
1315
1316
1317
1318
1319
 
1354
1355
1356
 
1357
1358
1359
1360
 
1414
1415
1416
1417
1418
1419
1420
1421
 
1433
1434
1435
1436
1437
1438
1439
1440
 
1454
1455
1456
1457
1458
1459
1460
1461
 
1474
1475
1476
1477
1478
1479
1480
1481
 
1534
1535
1536
1537
1538
1539
1540
1541
 
1546
1547
1548
1549
1550
1551
1552
1553
 
1572
1573
1574
1575
1576
1577
1578
1579
1580
 
1960
1961
1962
1963
1964
1965
1966
1967
 
1973
1974
1975
1976
1977
1978
1979
1980
 
1986
1987
1988
1989
1990
1991
1992
1993
 
2006
2007
2008
2009
2010
2011
2012
2013
@@ -301,6 +301,8 @@
  func=self.push_clicked, icon=gtk.STOCK_GOTO_TOP),   dict(text=_('Email...'), name='email',   func=self.email_clicked, icon=gtk.STOCK_GOTO_LAST), + dict(text=_('Stop'), name='stop', sensitive=False, + func=self.stop_clicked, icon=gtk.STOCK_STOP),   dict(text='----'),   dict(text=_('Add Bundle...'), name='add-bundle',   sensitive=not bool(self.bfile), @@ -1054,9 +1056,14 @@
  _('Push outgoing changesets'))   email = syncbox.append_stock(gtk.STOCK_GOTO_LAST,   _('Email outgoing changesets')) + syncbox.append_widget(gtk.VSeparator()) + stop = syncbox.append_stock(gtk.STOCK_STOP, + _('Stop current transaction'))   + stop.set_sensitive(False)   apply.set_sensitive(False)   reject.set_sensitive(False) + self.stop_button = stop   self.syncbar_apply = apply   self.syncbar_reject = reject   @@ -1112,6 +1119,7 @@
  reject.connect('clicked', self.reject_clicked)   conf.connect('clicked', self.conf_clicked, urlcombo)   email.connect('clicked', self.email_clicked) + stop.connect('clicked', self.stop_clicked)     # filter bar   self.filterbox = FilterBox(self.tooltips, @@ -1292,6 +1300,8 @@
    def callback(return_code, *args):   self.stbar.end() + self.stop_button.set_sensitive(False) + self.cmd_set_sensitive('stop', False)   if return_code == 0 and os.path.isfile(bfile):   self.set_bundlefile(bfile)   text = _('%d incoming changesets') % self.npreviews @@ -1302,6 +1312,8 @@
  self.stbar.set_idle_text(text)   if self.runner.execute(cmdline, callback):   self.stbar.begin(_('Checking incoming changesets...')) + self.stop_button.set_sensitive(True) + self.cmd_set_sensitive('stop', True)   else:   gdialog.Prompt(_('Cannot run now'),   _('Please try again after running ' @@ -1342,7 +1354,7 @@
  self.cmd_set_sensitive(cmd, False)   self.incoming_disabled_cmds.append(cmd)   - ignore = (self.syncbar_apply, self.syncbar_reject, self.ppullbox) + ignore = (self.syncbar_apply, self.syncbar_reject, self.ppullbox, self.stop_button)   self.incoming_disabled = []   def disable_child(w):   if (w not in ignore) and w.get_property('sensitive'): @@ -1402,6 +1414,8 @@
    def callback(return_code, *args):   self.stbar.end() + self.stop_button.set_sensitive(False) + self.cmd_set_sensitive('stop', False)   if return_code == 0:   self.repo.invalidate()   self.changeview.clear_cache() @@ -1419,6 +1433,8 @@
  self.stbar.set_idle_text(text)   if self.runner.execute(cmdline, callback):   self.stbar.begin(_('Pulling changesets...')) + self.stop_button.set_sensitive(True) + self.cmd_set_sensitive('stop', True)   else:   gdialog.Prompt(_('Cannot run now'),   _('Please try again after running ' @@ -1438,6 +1454,8 @@
    def callback(return_code, buffer, *args):   self.stbar.end() + self.stop_button.set_sensitive(False) + self.cmd_set_sensitive('stop', False)   if return_code == 0:   outgoing = []   for line in buffer.splitlines()[:-1]: @@ -1456,6 +1474,8 @@
  self.stbar.set_idle_text(text)   if self.runner.execute(cmd, callback):   self.stbar.begin(_('Checking outgoing changesets...')) + self.stop_button.set_sensitive(True) + self.cmd_set_sensitive('stop', True)   else:   gdialog.Prompt(_('Cannot run now'),   _('Please try again after running ' @@ -1514,6 +1534,8 @@
    def callback(return_code, *args):   self.stbar.end() + self.stop_button.set_sensitive(False) + self.cmd_set_sensitive('stop', False)   if return_code == 0:   if self.outgoing:   self.outgoing = [] @@ -1524,6 +1546,8 @@
  self.stbar.set_idle_text(text)   if self.runner.execute(cmdline, callback):   self.stbar.begin(_('Pushing changesets...')) + self.stop_button.set_sensitive(True) + self.cmd_set_sensitive('stop', True)   else:   gdialog.Prompt(_('Cannot run now'),   _('Please try again after running ' @@ -1548,6 +1572,9 @@
  self.update_urllist()   self.update_postpull()   + def stop_clicked(self, toolbutton): + self.runner.stop() +   def update_urllist(self):   urllist = self.urlcombo.get_model()   urllist.clear() @@ -1933,6 +1960,8 @@
    def callback(return_code, *args):   self.stbar.end() + self.stop_button.set_sensitive(False) + self.cmd_set_sensitive('stop', False)   if return_code == 0:   if self.outgoing:   d = self.outgoing.index(node) @@ -1944,6 +1973,8 @@
  self.stbar.set_idle_text(text)   if self.runner.execute(cmdline, callback):   self.stbar.begin(_('Pushing changesets to revision %s...') % rev) + self.stop_button.set_sensitive(True) + self.cmd_set_sensitive('stop', True)   else:   gdialog.Prompt(_('Cannot run now'),   _('Please try again after running ' @@ -1955,6 +1986,8 @@
    def callback(return_code, *args):   self.stbar.end() + self.stop_button.set_sensitive(False) + self.cmd_set_sensitive('stop', False)   if return_code == 0:   curtip = len(hg.repository(self.ui, self.repo.root))   self.repo = hg.repository(self.ui, path=self.bfile) @@ -1973,6 +2006,8 @@
  self.stbar.set_idle_text(text)   if self.runner.execute(cmdline, callback):   self.stbar.begin(_('Pulling changesets to revision %s...') % rev) + self.stop_button.set_sensitive(True) + self.cmd_set_sensitive('stop', True)   else:   gdialog.Prompt(_('Cannot run now'),   _('Please try again after running '