+ assert not other.chunk_set.exists()
+ other.delete()
+
+ @transaction.commit_on_success
+ def prepend_history(self, other):
+ """Prepend history from all the other book's chunks to own."""
+ assert self != other
+
+ for i in range(len(self), len(other)):
+ title = u"pusta część %d" % i
+ chunk = self.add(slughifi(title), title)
+ chunk.commit('')
+
+ for i in range(len(other)):
+ self[i].prepend_history(other[0])
+
+ assert not other.chunk_set.exists()