708
708
cb = self.Callback(u'commit 2', self)
709
709
repository = tree.branch.repository
710
710
# simulate network failure
711
def raise_(self, arg, arg2, arg3=None, arg4=None):
712
712
raise errors.NoSuchFile('foo')
713
713
repository.add_inventory = raise_
715
714
self.assertRaises(errors.NoSuchFile, tree.commit, message_callback=cb)
716
715
self.assertFalse(cb.called)