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: enable 'force push' and 'use proxy server' menu options

Changeset 6de469ff7c57

Parent 69e63be88b74

by Steve Borho

Changes to one file · Browse files at 6de469ff7c57 Showing diff from parent 69e63be88b74 Diff from another changeset...

 
49
50
51
 
 
52
53
54
 
96
97
98
99
 
100
101
 
102
103
104
 
425
426
427
 
 
 
 
 
 
428
429
430
431
 
 
 
 
 
 
 
432
433
434
 
995
996
997
998
 
 
 
999
1000
1001
 
1057
1058
1059
1060
 
 
1061
1062
1063
 
1072
1073
1074
1075
1076
 
 
 
1077
1078
1079
 
1129
1130
1131
1132
 
 
 
 
1133
1134
1135
 
49
50
51
52
53
54
55
56
 
98
99
100
 
101
102
 
103
104
105
106
 
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
 
1010
1011
1012
 
1013
1014
1015
1016
1017
1018
 
1074
1075
1076
 
1077
1078
1079
1080
1081
 
1090
1091
1092
 
 
1093
1094
1095
1096
1097
1098
 
1148
1149
1150
 
1151
1152
1153
1154
1155
1156
1157
@@ -49,6 +49,8 @@
  self.bfile = None   self.npreviews = 0   self.outgoing = [] + self.useproxy = None + self.forcepush = False   os.chdir(self.repo.root)     # Load extension support for commands which need it @@ -96,9 +98,9 @@
    def get_menu_list(self):   def toggle_proxy(menuitem): - pass + self.useproxy = menuitem.get_active()   def toggle_force(menuitem): - pass + self.forcepush = menuitem.get_active()   def refresh(menuitem, resetmarks):   if resetmarks:   self.outgoing = [] @@ -425,10 +427,23 @@
  pass   self.get_menuitem(_('Compact Graph')).set_sensitive(self.graphcol)   self.get_menuitem(_('Color by Branch')).set_sensitive(self.graphcol) + item = self.get_menuitem(_('Use proxy server')) + if ui.ui().config('http_proxy', 'host'): + item.set_sensitive(True) + item.set_active(True) + else: + item.set_sensitive(False)     # enable MQ panel   self.enable_mqpanel()   + def get_proxy_args(self): + item = self.get_menuitem(_('Use proxy server')) + if item.get_property('sensitive') and not item.get_active(): + return ['--config', 'http_proxy.host='] + else: + return [] +   def get_graphlimit(self, suggestion):   limit_opt = self.repo.ui.config('tortoisehg', 'graphlimit', '500')   l = 0 @@ -995,7 +1010,9 @@
  bfile = bfile.replace(badchar, '')   bfile = bfile.replace('/', '_')   bfile = os.path.join(self.bundledir, bfile) + '.hg' - cmdline = ['hg', 'incoming', '--bundle', bfile, path] + cmdline = ['hg', 'incoming', '--bundle', bfile] + cmdline += self.get_proxy_args() + cmdline += [path]   dlg = hgcmd.CmdDialog(cmdline, text='hg incoming')   dlg.show_all()   dlg.run() @@ -1057,7 +1074,8 @@
  # load the rebase extension explicitly   extensions.load(self.ui, 'rebase', None)   - cmdline = ['hg'] + cmd + [self.pathentry.get_text()] + path = self.pathentry.get_text() + cmdline = ['hg'] + cmd + self.get_proxy_args() + [path]   dlg = hgcmd.CmdDialog(cmdline, text=' '.join(['hg'] + cmd))   dlg.show_all()   dlg.run() @@ -1072,8 +1090,9 @@
    def outgoing_clicked(self, toolbutton):   q = Queue.Queue() - cmd = [q, 'outgoing', '--quiet', '--template', '{node}\n', - self.pathentry.get_text()] + cmd = [q, 'outgoing', '--quiet', '--template', '{node}\n'] + cmd += self.get_proxy_args() + cmd += [self.pathentry.get_text()]     def threadfunc(q, *args):   try: @@ -1129,7 +1148,10 @@
  remote_path = path   elif remote_path == url.hidepassword(path):   remote_path = path - cmdline = ['hg', 'push', remote_path] + cmdline = ['hg', 'push'] + self.get_proxy_args() + if self.forcepush: + cmdline += ['--force'] + cmdline += [remote_path]   dlg = hgcmd.CmdDialog(cmdline, text='hg push')   dlg.show_all()   dlg.run()