Commits

Yuya Nishihara committed 99c59f6

start another way to move revset handling

Comments (0)

Files changed (4)

repof-buildq.diff

+# HG changeset patch
+# Parent 9659aaf2045a32dfe28d5de5e58fb691d79dcb50
+repofilter: add stub to build revset from simple keyword pattern
+
+I'll move keyword()-wrap from RevsetThread later.
+
+diff --git a/tortoisehg/hgqt/repofilter.py b/tortoisehg/hgqt/repofilter.py
+--- a/tortoisehg/hgqt/repofilter.py
++++ b/tortoisehg/hgqt/repofilter.py
+@@ -148,7 +148,7 @@ class RepoFilterBar(QToolBar):
+         self.revsetcombo.setFocus()
+ 
+     def openEditor(self):
+-        query = self.revsetcombo.currentText().simplified()
++        query = self._prepareQuery()
+         self.entrydlg.entry.setText(query)
+         self.entrydlg.entry.setCursorPosition(0, len(query))
+         self.entrydlg.entry.setFocus()
+@@ -163,13 +163,17 @@ class RepoFilterBar(QToolBar):
+         self.saveQuery()
+         self.revsetcombo.lineEdit().selectAll()
+ 
++    def _prepareQuery(self):
++        query = unicode(self.revsetcombo.currentText()).strip()
++        return query
++
+     def setQuery(self, query):
+         self.revsetcombo.setEditText(query)
+ 
+     @pyqtSlot()
+     def runQuery(self):
+         'Run the current revset query or request to clear the previous result'
+-        query = self.revsetcombo.currentText().simplified()
++        query = self._prepareQuery()
+         if query:
+             self.entrydlg.entry.setText(query)
+             self.entrydlg.runQuery()

repof-returnearly.diff

-# HG changeset patch
-# Parent 38f449f3b8e1bf22099b365e02ac685a24f427fb
-
-diff --git a/tortoisehg/hgqt/repofilter.py b/tortoisehg/hgqt/repofilter.py
---- a/tortoisehg/hgqt/repofilter.py
-+++ b/tortoisehg/hgqt/repofilter.py
-@@ -168,11 +168,12 @@ class RepoFilterBar(QToolBar):
-     def runQuery(self):
-         'Run revset query if exists; otherwise request to clear revset'
-         query = unicode(self.revsetcombo.currentText()).strip()
--        if query:
--            self.entrydlg.entry.setText(query)
--            self.entrydlg.runQuery()
--        else:
-+        if not query:
-             self.clearRevisionSet.emit()
-+            return
-+
-+        self.entrydlg.entry.setText(query)
-+        self.entrydlg.runQuery()
- 
-     def saveQuery(self):
-         query = self.revsetcombo.currentText()

repof-usepyuni.diff

-# HG changeset patch
-# Parent 9659aaf2045a32dfe28d5de5e58fb691d79dcb50
-
-diff --git a/tortoisehg/hgqt/repofilter.py b/tortoisehg/hgqt/repofilter.py
---- a/tortoisehg/hgqt/repofilter.py
-+++ b/tortoisehg/hgqt/repofilter.py
-@@ -169,7 +169,7 @@ class RepoFilterBar(QToolBar):
-     @pyqtSlot()
-     def runQuery(self):
-         'Run the current revset query or request to clear the previous result'
--        query = self.revsetcombo.currentText().simplified()
-+        query = unicode(self.revsetcombo.currentText()).strip()
-         if query:
-             self.entrydlg.entry.setText(query)
-             self.entrydlg.runQuery()
-repof-usepyuni.diff
-repof-returnearly.diff
+repof-buildq.diff
 repof-movehack.diff
 repof-formatspec.diff
 issue2471-debug.diff