Commits

Anonymous committed e0d3e26

SyncMq: mostly ready

Comments (0)

Files changed (3)

 sync: add support for the --mq option in the sync tool
 
 This patch adds a combobox to the sync options dialog if the mq extension is
-enabled. If one checks that combobox, the sync commands know that they should
-work on the patch queue by setting the --mq option. If the mq extension is
-disabled while the combobox is still checked, the stored mq option choice gets
-discarded.
-
-Since every command (push, pull, incoming, outgoing) needs a lot of changes,
-this patch just adds the basic infrastructure and is the inception of the patch.
+enabled. If one checks that combobox, the sync commands know that they should
+work on the patch queue by setting the --mq option. If the mq extension is
+disabled while the combobox is still checked, the stored mq option choice gets
+discarded.
+
+This patch does change only apply to push and pull, but not to incoming and
+outgoing.
 
 diff -r 7c8ecf007c30 tortoisehg/hgqt/sync.py
 --- a/tortoisehg/hgqt/sync.py	Thu Nov 17 14:44:44 2011 -0500
-+++ b/tortoisehg/hgqt/sync.py	Fri Nov 18 16:01:05 2011 +0100
++++ b/tortoisehg/hgqt/sync.py	Fri Nov 18 17:00:46 2011 +0100
 @@ -92,10 +92,11 @@
          self.targetargs = []
  
          self.repo.incrementBusyCount()
          self.cmd.run(cmdline, display=display, useproc='p4://' in cururl)
  
-@@ -1546,6 +1548,12 @@
+@@ -846,7 +848,10 @@
+             cmdline += ['--update', '--config', uimerge]
+         elif self.cachedpp == 'fetch':
+             cmdline[2] = 'fetch'
+-        self.run(cmdline, ('force', 'branch', 'rev', 'bookmark'))
++        elif self.opts['mq']:
++            # force the tool to update to the pulled changeset
++            cmdline += ['--update', '--config', uimerge]
++        self.run(cmdline, ('force', 'branch', 'rev', 'bookmark', 'mq'))
+ 
+     def outclicked(self):
+         self.syncStarted.emit()
+@@ -923,7 +928,7 @@
+         self.run(['--repository', self.repo.root, 'p4pending', '--verbose'], ())
+ 
+     def pushclicked(self, confirm, rev=None, branch=None):
+-        validopts = ('force', 'new-branch', 'branch', 'rev', 'bookmark')
++        validopts = ('force', 'new-branch', 'branch', 'rev', 'bookmark', 'mq')
+         self.syncStarted.emit()
+         url = self.currentUrl(True)
+         urlu = hglib.tounicode(url)
+@@ -1546,6 +1551,12 @@
          self.debugcb.setChecked(opts.get('debug', False))
          layout.addWidget(self.debugcb)
  
          form = QFormLayout()
          layout.addLayout(form)
  
-@@ -1579,6 +1587,8 @@
+@@ -1579,6 +1590,8 @@
          outopts['new-branch'] = self.newbranchcb.isChecked()
          outopts['noproxy'] = self.noproxycb.isChecked()
          outopts['debug'] = self.debugcb.isChecked()

SyncMqPushPull

-# HG changeset patch
-# Parent ddbb98a8476a5bd0f339a04c5d85b6b7313bc837
-sync: add support for --mq to the sync push and pull command
-
-diff -r ddbb98a8476a tortoisehg/hgqt/sync.py
---- a/tortoisehg/hgqt/sync.py	Fri Nov 18 16:01:05 2011 +0100
-+++ b/tortoisehg/hgqt/sync.py	Fri Nov 18 16:50:41 2011 +0100
-@@ -848,7 +848,7 @@
-             cmdline += ['--update', '--config', uimerge]
-         elif self.cachedpp == 'fetch':
-             cmdline[2] = 'fetch'
--        self.run(cmdline, ('force', 'branch', 'rev', 'bookmark'))
-+        self.run(cmdline, ('force', 'branch', 'rev', 'bookmark', 'mq'))
- 
-     def outclicked(self):
-         self.syncStarted.emit()
-@@ -925,7 +925,7 @@
-         self.run(['--repository', self.repo.root, 'p4pending', '--verbose'], ())
- 
-     def pushclicked(self, confirm, rev=None, branch=None):
--        validopts = ('force', 'new-branch', 'branch', 'rev', 'bookmark')
-+        validopts = ('force', 'new-branch', 'branch', 'rev', 'bookmark', 'mq')
-         self.syncStarted.emit()
-         url = self.currentUrl(True)
-         urlu = hglib.tounicode(url)
 SyncMq
-SyncMqPushPull
 # Placed by Bitbucket