Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.1.2 and tip

stable workbench: do not reopen repos during startup until subrepos have been loaded into the registry (closes #1017)

During startup the workbench gets the list of repos (and subrepos) that were
open on the last session. It goes through the list, opening them one by one, and
if any is not found on the registry, it adds it automatically adds it to the
reporegistry default group.

Before this patch, the reload operation was performed before the subrepos had
been loaded into the registry. Thus if a subrepo was on the reopen list it would
never be found on the registry, and thus it would always be added to the default
group on startup.

This patch simply changes the order in which the settings are read. The "Save
open repositories on exit" setting is read after the "Show subrepos" setting has
been read and acted upon.

Changeset 0b1377c8084f

Parent d4016fbb0777

by Angel Ezquerra

Changes to one file · Browse files at 0b1377c8084f Showing diff from parent d4016fbb0777 Diff from another changeset...

 
85
86
87
88
 
89
90
91
 
803
804
805
806
807
808
809
810
811
812
 
837
838
839
 
 
 
 
 
840
841
842
 
85
86
87
 
88
89
90
91
 
803
804
805
 
 
 
 
806
807
808
 
833
834
835
836
837
838
839
840
841
842
843
@@ -85,7 +85,7 @@
  # Create the actions that will be displayed on the context menu   self.createActions()   self.lastClosedRepoRootList = [] - +   def setupUi(self):   desktopgeom = qApp.desktop().availableGeometry()   self.resize(desktopgeom.size() * 0.8) @@ -803,10 +803,6 @@
  wb = "Workbench/"   self.restoreGeometry(s.value(wb + 'geometry').toByteArray())   self.restoreState(s.value(wb + 'windowState').toByteArray()) - save = s.value(wb + 'saveRepos').toBool() - self.actionSaveRepos.setChecked(save) - for path in hglib.fromunicode(s.value(wb + 'openrepos').toString()).split(','): - self._openRepo(path, False)     # Load the repo registry settings. Note that we must allow the   # repo registry to assemble itself before toggling its settings @@ -837,6 +833,11 @@
  # Manually reload the model now, to apply the settings   self.reporegistry.reloadModel()   + save = s.value(wb + 'saveRepos').toBool() + self.actionSaveRepos.setChecked(save) + for path in hglib.fromunicode(s.value(wb + 'openrepos').toString()).split(','): + self._openRepo(path, False) +   # Allow repo registry to assemble itself before toggling path state   sp = s.value(wb + 'showPaths').toBool()   QTimer.singleShot(0, lambda: self.actionShowPaths.setChecked(sp))