Rev 3297: Note iter_reverse_revision_history exception decision. in http://people.ubuntu.com/~robertc/baz2.0/integration

Robert Collins robertc at robertcollins.net
Wed Mar 26 01:25:19 GMT 2008


At http://people.ubuntu.com/~robertc/baz2.0/integration

------------------------------------------------------------
revno: 3297
revision-id: robertc at robertcollins.net-20080326012515-qwyqj05bbhnm8uxz
parent: robertc at robertcollins.net-20080326011541-h9cxdap8x5pafq13
committer: Robert Collins <robertc at robertcollins.net>
branch nick: integration
timestamp: Wed 2008-03-26 12:25:15 +1100
message:
  Note iter_reverse_revision_history exception decision.
modified:
  bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py	2008-03-19 04:39:04 +0000
+++ b/bzrlib/repository.py	2008-03-26 01:25:15 +0000
@@ -1619,6 +1619,11 @@
             if next_id in (None, _mod_revision.NULL_REVISION):
                 return
             yield next_id
+            # Note: The following line may raise KeyError in the event of
+            # truncated history. We decided not to have a try:except:raise
+            # RevisionNotPresent here until we see a use for it, because of the
+            # cost in an inner loop that is by its very nature O(history).
+            # Robert Collins 20080326
             parents = graph.get_parent_map([next_id])[next_id]
             if len(parents) == 0:
                 return



More information about the bazaar-commits mailing list