Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.7, 0.7.1, and 0.7.2

synch: hgtk push|outgoing auto selects default-push path

Changeset f395ff57f0a6

Parent accfa2eb0e9e

by Steve Borho

Changes to 2 files · Browse files at f395ff57f0a6 Showing diff from parent accfa2eb0e9e Diff from another changeset...

Change 1 of 1 Show Entire File contrib/​hgtk Stacked
 
256
257
258
 
 
 
 
 
259
260
261
 
256
257
258
259
260
261
262
263
264
265
266
@@ -256,6 +256,11 @@
 def synch(ui, **opts):   """repository synchronization tool"""   from hggtk.synch import run + cmd = sys.argv[1] + if 'push'.startswith(cmd) or 'outgoing'.startswith(cmd): + opts['pushmode'] = True + else: + opts['pushmode'] = False   run(**opts)    def update(ui, **opts):
Change 1 of 3 Show Entire File hggtk/​synch.py Stacked
 
26
27
28
29
 
30
31
32
 
144
145
146
 
 
147
148
149
150
151
152
153
 
575
576
577
578
579
 
 
580
581
582
 
26
27
28
 
29
30
31
32
 
144
145
146
147
148
149
150
 
 
151
152
153
 
575
576
577
 
 
578
579
580
581
582
@@ -26,7 +26,7 @@
 import urllib    class SynchDialog(gtk.Window): - def __init__(self, cwd='', root = '', repos=[]): + def __init__(self, cwd='', root = '', repos=[], pushmode=False):   """ Initialize the Dialog. """   gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)   @@ -144,10 +144,10 @@
    if repos:   self._pathtext.set_text(repos[0]) + elif defpushrow is not None and pushmode: + self._pathbox.set_active(defpushrow)   elif defrow is not None:   self._pathbox.set_active(defrow) - elif defpushrow is not None: - self._pathbox.set_active(defpushrow)     sympaths = [x[1] for x in self.paths]   for p in self._recent_src: @@ -575,8 +575,8 @@
  self.write("[command interrupted]")   return False # Stop polling this function   -def run(cwd='', root='', files=[], **opts): - dialog = SynchDialog(cwd, root, files) +def run(cwd='', root='', files=[], pushmode=False, **opts): + dialog = SynchDialog(cwd, root, files, pushmode)   dialog.show_all()   gtk.gdk.threads_init()   gtk.gdk.threads_enter()