Commits

Yuya Nishihara committed 8d53b2a

refresh following patches

  • Participants
  • Parent commits affd83a

Comments (0)

Files changed (1)

File reporeg-dummystart.diff

 # HG changeset patch
-# Parent 0008577c9b3dfde66270fecfb5f96660df522109
+# Parent e26cce3b5b94d97f0adac1d0e2639f114dd47401
 reporegistry: move responsibility of initial reloadModel to workbench
 
 Because loading RepoTreeModel is expensive, it shouldn't be done by the
 diff --git a/tortoisehg/hgqt/reporegistry.py b/tortoisehg/hgqt/reporegistry.py
 --- a/tortoisehg/hgqt/reporegistry.py
 +++ b/tortoisehg/hgqt/reporegistry.py
-@@ -243,10 +243,11 @@ class RepoRegistryView(QDockWidget):
+@@ -243,11 +243,11 @@ class RepoRegistryView(QDockWidget):
          self.contextmenu = QMenu(self)
          self.tview = tv = RepoTreeView(self)
  
 -        tv.setModel(repotreemodel.RepoTreeModel(sfile, self,
 -            showSubrepos=self._isSettingEnabled('showSubrepos'),
 -            showNetworkSubrepos=self._isSettingEnabled('showNetworkSubrepos')))
+-        tv.model().updateProgress.connect(self.updateProgress)
 +        # start with dummy because loading RepoTreeModel is expensive;
 +        # the owner should call reloadModel() later
 +        dummymodel = repotreemodel.RepoTreeModel(filename=None, parent=self)
  
          mainframe.layout().addWidget(tv)
  
-@@ -266,6 +267,7 @@ class RepoRegistryView(QDockWidget):
+@@ -267,6 +267,7 @@ class RepoRegistryView(QDockWidget):
          # anytime it is modified by another thg instance
          # Note that we must make sure that the settings file exists before
          # setting thefile watcher
          if not os.path.exists(sfile):
              if not os.path.exists(os.path.dirname(sfile)):
                  os.makedirs(os.path.dirname(sfile))
-@@ -278,12 +280,6 @@ class RepoRegistryView(QDockWidget):
+@@ -279,12 +280,6 @@ class RepoRegistryView(QDockWidget):
          self._activeTabRepo = None
  
          self._loadSettings()
  
      def _loadSettings(self):
          defaultmap = {'showPaths': False, 'showSubrepos': True,
-@@ -294,9 +290,6 @@ class RepoRegistryView(QDockWidget):
+@@ -295,9 +290,6 @@ class RepoRegistryView(QDockWidget):
              action.setChecked(s.value(key, defaultmap[key]).toBool())
          s.endGroup()
  
      def _saveSettings(self):
          s = QSettings()
          s.beginGroup('Workbench')  # for compatibility with old release
-@@ -364,6 +357,7 @@ class RepoRegistryView(QDockWidget):
-                 self._isSettingEnabled('showShortPaths')))
+@@ -366,6 +358,7 @@ class RepoRegistryView(QDockWidget):
+         newmodel.updateProgress.connect(self.updateProgress)
          oldmodel.deleteLater()
          self.expand()
 +        self._updateColumnVisibility()  # resize columns to fit