Changeset f395ff57f0a6…
Parent accfa2eb0e9e…
by
Changes to 2 files · Browse files at f395ff57f0a6 Showing diff from parent accfa2eb0e9e Diff from another changeset...
@@ -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):
|
@@ -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()
|
Loading...