[MERGE] Push honours 'no-working-trees' setting of repositories (#50582)
Aaron Bentley
aaron.bentley at utoronto.ca
Fri Oct 5 01:37:08 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alexander Belchenko wrote:
> The bug fixed by making clone of working tree conditional,
> based on destination repo settings.
bb:resubmit
=== modified file 'bzrlib/bzrdir.py'
- --- bzrlib/bzrdir.py 2007-09-21 07:29:37 +0000
+++ bzrlib/bzrdir.py 2007-10-01 00:13:51 +0000
@@ -208,10 +208,11 @@
self.open_branch().clone(result, revision_id=revision_id)
except errors.NotBranchError:
pass
- - try:
- - self.open_workingtree().clone(result)
- - except (errors.NoWorkingTree, errors.NotLocalUrl):
- - pass
+ if result_repo.make_working_trees():
^^^ result_repo is not always set, so this will throw NameError in some
cases.
=== modified file 'bzrlib/tests/blackbox/test_push.py'
- --- bzrlib/tests/blackbox/test_push.py 2007-06-27 19:13:50 +0000
+++ bzrlib/tests/blackbox/test_push.py 2007-10-01 00:13:51 +0000
^^^^ a blackbox test is fine, but there should be a Bzrdir.clone test.
+ self.failIfExists([
+ 'repo/branch/.bzr/checkout',
+ 'repo/branch/a',
+ ])
I don't think you should check for a particular file-- this is
format-dependant. Instead, try opening a working tree, and assert that
it raises.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHBYc00F+nu1YWqI0RAi8TAJ0WXQ1OHSC1vAIqTby5AMGAW3CVOwCcDVvH
PkS4MjRK0DczQSzMMQGvB9Y=
=zIN+
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list