Fix flaky/failing tests introduced in the last few changes.
authorDave Borowitz <dborowitz@google.com>
Tue, 2 Feb 2010 20:38:04 +0000 (12:38 -0800)
committerDave Borowitz <dborowitz@google.com>
Tue, 9 Feb 2010 17:51:21 +0000 (09:51 -0800)
Change-Id: Ie87a60d970638c4682970a9b4f47d8240de49532

dulwich/repo.py
dulwich/tests/test_server.py

index dca20d34d9d26aefd093cd81b5510cfc12ca0d15..8f67267fdaa1efdcc7a9fc8f464a75d421ff982e 100644 (file)
@@ -402,6 +402,7 @@ class DiskRefsContainer(RefsContainer):
         """
         self._check_refname(name)
         filename = self.refpath(name)
+        ensure_dir_exists(os.path.dirname(filename))
         f = GitFile(filename, 'wb')
         try:
             if old_ref is not None:
index 742fc3f93336bc059bff2d40d4b88a2241527de3..56a6dc23a142a2f795c911434a359e3f231c0197 100644 (file)
@@ -202,7 +202,7 @@ class ProtocolGraphWalkerTestCase(TestCase):
         self.assertRaises(GitProtocolError, self._walker.determine_wants, heads)
 
         self._walker.proto.set_output([])
-        self.assertRaises(GitProtocolError, self._walker.determine_wants, heads)
+        self.assertEquals([], self._walker.determine_wants(heads))
 
         self._walker.proto.set_output(['want %s multi_ack' % ONE, 'foo'])
         self.assertRaises(GitProtocolError, self._walker.determine_wants, heads)