Refactor server capability code into base Handler.
authorDave Borowitz <dborowitz@google.com>
Fri, 19 Feb 2010 21:33:38 +0000 (13:33 -0800)
committerDave Borowitz <dborowitz@google.com>
Thu, 4 Mar 2010 17:50:05 +0000 (09:50 -0800)
commit1e20a88f1a595fb4d82e04b3b10f31440b58d025
treea49c4bdbdb99b92cb38161eabe065d614e8fffa1
parent5ddf56897aba540e3a5d07ffcf9fafc078241d14
Refactor server capability code into base Handler.

UploadPackHandler and ReceivePackHandler now both handle client
capabilities using a consistent interface, the set_client_capabilites
and has_capability functions. Both now error as soon as an unknown
capability is requested by the client.

Also renames the following methods:
  capabilities -> capability_line
  default_capabilities -> capabilities
This is because capability_line is the less general of the two
methods, as it is only useful when advertising capabilities to the
client.

Changed capabilities tests to use the base class and test new
functionality.

Change-Id: If7d3feeac27834119d6d4e4021569401e5444d51
dulwich/server.py
dulwich/tests/test_server.py