The patch below seems to work. But I don't understand bzr internals, so I cannot say if this is correct. I compared the output of "bzr selftest" before and after applying this, and it does not break any new tests.
=== modified file 'bzrlib/repository.py'
--- bzrlib/repository.py 2008-07-14 16:16:48 +0000
+++ bzrlib/repository.py 2008-07-15 21:25:40 +0000
@@ -1592,7 +1592,10 @@
# 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]
+ try:
+ parents = graph.get_parent_map([next_id])[next_id]
+ except KeyError:
+ raise errors.RevisionNotPresent(next_id, self)
if len(parents) == 0: return
else:
The patch below seems to work. But I don't understand bzr internals, so I cannot say if this is correct. I compared the output of "bzr selftest" before and after applying this, and it does not break any new tests.
=== modified file 'bzrlib/ repository. py' repository. py 2008-07-14 16:16:48 +0000 repository. py 2008-07-15 21:25:40 +0000 parent_ map([next_ id])[next_ id] parent_ map([next_ id])[next_ id] RevisionNotPres ent(next_ id, self)
return
--- bzrlib/
+++ bzrlib/
@@ -1592,7 +1592,10 @@
# 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_
+ try:
+ parents = graph.get_
+ except KeyError:
+ raise errors.
if len(parents) == 0:
else: