Merge lp:~jelmer/brz/2a-supports-tree-reference into lp:brz

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/2a-supports-tree-reference
Merge into: lp:brz
Diff against target: 82 lines (+14/-7)
5 files modified
breezy/bzr/groupcompress_repo.py (+1/-0)
breezy/bzr/workingtree_4.py (+5/-4)
breezy/tests/per_pack_repository.py (+2/-2)
breezy/tests/test_smart.py (+1/-1)
doc/en/release-notes/brz-3.1.txt (+5/-0)
To merge this branch: bzr merge lp:~jelmer/brz/2a-supports-tree-reference
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve
Review via email: mp+374396@code.launchpad.net

Commit message

Mark 2a format as supporting tree references.

Description of the change

Mark 2a format as supporting tree references.

The 2a format always supported storing TreeReferences, and would happily pull
in TreeReferences when e.g. pulling in data from development-subtree
repositories. I don't think there is any value in forcing our users through
an upgrade step.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Revision history for this message
Vincent Ladeuil (vila) wrote :

I don't recall any related issue around tree references so it could just be that some tests weren't updated when 2a was released.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/bzr/groupcompress_repo.py'
2--- breezy/bzr/groupcompress_repo.py 2019-06-02 02:35:46 +0000
3+++ breezy/bzr/groupcompress_repo.py 2019-12-23 03:04:15 +0000
4@@ -1391,6 +1391,7 @@
5 _fetch_uses_deltas = False
6 fast_deltas = True
7 pack_compresses = True
8+ supports_tree_reference = True
9
10 def _get_matching_bzrdir(self):
11 return controldir.format_registry.make_controldir('2a')
12
13=== modified file 'breezy/bzr/workingtree_4.py'
14--- breezy/bzr/workingtree_4.py 2019-09-27 02:48:17 +0000
15+++ breezy/bzr/workingtree_4.py 2019-12-23 03:04:15 +0000
16@@ -565,10 +565,11 @@
17 abspath = self.abspath(relpath)
18 kind = file_kind(abspath)
19 if (self._repo_supports_tree_reference and kind == 'directory'):
20- entry = self._get_entry(path=relpath)
21- if entry[1] is not None:
22- if entry[1][0][0] == b't':
23- kind = 'tree-reference'
24+ with self.lock_read():
25+ entry = self._get_entry(path=relpath)
26+ if entry[1] is not None:
27+ if entry[1][0][0] == b't':
28+ kind = 'tree-reference'
29 return kind
30
31 def _last_revision(self):
32
33=== modified file 'breezy/tests/per_pack_repository.py'
34--- breezy/tests/per_pack_repository.py 2019-06-29 19:54:32 +0000
35+++ breezy/tests/per_pack_repository.py 2019-12-23 03:04:15 +0000
36@@ -884,7 +884,7 @@
37 # can only stack on repositories that have compatible internal
38 # metadata
39 if getattr(repo._format, 'supports_tree_reference', False):
40- matching_format_name = 'pack-0.92-subtree'
41+ matching_format_name = '2a'
42 else:
43 if repo._format.supports_chks:
44 matching_format_name = '2a'
45@@ -915,7 +915,7 @@
46 if getattr(repo._format, 'supports_tree_reference', False):
47 # can only stack on repositories that have compatible internal
48 # metadata
49- matching_format_name = 'pack-0.92-subtree'
50+ matching_format_name = '2a'
51 mismatching_format_name = 'rich-root-pack'
52 else:
53 if repo.supports_rich_root():
54
55=== modified file 'breezy/tests/test_smart.py'
56--- breezy/tests/test_smart.py 2019-03-06 21:27:22 +0000
57+++ breezy/tests/test_smart.py 2019-12-23 03:04:15 +0000
58@@ -2720,7 +2720,7 @@
59 base_inv = repository.revision_tree(base_revid).root_inventory
60 inv = repository.revision_tree(revid).root_inventory
61 inv_delta = inv._make_delta(base_inv)
62- serializer = inventory_delta.InventoryDeltaSerializer(True, False)
63+ serializer = inventory_delta.InventoryDeltaSerializer(True, True)
64 return b"".join(serializer.delta_to_lines(base_revid, revid, inv_delta))
65
66 def test_single(self):
67
68=== modified file 'doc/en/release-notes/brz-3.1.txt'
69--- doc/en/release-notes/brz-3.1.txt 2019-12-22 13:52:45 +0000
70+++ doc/en/release-notes/brz-3.1.txt 2019-12-23 03:04:15 +0000
71@@ -46,6 +46,11 @@
72 have installed and speeds up import time since psutil brings in
73 various other modules. (Jelmer Vernooij)
74
75+ * The ``2a`` format now officially supports storing tree references.
76+ It always partially supported storing tree reference data,
77+ and would happily pull in tree reference data from other repository
78+ formats. (Jelmer Vernooij)
79+
80 * A new ``fossil`` plugin has been added that warns users when they
81 attempt to access Fossil repositories.
82 (Jelmer Vernooij, #1848821)

Subscribers

People subscribed via source and target branches