Merge lp:~jelmer/brz/uninitialize-remote into lp:brz

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: Vincent Ladeuil
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/uninitialize-remote
Merge into: lp:brz
Diff against target: 39 lines (+10/-3)
2 files modified
breezy/tests/per_branch/test_push.py (+5/-2)
breezy/tests/per_interbranch/test_push.py (+5/-1)
To merge this branch: bzr merge lp:~jelmer/brz/uninitialize-remote
Reviewer Review Type Date Requested Status
Martin Packman Approve
Review via email: mp+340049@code.launchpad.net

Description of the change

Allow ControlDirFormat instances to be uninitializeable (like git remotes).

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :

Okay.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/tests/per_branch/test_push.py'
2--- breezy/tests/per_branch/test_push.py 2017-12-03 21:05:52 +0000
3+++ breezy/tests/per_branch/test_push.py 2018-02-28 21:38:37 +0000
4@@ -223,13 +223,16 @@
5 # See https://bugs.launchpad.net/bzr/+bug/465517
6 t = self.get_transport('target')
7 t.ensure_base()
8- bzrdir = self.bzrdir_format.initialize_on_transport(t)
9+ try:
10+ bzrdir = self.bzrdir_format.initialize_on_transport(t)
11+ except errors.UninitializableFormat:
12+ raise tests.TestNotApplicable('cannot initialize this format')
13 try:
14 bzrdir.open_branch()
15 except errors.NotBranchError:
16 pass
17 else:
18- raise tests.TestNotApplicable('older formats can\'t have a repo'
19+ raise tests.TestNotApplicable('some formats can\'t have a repo'
20 ' without a branch')
21 try:
22 source = self.make_branch_builder('source',
23
24=== modified file 'breezy/tests/per_interbranch/test_push.py'
25--- breezy/tests/per_interbranch/test_push.py 2017-11-21 20:40:14 +0000
26+++ breezy/tests/per_interbranch/test_push.py 2018-02-28 21:38:37 +0000
27@@ -212,7 +212,11 @@
28 # - rev-2, no changes
29 # - rev-3, modifies the file.
30 repo = self.make_repository('repo', shared=True, format='1.6')
31- builder = self.make_from_branch_builder('repo/local')
32+ try:
33+ builder = self.make_from_branch_builder('repo/local')
34+ except errors.UninitializableFormat:
35+ raise tests.TestNotApplicable(
36+ 'BranchBuilder can not initialize some formats')
37 builder.start_series()
38 revid1 = builder.build_snapshot(None, [
39 ('add', ('', 'root-id', 'directory', '')),

Subscribers

People subscribed via source and target branches