Rev 3358: Implement RemoteRepository.(set_)make_working_trees in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Thu Apr 10 19:55:49 BST 2008
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 3358
revision-id:pqm at pqm.ubuntu.com-20080410185541-zm4p6mqzquwg4tcn
parent: pqm at pqm.ubuntu.com-20080410162752-m3r5uhemfeimlio4
parent: aaron at aaronbentley.com-20080410163904-4b7j222by1h0h93d
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2008-04-10 19:55:41 +0100
message:
Implement RemoteRepository.(set_)make_working_trees
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/errors.py errors.py-20050309040759-20512168c4e14fbd
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/repofmt/weaverepo.py presplitout.py-20070125045333-wfav3tsh73oxu3zk-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/tests/repository_implementations/test_repository.py test_repository.py-20060131092128-ad07f494f5c9d26c
------------------------------------------------------------
revno: 3349.1.4
revision-id:aaron at aaronbentley.com-20080410163904-4b7j222by1h0h93d
parent: aaron at aaronbentley.com-20080410061949-1xfuy4h0r8lb3nk6
parent: pqm at pqm.ubuntu.com-20080410162752-m3r5uhemfeimlio4
committer: Aaron Bentley <aaron at aaronbentley.com>
branch nick: make_workingtrees
timestamp: Thu 2008-04-10 12:39:04 -0400
message:
Merge bzr.dev
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/config.py config.py-20051011043216-070c74f4e9e338e8
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/smart/branch.py branch.py-20061124031907-mzh3pla28r83r97f-1
bzrlib/smart/client.py client.py-20061116014825-2k6ada6xgulslami-1
bzrlib/smart/medium.py medium.py-20061103051856-rgu2huy59fkz902q-1
bzrlib/smart/request.py request.py-20061108095550-gunadhxmzkdjfeek-1
bzrlib/tests/test_config.py testconfig.py-20051011041908-742d0c15d8d8c8eb
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
bzrlib/tests/test_smart.py test_smart.py-20061122024551-ol0l0o0oofsu9b3t-2
bzrlib/tests/test_smart_transport.py test_ssh_transport.py-20060608202016-c25gvf1ob7ypbus6-2
doc/en/user-guide/controlling_registration.txt controlling_registra-20071121073725-0corxykv5irjal00-3
------------------------------------------------------------
revno: 3349.1.3
revision-id:aaron at aaronbentley.com-20080410061949-1xfuy4h0r8lb3nk6
parent: aaron at aaronbentley.com-20080410042238-epgsig57rz3bxma8
parent: pqm at pqm.ubuntu.com-20080410060333-ws6qe72jt38gs6lu
committer: Aaron Bentley <aaron at aaronbentley.com>
branch nick: make_workingtrees
timestamp: Thu 2008-04-10 02:19:49 -0400
message:
Merge bzr.dev
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/annotate.py annotate.py-20050922133147-7c60541d2614f022
bzrlib/commands.py bzr.py-20050309040720-d10f4714595cf8c3
bzrlib/errors.py errors.py-20050309040759-20512168c4e14fbd
bzrlib/fetch.py fetch.py-20050818234941-26fea6105696365d
bzrlib/inventory.py inventory.py-20050309040759-6648b84ca2005b37
bzrlib/knit.py knit.py-20051212171256-f056ac8f0fbe1bd9
bzrlib/lockable_files.py control_files.py-20051111201905-bb88546e799d669f
bzrlib/multiparent.py __init__.py-20070410133617-n1jdhcc1n1mibarp-1
bzrlib/repofmt/knitrepo.py knitrepo.py-20070206081537-pyy4a00xdas0j4pf-1
bzrlib/repofmt/pack_repo.py pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
bzrlib/repofmt/weaverepo.py presplitout.py-20070125045333-wfav3tsh73oxu3zk-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/revisiontree.py revisiontree.py-20060724012533-bg8xyryhxd0o0i0h-1
bzrlib/store/revision/knit.py knit.py-20060303020652-de5fa299e941a3c7
bzrlib/store/versioned/__init__.py weavestore.py-20050907094258-88262e0434babab9
bzrlib/tests/interversionedfile_implementations/__init__.py __init__.py-20060302012326-981af525594d02ed
bzrlib/tests/repository_implementations/test_check_reconcile.py test_broken.py-20070928125406-62236394w0jpbpd6-2
bzrlib/tests/revisionstore_implementations/test_all.py test_all.py-20060303020702-9b2d4c1d75407f31
bzrlib/tests/test_fetch.py testfetch.py-20050825090644-f73e07e7dfb1765a
bzrlib/tests/test_knit.py test_knit.py-20051212171302-95d4c00dd5f11f2b
bzrlib/tests/test_merge.py testmerge.py-20050905070950-c1b5aa49ff911024
bzrlib/tests/test_store.py teststore.py-20050826022702-f6caadb647395769
bzrlib/tests/test_subsume.py test_subsume.py-20060927040024-tsvh4pchajoayymg-1
bzrlib/tests/test_versionedfile.py test_versionedfile.py-20060222045249-db45c9ed14a1c2e5
bzrlib/tests/test_weave.py testknit.py-20050627023648-9833cc5562ffb785
bzrlib/versionedfile.py versionedfile.py-20060222045106-5039c71ee3b65490
bzrlib/weave.py knit.py-20050627021749-759c29984154256b
bzrlib/workingtree_4.py workingtree_4.py-20070208044105-5fgpc5j3ljlh5q6c-1
------------------------------------------------------------
revno: 3349.1.2
revision-id:aaron at aaronbentley.com-20080410042238-epgsig57rz3bxma8
parent: aaron at aaronbentley.com-20080410001618-59wuhbbewu71oaf0
committer: Aaron Bentley <aaron at aaronbentley.com>
branch nick: make_workingtrees
timestamp: Thu 2008-04-10 00:22:38 -0400
message:
Change ValueError to RepositoryUpgradeRequired
modified:
bzrlib/errors.py errors.py-20050309040759-20512168c4e14fbd
bzrlib/repofmt/weaverepo.py presplitout.py-20070125045333-wfav3tsh73oxu3zk-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/tests/repository_implementations/test_repository.py test_repository.py-20060131092128-ad07f494f5c9d26c
------------------------------------------------------------
revno: 3349.1.1
revision-id:aaron at aaronbentley.com-20080410001618-59wuhbbewu71oaf0
parent: pqm at pqm.ubuntu.com-20080409073641-pvhyvdyt42fph5xf
committer: Aaron Bentley <aaron at aaronbentley.com>
branch nick: make_workingtrees
timestamp: Wed 2008-04-09 20:16:18 -0400
message:
Enable setting and getting make_working_trees for all repositories
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/repofmt/weaverepo.py presplitout.py-20070125045333-wfav3tsh73oxu3zk-1
bzrlib/tests/repository_implementations/test_repository.py test_repository.py-20060131092128-ad07f494f5c9d26c
=== modified file 'NEWS'
--- a/NEWS 2008-04-10 16:27:52 +0000
+++ b/NEWS 2008-04-10 16:39:04 +0000
@@ -258,7 +258,10 @@
classes will now raise ``UnknownSmartMethod`` when appropriate, so that
callers don't need to try distinguish unknown request errors from other
errors. (Andrew Bennetts)
-
+
+ * ``set_make_working_trees`` is now implemented provided on all repository
+ implementations (Aaron Bentley)
+
* ``VersionedFile`` now has a new method ``get_parent_map`` which, like
``Graph.get_parent_map`` returns a dict of key:parents. (Robert Collins)
=== modified file 'bzrlib/errors.py'
--- a/bzrlib/errors.py 2008-04-10 02:32:51 +0000
+++ b/bzrlib/errors.py 2008-04-10 06:19:49 +0000
@@ -2074,6 +2074,11 @@
self.path = path
+class RepositoryUpgradeRequired(UpgradeRequired):
+
+ _fmt = "To use this feature you must upgrade your repository at %(path)s."
+
+
class LocalRequiresBoundBranch(BzrError):
_fmt = "Cannot perform local-only commits on unbound branches."
=== modified file 'bzrlib/remote.py'
--- a/bzrlib/remote.py 2008-04-08 07:44:39 +0000
+++ b/bzrlib/remote.py 2008-04-10 16:39:04 +0000
@@ -714,8 +714,9 @@
return self._real_repository.clone(a_bzrdir, revision_id=revision_id)
def make_working_trees(self):
- """RemoteRepositories never create working trees by default."""
- return False
+ """See Repository.make_working_trees"""
+ self._ensure_real()
+ return self._real_repository.make_working_trees()
def revision_ids_to_search_result(self, result_set):
"""Convert a set of revision ids to a graph SearchResult."""
@@ -994,7 +995,8 @@
return self._real_repository.pack()
def set_make_working_trees(self, new_value):
- raise NotImplementedError(self.set_make_working_trees)
+ self._ensure_real()
+ self._real_repository.set_make_working_trees(new_value)
@needs_write_lock
def sign_revision(self, revision_id, gpg_strategy):
=== modified file 'bzrlib/repofmt/weaverepo.py'
--- a/bzrlib/repofmt/weaverepo.py 2008-04-08 21:41:15 +0000
+++ b/bzrlib/repofmt/weaverepo.py 2008-04-10 06:19:49 +0000
@@ -205,8 +205,8 @@
:param new_value: True to restore the default, False to disable making
working trees.
"""
- raise NotImplementedError(self.set_make_working_trees)
-
+ raise errors.RepositoryUpgradeRequired(self.bzrdir.root_transport.base)
+
def make_working_trees(self):
"""Returns the policy for making working trees on new branches."""
return True
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py 2008-04-08 22:47:55 +0000
+++ b/bzrlib/repository.py 2008-04-10 06:19:49 +0000
@@ -2558,7 +2558,7 @@
# weave specific optimised path:
try:
self.target.set_make_working_trees(self.source.make_working_trees())
- except NotImplementedError:
+ except (errors.RepositoryUpgradeRequired, NotImplemented):
pass
# FIXME do not peek!
if self.source.control_files._transport.listable():
=== modified file 'bzrlib/tests/repository_implementations/test_repository.py'
--- a/bzrlib/tests/repository_implementations/test_repository.py 2008-03-26 21:53:32 +0000
+++ b/bzrlib/tests/repository_implementations/test_repository.py 2008-04-10 04:22:38 +0000
@@ -797,6 +797,22 @@
self.assertEqual([repo.bzrdir.root_transport.base],
[b.base for b in repo.find_branches(using=True)])
+ def test_set_get_make_working_trees_true(self):
+ repo = self.make_repository('repo')
+ try:
+ repo.set_make_working_trees(True)
+ except errors.RepositoryUpgradeRequired, e:
+ raise TestNotApplicable('Format does not support this flag.')
+ self.assertTrue(repo.make_working_trees())
+
+ def test_set_get_make_working_trees_false(self):
+ repo = self.make_repository('repo')
+ try:
+ repo.set_make_working_trees(False)
+ except errors.RepositoryUpgradeRequired, e:
+ raise TestNotApplicable('Format does not support this flag.')
+ self.assertFalse(repo.make_working_trees())
+
class TestRepositoryLocking(TestCaseWithRepository):
More information about the bazaar-commits
mailing list