[MERGE] Convert test.blackbox.test_c* to use internals where appropriate

Aaron Bentley aaron.bentley at utoronto.ca
Wed Aug 8 19:29:19 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Daniel Watkins wrote:
> Attached are fixed for tests.blackbox.test_cat,
> tests.blackbox.test_commit and tests.blackbox.test_conflicts.
> 

bb:tweak

+        rev_id = tree.branch.revision_history()[-1]

^^ This should be tree.branch.last_revision(), in general.

+from bzrlib.conflicts import resolve

^^ You don't appear to use 'resolve' anywhere.

         self.build_tree_contents([('b/a_file', 'changes in b')])
         self.run_bzr(['commit', '-m', 'first commit in b', 'b'])

         self.build_tree_contents([('a/a_file', 'new contents')])
         self.run_bzr(['commit', '-m', 'change in a', 'a'])

- -        os.chdir('b')
- -        self.run_bzr('merge ../a', retcode=1) # will conflict
- -        os.chdir('..')
+        b_tree.merge_from_branch(a_tree.branch)

^^^ You should check that conflicts are produced, as the old code did.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGugt/0F+nu1YWqI0RArRPAJ43B/SS9/TUQosdSx6XqlylowSJGQCdFPNR
iA/PpNdSIcn6GywiAMZvtVc=
=TLR4
-----END PGP SIGNATURE-----



More information about the bazaar mailing list