~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/upgrade.py

  • Committer: Aaron Bentley
  • Date: 2005-12-25 22:44:53 UTC
  • mto: (1185.67.11 bzr.revision-storage)
  • mto: This revision was merged to the branch mainline in revision 1550.
  • Revision ID: aaron.bentley@utoronto.ca-20051225224453-098a11d24b7edf84
Added write locks as appropriate

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
        self.pb = ui_factory.progress_bar()
103
103
        if self.old_format == 4:
104
104
            note('starting upgrade from format 4 to 5')
105
 
            self._convert_to_weaves()
 
105
            self.branch.lock_write()
 
106
            try:
 
107
                self._convert_to_weaves()
 
108
            finally:
 
109
                self.branch.unlock()
106
110
            self._open_branch()
107
111
        if self.old_format == 5:
108
112
            note('starting upgrade from format 5 to 6')
109
 
            self._convert_to_prefixed()
 
113
            self.branch.lock_write()
 
114
            try:
 
115
                self._convert_to_prefixed()
 
116
            finally:
 
117
                self.branch.unlock()
110
118
            self._open_branch()
111
119
        cache = hashcache.HashCache(os.path.abspath(self.base))
112
120
        cache.clear()