# # # patch "twisted/plugins/mserv.py" # from [86e1d15b20fd7b081a7258df0d1e74872049a5b7] # to [b4f2671228265ebcb3398effa5d72c4fcd7ef069] # ============================================================ --- twisted/plugins/mserv.py 86e1d15b20fd7b081a7258df0d1e74872049a5b7 +++ twisted/plugins/mserv.py b4f2671228265ebcb3398effa5d72c4fcd7ef069 @@ -24,19 +24,21 @@ USA }}} """ -from zope.interface import implements -from twisted.application import service, internet, strports -from twisted.internet import reactor, defer, protocol, error -from twisted.plugin import IPlugin -from twisted.python import log, usage -from twisted.web import static, server, resource -from collections import deque -from cgi import escape -from tracmtn import basic_io -import os -import re -import simplejson +# ---------------------------------------------------------------------- +# The dir containing twisted/plugins/mserv.py must be on python's +# searchpath. +# +# Usage: twistd [options] mserv [options] +# +# Options: +# -p, --port= port to listen on [default: 8080] +# -d, --db= database to serve [default: $HOME/.monotone/monotone.mtn] +# -b, --binary= path to monotone binary [default: /usr/bin/mtn] +# --version +# --help Display this help and exit. +# + # ---------------------------------------------------------------------- # current URL scheme: @@ -70,6 +72,19 @@ import simplejson # ---------------------------------------------------------------------- +from zope.interface import implements +from twisted.application import service, internet, strports +from twisted.internet import reactor, defer, protocol, error +from twisted.plugin import IPlugin +from twisted.python import log, usage +from twisted.web import static, server, resource +from collections import deque +from cgi import escape +from tracmtn import basic_io +import os +import re +import simplejson + PACKET_HEADER = re.compile(r''' (?P\d+): (?P\d+):