From 8ff103de5599f931bccdaf9ddba047319092b944 Mon Sep 17 00:00:00 2001 From: Dave Borowitz Date: Wed, 10 Mar 2010 10:56:35 -0800 Subject: [PATCH] Prevent server stack trace when the client request is a no-op. The exception was not killing the server, just the connection, and was technically correct since the server is supposed to close the connection anyway when the client sends no wants. As a result, the compat tests weren't failing. A better long-term solution would be to modify the server used during testing to stop serving if one request generates an exception. Change-Id: I065463803f38175a50f364b11588929094a28aab --- dulwich/repo.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dulwich/repo.py b/dulwich/repo.py index a69760e..067554f 100644 --- a/dulwich/repo.py +++ b/dulwich/repo.py @@ -684,6 +684,8 @@ class BaseRepo(object): :return: iterator over objects, with __len__ implemented """ wants = determine_wants(self.get_refs()) + if not wants: + return [] haves = self.object_store.find_common_revisions(graph_walker) return self.object_store.iter_shas( self.object_store.find_missing_objects(haves, wants, progress, -- 2.34.1