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: add 'push to here' cmenu option

Changeset da76d9133dc6

Parent e934183f6f76

by Steve Borho

Changes to one file · Browse files at da76d9133dc6 Showing diff from parent e934183f6f76 Diff from another changeset...

 
49
50
51
 
52
53
54
 
97
98
99
 
100
101
102
 
580
581
582
 
 
583
584
585
 
748
749
750
 
751
752
753
 
1057
1058
1059
 
1060
1061
1062
 
1097
1098
1099
1100
 
 
1101
1102
1103
 
1409
1410
1411
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1412
1413
1414
 
49
50
51
52
53
54
55
 
98
99
100
101
102
103
104
 
582
583
584
585
586
587
588
589
 
752
753
754
755
756
757
758
 
1062
1063
1064
1065
1066
1067
1068
 
1103
1104
1105
 
1106
1107
1108
1109
1110
 
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
@@ -49,6 +49,7 @@
  self.bundledir = None   self.bfile = None   self.npreviews = 0 + self.outgoing = []   os.chdir(self.repo.root)     # Load extension support for commands which need it @@ -97,6 +98,7 @@
  def get_menu_list(self):   def refresh(menuitem, resetmarks):   if resetmarks: + self.outgoing = []   self.graphview.set_outgoing([])   self.origtip = len(self.repo)   self.reload_log() @@ -580,6 +582,8 @@
  m.show_all()   return m   + if self.repo[self.currevid].node() in self.outgoing: + m.append(create_menu(_('push to here'), self.push_to))   m.append(create_menu(_('_update'), self.checkout))   cmenu_merge = create_menu(_('_merge with'), self.domerge)   m.append(cmenu_merge) @@ -748,6 +752,7 @@
  cell = gtk.CellRendererText()   urlcombo.pack_end(cell, False)   urlcombo.add_attribute(cell, 'text', 1) + self.pathentry = urlcombo.get_child()   syncbox.append_widget(urlcombo, expand=True)     for alias, path in self.repo.ui.configitems('paths'): @@ -1057,6 +1062,7 @@
  else:   self.stbar.end()   self.graphview.set_outgoing(outgoing) + self.outgoing = outgoing   self.reload_log()   stop.disconnect(stop_handler)   stop.set_sensitive(False) @@ -1097,7 +1103,8 @@
  dlg.show_all()   dlg.run()   dlg.hide() - if dlg.return_code() == 0 and self.graphview.outgoing: + if dlg.return_code() == 0 and self.outgoing: + self.outgoing = []   self.graphview.set_outgoing([])   self.reload_log()   @@ -1409,6 +1416,25 @@
  statopts)   dialog.display()   + def push_to(self, menuitem): + remote_path = hglib.fromutf(self.pathentry.get_text()).strip() + for alias, path in self.repo.ui.configitems('paths'): + if remote_path == alias: + remote_path = path + elif remote_path == url.hidepassword(path): + remote_path = path + node = self.repo[self.currevid].node() + cmdline = ['hg', 'push', '--rev', str(self.currevid), remote_path] + dlg = hgcmd.CmdDialog(cmdline, text='hg push') + dlg.show_all() + dlg.run() + dlg.hide() + if dlg.return_code() == 0 and self.outgoing: + d = self.outgoing.index(node) + self.outgoing = self.outgoing[d+1:] + self.graphview.set_outgoing(self.outgoing) + self.reload_log() +   def pull_to(self, menuitem):   cmdline = ['hg', 'pull', '--rev', str(self.currevid), self.bfile]   dlg = hgcmd.CmdDialog(cmdline)