~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_merge_directive.py

Merge up bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
565
565
    def from_objects(self, repository, revision_id, time, timezone,
566
566
        target_branch, patch_type='bundle', local_target_branch=None,
567
567
        public_branch=None, message=None):
568
 
        return merge_directive.MergeDirective.from_objects(
569
 
            repository, revision_id, time, timezone, target_branch,
570
 
            patch_type, local_target_branch, public_branch, message)
 
568
        repository.lock_write()
 
569
        try:
 
570
            return merge_directive.MergeDirective.from_objects( repository,
 
571
                revision_id, time, timezone, target_branch, patch_type,
 
572
                local_target_branch, public_branch, message)
 
573
        finally:
 
574
            repository.unlock()
571
575
 
572
576
    def make_merge_directive(self, revision_id, testament_sha1, time, timezone,
573
577
                 target_branch, patch=None, patch_type=None,