Merge lp:~jelmer/brz/no-more-ie-revision 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/no-more-ie-revision
Merge into: lp:brz
Diff against target: 18 lines (+0/-8)
1 file modified
breezy/tests/per_tree/test_test_trees.py (+0/-8)
To merge this branch: bzr merge lp:~jelmer/brz/no-more-ie-revision
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve
Martin Packman Approve
Review via email: mp+342045@code.launchpad.net

This proposal supersedes a proposal from 2018-03-24.

Description of the change

Don't require that entries returned from Tree have a .revision attribute set.

If callers care, they can use Tree.get_file_revision().

Git doesn't store file revisions, and getting at this attribute is costly.

(Nothing else in the non-bzr bit of the breezy codebase currently seems to require .revision)

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

Thanks.

review: Approve
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'breezy/tests/per_tree/test_test_trees.py'
--- breezy/tests/per_tree/test_test_trees.py 2018-03-24 13:28:54 +0000
+++ breezy/tests/per_tree/test_test_trees.py 2018-03-24 15:37:33 +0000
@@ -394,14 +394,6 @@
394 self.assertEqual(eparent, ie.parent_id)394 self.assertEqual(eparent, ie.parent_id)
395 if eparent is not None:395 if eparent is not None:
396 self.assertIsInstance(ie.parent_id, bytes)396 self.assertIsInstance(ie.parent_id, bytes)
397 # WorkingTree's return None for the last modified revision
398 if ie.revision is not None:
399 self.assertIsInstance(ie.revision, str)
400 if epath == '':
401 # Some trees will preserve the revision id of the tree root,
402 # but not all will
403 continue
404 self.assertEqual(erev, ie.revision)
405 self.assertEqual(len(path_and_ids), len(path_entries),397 self.assertEqual(len(path_and_ids), len(path_entries),
406 "%r vs %r" % (398 "%r vs %r" % (
407 [p for (p, f, pf, r) in path_and_ids],399 [p for (p, f, pf, r) in path_and_ids],

Subscribers

People subscribed via source and target branches