Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.4rc1, 0.4rc2, and 0.4rc3

hggtk/synch: add option to pull menu to do fetch

Changeset 66670a45162d

Parent c1b9ade09742

by TK Soh

Changes to one file · Browse files at 66670a45162d Showing diff from parent c1b9ade09742 Diff from another changeset...

Change 1 of 4 Show Entire File hggtk/​synch.py Stacked
 
17
18
19
20
 
21
22
23
 
43
44
45
 
 
 
46
47
48
 
263
264
265
 
 
266
267
268
 
328
329
330
331
332
333
334
335
 
 
 
 
 
 
 
 
336
337
338
 
17
18
19
 
20
21
22
23
 
43
44
45
46
47
48
49
50
51
 
266
267
268
269
270
271
272
273
 
333
334
335
 
 
 
 
 
336
337
338
339
340
341
342
343
344
345
346
@@ -17,7 +17,7 @@
 import Queue  import os  import threading -from mercurial import hg, ui, util +from mercurial import hg, ui, util, extensions  from mercurial.repo import RepoError  from dialog import error_dialog, question_dialog  from hglib import HgThread @@ -43,6 +43,9 @@
  self.paths = self._get_paths()   self.origchangecount = self.repo.changelog.count()   + # load the fetch extension explicitly + extensions.load(self.ui, 'fetch', None) +   name = self.repo.ui.config('web', 'name') or os.path.basename(root)   self.set_title("TortoiseHg Synchronize - " + name)   @@ -263,6 +266,8 @@
  def _pull_menu(self):   menu = gtk.Menu()   + self._pull_fetch = gtk.CheckMenuItem("Do fetch") + menu.append(self._pull_fetch)   self._pull_update = gtk.CheckMenuItem("Update to new tip")   menu.append(self._pull_update)   @@ -328,11 +333,14 @@
  return tbutton     def _pull_clicked(self, toolbutton, data=None): - cmd = ['pull'] - if self._pull_update.get_active(): - cmd.append('--update') - if self._force.get_active(): - cmd.append('--force') + if self._pull_fetch.get_active(): + cmd = ['fetch', '--message', 'merge'] + else: + cmd = ['pull'] + if self._pull_update.get_active(): + cmd.append('--update') + if self._force.get_active(): + cmd.append('--force')   self._exec_cmd(cmd)     def _push_clicked(self, toolbutton, data=None):