~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_merge_directive.py

  • Committer: Vincent Ladeuil
  • Date: 2012-01-09 20:55:07 UTC
  • mto: This revision was merged to the branch mainline in revision 6468.
  • Revision ID: v.ladeuil+lp@free.fr-20120109205507-2i3en5r4w4ohdchj
Use idioms coherently and add comments to make their purpose clearer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
        self.tree1 = self.make_branch_and_tree('tree1')
46
46
        self.build_tree_contents([('tree1/file', 'a\nb\nc\nd\n')])
47
47
        self.tree1.branch.lock_write()
48
 
        self.tree1.branch.get_config_stack().set(
49
 
            'email', 'J. Random Hacker <jrandom@example.com>')
50
 
        self.tree1.branch.unlock()
 
48
        try:
 
49
            self.tree1.branch.get_config_stack().set(
 
50
                'email', 'J. Random Hacker <jrandom@example.com>')
 
51
        finally:
 
52
            self.tree1.branch.unlock()
51
53
        self.tree1.add('file')
52
54
        self.tree1.commit('foo', rev_id='foo-id')
53
55
        self.tree2 = self.tree1.bzrdir.sprout('tree2').open_workingtree()