1930
1930
return self.control_files.is_locked()
1932
1932
def lock_write(self, token=None):
1933
1934
repo_control = getattr(self.repository, 'control_files', None)
1934
1935
if self.control_files == repo_control or not self.is_locked():
1935
1936
self.repository.lock_write()