Yuya Nishihara avatar Yuya Nishihara committed 01613f9

more work on revset

Comments (0)

Files changed (6)

repof-filter-workaround.diff

+# HG changeset patch
+# Parent 09307db26d3fc7537d29003b66180bc99cc857bb
+diff --git a/tortoisehg/hgqt/revset.py b/tortoisehg/hgqt/revset.py
+--- a/tortoisehg/hgqt/revset.py
++++ b/tortoisehg/hgqt/revset.py
+@@ -377,7 +377,7 @@ class RevsetThread(QThread):
+ 
+     def __init__(self, repo, query, parent):
+         super(RevsetThread, self).__init__(parent)
+-        self.repo = hg.repository(repo.ui, repo.root)
++        self.repo = hg.repository(repo.ui, repo.root).unfiltered()
+         self.text = hglib.fromunicode(query)
+         self.query = query
+ 

repof-formatspec.diff

+# HG changeset patch
+# Parent 29070b08837cc387ca2ab3c81091e3f4451416bb
+diff --git a/tortoisehg/hgqt/repofilter.py b/tortoisehg/hgqt/repofilter.py
+--- a/tortoisehg/hgqt/repofilter.py
++++ b/tortoisehg/hgqt/repofilter.py
+@@ -179,7 +179,7 @@ class RepoFilterBar(QToolBar):
+                 self.queryIssued(query, [ctx.rev()])
+                 return
+             except (error.RepoError, error.LookupError, error.Abort):
+-                query = 'keyword("%s")' % query
++                query = hgrevset.formatspec('keyword(%s)', query)
+ 
+         self.entrydlg.entry.setText(query)
+         self.entrydlg.runQuery()

repof-movehack.diff

+# HG changeset patch
+# Parent 9ab18802a02eab4495f703ec17caf18cb3648acf
+
+diff --git a/tortoisehg/hgqt/repofilter.py b/tortoisehg/hgqt/repofilter.py
+--- a/tortoisehg/hgqt/repofilter.py
++++ b/tortoisehg/hgqt/repofilter.py
+@@ -10,7 +10,7 @@ import os
+ from PyQt4.QtCore import *
+ from PyQt4.QtGui import *
+ 
+-from mercurial import revset as hgrevset
++from mercurial import error, revset as hgrevset
+ 
+ from tortoisehg.util import hglib
+ from tortoisehg.hgqt.i18n import _
+@@ -172,6 +172,15 @@ class RepoFilterBar(QToolBar):
+             self.clearRevisionSet.emit()
+             return
+ 
++        if '(' not in query:
++            try:
++                ctx = self._repo[hglib.fromunicode(query)]
++                self.showMessage.emit(_('found revision'))
++                self.queryIssued(query, [ctx.rev()])
++                return
++            except (error.RepoError, error.LookupError, error.Abort):
++                query = 'keyword("%s")' % query
++
+         self.entrydlg.entry.setText(query)
+         self.entrydlg.runQuery()
+ 
+diff --git a/tortoisehg/hgqt/revset.py b/tortoisehg/hgqt/revset.py
+--- a/tortoisehg/hgqt/revset.py
++++ b/tortoisehg/hgqt/revset.py
+@@ -382,14 +382,6 @@ class RevsetThread(QThread):
+         self.query = query
+ 
+     def run(self):
+-        if '(' not in self.text:
+-            try:
+-                ctx = self.repo[self.text]
+-                self.showMessage.emit(_('found revision'))
+-                self.queryIssued.emit(self.query, [ctx.rev()])
+-                return
+-            except (error.RepoError, error.LookupError, error.Abort):
+-                self.text = 'keyword("%s")' % self.text
+         cwd = os.getcwd()
+         try:
+             os.chdir(self.repo.root)

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 889582dba8de5705d69bb53e51a7615d8d812560
+diff --git a/tortoisehg/hgqt/repofilter.py b/tortoisehg/hgqt/repofilter.py
+--- a/tortoisehg/hgqt/repofilter.py
++++ b/tortoisehg/hgqt/repofilter.py
+@@ -167,7 +167,7 @@ class RepoFilterBar(QToolBar):
+     @pyqtSlot()
+     def runQuery(self):
+         'Run revset query if exists; otherwise request to clear revset'
+-        query = self.revsetcombo.currentText().simplified()
++        query = unicode(self.revsetcombo.currentText()).strip()
+         if query:
+             self.entrydlg.entry.setText(query)
+             self.entrydlg.runQuery()
 repof-utilize.diff
 repof-uniq.diff
 repof-uniq-rename.diff
+repof-usepyuni.diff
+repof-returnearly.diff
+repof-movehack.diff
+repof-filter-workaround.diff
+repof-formatspec.diff
 issue2471-debug.diff
 revsetlabeltry.diff
 notestcmd.diff
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.