1. Yuya Nishihara
  2. thg-qt-mq

Commits

Yuya Nishihara  committed 6e3a3c2

split showhidden and branch filter

  • Participants
  • Parent commits 8193a8a
  • Branches default

Comments (0)

Files changed (6)

File repom-initfix.diff

View file
+# HG changeset patch
+# Parent d152529ebd972f7d08f2e35420d2a155b1c80909
+
+diff --git a/tortoisehg/hgqt/repomodel.py b/tortoisehg/hgqt/repomodel.py
+--- a/tortoisehg/hgqt/repomodel.py
++++ b/tortoisehg/hgqt/repomodel.py
+@@ -159,6 +159,7 @@ class HgRepoListModel(QAbstractTableMode
+         self.cfgname = cfgname
+         self.latesttags = {-1: 'null'}
+         self.fullauthorname = False
++        self.filterbranch = branch  # unicode
+         self.showhidden = showhidden
+         self.allparents = allparents
+ 
+@@ -170,9 +171,7 @@ class HgRepoListModel(QAbstractTableMode
+             self.initBranchColors()
+             self.reloadConfig()
+             self.updateColumns()
+-            self.setBranch(branch,
+-                           allparents=allparents,
+-                           showhidden=showhidden)
++            self._initGraph()
+ 
+     def initBranchColors(self):
+         # Set all the branch colors once on a fixed order,
+@@ -196,7 +195,7 @@ class HgRepoListModel(QAbstractTableMode
+             showhidden = self.showhidden
+         else:
+             self.showhidden = showhidden
+-        self.filterbranch = branch  # unicode
++        self.filterbranch = branch
+         self.allparents = allparents
+         self.invalidateCache()
+         self._initGraph()

File repom-noallparenone.diff

View file
+# HG changeset patch
+# Parent 51d957ab6046ed17c1d3628efc760518cc785232
+
+diff --git a/tortoisehg/hgqt/repomodel.py b/tortoisehg/hgqt/repomodel.py
+--- a/tortoisehg/hgqt/repomodel.py
++++ b/tortoisehg/hgqt/repomodel.py
+@@ -192,15 +192,12 @@ class HgRepoListModel(QAbstractTableMode
+             self.namedbranch_color(branch)
+ 
+     def setBranch(self, branch=None, allparents=False, showhidden=None):
+-        if allparents is None:
+-            allparents = self.allparents
+-        else:
+-            self.allparents = allparents
+         if showhidden is None:
+             showhidden = self.showhidden
+         else:
+             self.showhidden = showhidden
+         self.filterbranch = branch  # unicode
++        self.allparents = allparents
+         self.invalidateCache()
+         if self.revset and self.filterbyrevset:
+             grapher = revision_grapher(self.repo,

File repom-recresplit.diff

View file
+# HG changeset patch
+# Parent ee04e9b2575b73c0f96050ab7ffb39e39d8cf4d3
+
+diff --git a/tortoisehg/hgqt/repomodel.py b/tortoisehg/hgqt/repomodel.py
+--- a/tortoisehg/hgqt/repomodel.py
++++ b/tortoisehg/hgqt/repomodel.py
+@@ -199,6 +199,12 @@ class HgRepoListModel(QAbstractTableMode
+         self.filterbranch = branch  # unicode
+         self.allparents = allparents
+         self.invalidateCache()
++        self._initGraph()
++
++    def _initGraph(self):
++        branch = self.filterbranch
++        allparents = self.allparents
++        showhidden = self.showhidden
+         if self.revset and self.filterbyrevset:
+             grapher = revision_grapher(self.repo,
+                                        branch=hglib.fromunicode(branch),

File repom-splitmeth.diff

View file
+# HG changeset patch
+# Parent 61b2bf4021f25f0ddcc661a41a7834cfb5960eb2
+
+diff --git a/tortoisehg/hgqt/repomodel.py b/tortoisehg/hgqt/repomodel.py
+--- a/tortoisehg/hgqt/repomodel.py
++++ b/tortoisehg/hgqt/repomodel.py
+@@ -190,16 +190,19 @@ class HgRepoListModel(QAbstractTableMode
+         for branch in sorted(self.repo.branchtags().keys()):
+             self.namedbranch_color(branch)
+ 
+-    def setBranch(self, branch=None, allparents=False, showhidden=None):
+-        if showhidden is None:
+-            showhidden = self.showhidden
+-        else:
+-            self.showhidden = showhidden
++    def setBranch(self, branch=None, allparents=False):
+         self.filterbranch = branch
+         self.allparents = allparents
+         self.invalidateCache()
+         self._initGraph()
+ 
++    def setShowHidden(self, visible):
++        if self.showhidden == visible:
++            return
++        self.showhidden = visible
++        self.invalidateCache()
++        self._initGraph()
++
+     def _initGraph(self):
+         branch = self.filterbranch
+         allparents = self.allparents
+diff --git a/tortoisehg/hgqt/repowidget.py b/tortoisehg/hgqt/repowidget.py
+--- a/tortoisehg/hgqt/repowidget.py
++++ b/tortoisehg/hgqt/repowidget.py
+@@ -1132,22 +1132,15 @@ class RepoWidget(QWidget):
+             self.taskTabsWidget.tabBar().hide()
+ 
+     @pyqtSlot(QString, bool)
+-    def setBranch(self, branch, allparents=None):
+-        return self.setShownRevisions(branch, allparents=allparents)
++    def setBranch(self, branch, allparents):
++        self.repomodel.setBranch(branch, allparents=allparents)
++        self.titleChanged.emit(self.title())
++        if self.revset:
++            self.repoview.resetBrowseHistory(self.revset, self.rev)
+ 
+     @pyqtSlot(bool)
+     def setShowHidden(self, showhidden):
+-        return self.setShownRevisions(
+-            self.repomodel.branch(), allparents=None, showhidden=showhidden)
+-
+-    def setShownRevisions(self, branch, allparents=None, showhidden=None):
+-        'Change the revisions that must be shown (which branch? show hidden?)'
+-        self.repomodel.setBranch(branch=branch,
+-                                 allparents=allparents,
+-                                 showhidden=showhidden)
+-        self.titleChanged.emit(self.title())
+-        if self.revset:
+-            self.repoview.resetBrowseHistory(self.revset, self.rev)
++        self.repomodel.setShowHidden(showhidden)
+ 
+     ##
+     ## Workbench methods

File series

View file
+repom-noallparenone.diff
+repom-recresplit.diff
+repom-initfix.diff
+repom-splitmeth.diff
 thread-noexcsup.diff
 close-self-by-wb.diff
 wb-closedestroy-trace.diff

File thread-noexcsup.diff

View file
 # HG changeset patch
 # Date 1365940046 -32400
 # Parent 33835a9f8dc5cd2c6c958cf2b6391a6f59e92d4a
-thread: don't erase traceback of unexpected exception in CmdThread (refs #2483)
+thread: don't erase traceback of unknown exception in CmdThread (refs #2483)
 
 Our sys.excepthook defined in run.qtrun is thread-safe, so we can pop up
 BugReport dialog in this case.