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
=== modified file 'breezy/bzr/groupcompress_repo.py'
--- breezy/bzr/groupcompress_repo.py 2019-06-02 02:35:46 +0000
+++ breezy/bzr/groupcompress_repo.py 2019-12-23 03:04:15 +0000
@@ -1391,6 +1391,7 @@
1391 _fetch_uses_deltas = False1391 _fetch_uses_deltas = False
1392 fast_deltas = True1392 fast_deltas = True
1393 pack_compresses = True1393 pack_compresses = True
1394 supports_tree_reference = True
13941395
1395 def _get_matching_bzrdir(self):1396 def _get_matching_bzrdir(self):
1396 return controldir.format_registry.make_controldir('2a')1397 return controldir.format_registry.make_controldir('2a')
13971398
=== modified file 'breezy/bzr/workingtree_4.py'
--- breezy/bzr/workingtree_4.py 2019-09-27 02:48:17 +0000
+++ breezy/bzr/workingtree_4.py 2019-12-23 03:04:15 +0000
@@ -565,10 +565,11 @@
565 abspath = self.abspath(relpath)565 abspath = self.abspath(relpath)
566 kind = file_kind(abspath)566 kind = file_kind(abspath)
567 if (self._repo_supports_tree_reference and kind == 'directory'):567 if (self._repo_supports_tree_reference and kind == 'directory'):
568 entry = self._get_entry(path=relpath)568 with self.lock_read():
569 if entry[1] is not None:569 entry = self._get_entry(path=relpath)
570 if entry[1][0][0] == b't':570 if entry[1] is not None:
571 kind = 'tree-reference'571 if entry[1][0][0] == b't':
572 kind = 'tree-reference'
572 return kind573 return kind
573574
574 def _last_revision(self):575 def _last_revision(self):
575576
=== modified file 'breezy/tests/per_pack_repository.py'
--- breezy/tests/per_pack_repository.py 2019-06-29 19:54:32 +0000
+++ breezy/tests/per_pack_repository.py 2019-12-23 03:04:15 +0000
@@ -884,7 +884,7 @@
884 # can only stack on repositories that have compatible internal884 # can only stack on repositories that have compatible internal
885 # metadata885 # metadata
886 if getattr(repo._format, 'supports_tree_reference', False):886 if getattr(repo._format, 'supports_tree_reference', False):
887 matching_format_name = 'pack-0.92-subtree'887 matching_format_name = '2a'
888 else:888 else:
889 if repo._format.supports_chks:889 if repo._format.supports_chks:
890 matching_format_name = '2a'890 matching_format_name = '2a'
@@ -915,7 +915,7 @@
915 if getattr(repo._format, 'supports_tree_reference', False):915 if getattr(repo._format, 'supports_tree_reference', False):
916 # can only stack on repositories that have compatible internal916 # can only stack on repositories that have compatible internal
917 # metadata917 # metadata
918 matching_format_name = 'pack-0.92-subtree'918 matching_format_name = '2a'
919 mismatching_format_name = 'rich-root-pack'919 mismatching_format_name = 'rich-root-pack'
920 else:920 else:
921 if repo.supports_rich_root():921 if repo.supports_rich_root():
922922
=== modified file 'breezy/tests/test_smart.py'
--- breezy/tests/test_smart.py 2019-03-06 21:27:22 +0000
+++ breezy/tests/test_smart.py 2019-12-23 03:04:15 +0000
@@ -2720,7 +2720,7 @@
2720 base_inv = repository.revision_tree(base_revid).root_inventory2720 base_inv = repository.revision_tree(base_revid).root_inventory
2721 inv = repository.revision_tree(revid).root_inventory2721 inv = repository.revision_tree(revid).root_inventory
2722 inv_delta = inv._make_delta(base_inv)2722 inv_delta = inv._make_delta(base_inv)
2723 serializer = inventory_delta.InventoryDeltaSerializer(True, False)2723 serializer = inventory_delta.InventoryDeltaSerializer(True, True)
2724 return b"".join(serializer.delta_to_lines(base_revid, revid, inv_delta))2724 return b"".join(serializer.delta_to_lines(base_revid, revid, inv_delta))
27252725
2726 def test_single(self):2726 def test_single(self):
27272727
=== modified file 'doc/en/release-notes/brz-3.1.txt'
--- doc/en/release-notes/brz-3.1.txt 2019-12-22 13:52:45 +0000
+++ doc/en/release-notes/brz-3.1.txt 2019-12-23 03:04:15 +0000
@@ -46,6 +46,11 @@
46 have installed and speeds up import time since psutil brings in46 have installed and speeds up import time since psutil brings in
47 various other modules. (Jelmer Vernooij)47 various other modules. (Jelmer Vernooij)
4848
49 * The ``2a`` format now officially supports storing tree references.
50 It always partially supported storing tree reference data,
51 and would happily pull in tree reference data from other repository
52 formats. (Jelmer Vernooij)
53
49 * A new ``fossil`` plugin has been added that warns users when they54 * A new ``fossil`` plugin has been added that warns users when they
50 attempt to access Fossil repositories.55 attempt to access Fossil repositories.
51 (Jelmer Vernooij, #1848821)56 (Jelmer Vernooij, #1848821)

Subscribers

People subscribed via source and target branches