Rev 2187: The Repository API ``make_working_trees`` is now permitted to return in http://bazaar.launchpad.net/~bzr/bzr/hpss
Robert Collins
robertc at robertcollins.net
Thu Mar 29 03:40:11 BST 2007
At http://bazaar.launchpad.net/~bzr/bzr/hpss
------------------------------------------------------------
revno: 2187
revision-id: robertc at robertcollins.net-20070329023848-b6v5memfil1qq3uq
parent: robertc at robertcollins.net-20070329023227-1xss7o4d3bc56x8h
committer: Robert Collins <robertc at robertcollins.net>
branch nick: hpss
timestamp: Thu 2007-03-29 12:38:48 +1000
message:
The Repository API ``make_working_trees`` is now permitted to return
False when ``set_make_working_trees`` is not implemented - previously
an unimplemented ``set_make_working_trees`` implied the result True
from ``make_working_trees``. This has been changed to accomodate the
smart server, where it does not make sense (at this point) to ever
make working trees by default. (Robert Collins)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/tests/repository_implementations/test_repository.py test_repository.py-20060131092128-ad07f494f5c9d26c
=== modified file 'NEWS'
--- a/NEWS 2007-03-28 13:45:26 +0000
+++ b/NEWS 2007-03-29 02:38:48 +0000
@@ -15,6 +15,13 @@
so that a seperate LockableFiles instance can share a lock if it has the
right token. (Andrew Bennetts, Robert Collins)
+ * The Repository API ``make_working_trees`` is now permitted to return
+ False when ``set_make_working_trees`` is not implemented - previously
+ an unimplemented ``set_make_working_trees`` implied the result True
+ from ``make_working_trees``. This has been changed to accomodate the
+ smart server, where it does not make sense (at this point) to ever
+ make working trees by default. (Robert Collins)
+
TESTING:
* Added ``bzrlib.strace.strace`` which will strace a single callable and
=== modified file 'bzrlib/remote.py'
--- a/bzrlib/remote.py 2007-03-29 02:14:04 +0000
+++ b/bzrlib/remote.py 2007-03-29 02:38:48 +0000
@@ -466,6 +466,7 @@
a_bzrdir, revision_id=revision_id, basis=basis)
def make_working_trees(self):
+ """RemoteRepositories never create working trees by default."""
return False
def fetch(self, source, revision_id=None, pb=None):
=== modified file 'bzrlib/tests/repository_implementations/test_repository.py'
--- a/bzrlib/tests/repository_implementations/test_repository.py 2007-03-29 02:32:27 +0000
+++ b/bzrlib/tests/repository_implementations/test_repository.py 2007-03-29 02:38:48 +0000
@@ -285,9 +285,9 @@
try:
made_repo.set_make_working_trees(False)
except NotImplementedError:
- if made_repo.make_working_trees():
- # this repository always makes working trees.
- return
+ # the repository does not support having its tree-making flag
+ # toggled.
+ return
result = made_control.clone(self.get_url('target'))
# Check that we have a repository object.
made_repo.has_revision('foo')
More information about the bazaar-commits
mailing list