/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_merge_directive.py

  • Committer: Robert Collins
  • Date: 2007-11-22 00:05:12 UTC
  • mto: This revision was merged to the branch mainline in revision 3014.
  • Revision ID: robertc@robertcollins.net-20071122000512-27cvsv9vs6k0s4hn
test_merge_directive locking correctness.

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,