2131
2132
return self.control_files.is_locked()
2133
2134
def lock_write(self, token=None):
2134
2137
# All-in-one needs to always unlock/lock.
2135
2138
repo_control = getattr(self.repository, 'control_files', None)
2136
2139
if self.control_files == repo_control or not self.is_locked():