Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

status: create new repositories in refresh thread

This prevents a race condition where one thread is running repo.status()
while another thread is performing UI operations with the same repo object.

Refs #818 This may prevent errors during revert, but it's hard to prove.

Changeset 9207d4bd793d

Parent e20ce6bd50d6

by Steve Borho

Changes to one file · Browse files at 9207d4bd793d Showing diff from parent e20ce6bd50d6 Diff from another changeset...

 
15
16
17
18
 
19
20
21
 
721
722
723
 
 
 
 
724
725
726
 
755
756
757
 
 
758
759
760
 
15
16
17
 
18
19
20
21
 
721
722
723
724
725
726
727
728
729
730
 
759
760
761
762
763
764
765
766
@@ -15,7 +15,7 @@
 import pango  import threading   -from mercurial import cmdutil, util, commands, patch, mdiff, error +from mercurial import cmdutil, util, commands, patch, mdiff, error, hg  from mercurial import merge as merge_    from tortoisehg.util.i18n import _ @@ -721,6 +721,10 @@
  if not self.ready: return False     def get_repo_status(): + # Create a new repo object + repo = hg.repository(self.ui, path=self.repo.root) + self.newrepo = repo +   if self.mqmode and self.mode != 'status':   # when a patch is applied, show diffs to parent of top patch   qtip = repo['.'] @@ -755,6 +759,8 @@
  self.stbar.end()   self.stbar.set_status_text(self.status_error)   return False + self.repo = self.newrepo + self.ui = self.repo.ui   self.refresh_file_tree()   self.update_check_count()   self.refresh_complete()