I have edited my proposal, to incorporate feedback from the list. Please
review and give feedback.
Windows Service Support for svnserve
This is a proposal for adding support to svnserve for
running as a Windows Service. This proposal was written by
Arlie Davis (email@example.com).
Request for Comments
If you are interested in this feature, please read through
this proposal, and provide your (constructive) comments,
either to the SVN development list (firstname.lastname@example.org)
or privately to me, at email@example.com.
Spec Change Log
0.0 - 2/20/2006
Posted first version to dev list
0.1 - 2/21/2006
Incorporated list feedback
Changed parameters for --create-service
Added new --update-service
Added new --list-service
svnserve would be modified to add support for running "natively"
as a Windows service. This allows svnserve to be managed like
any other Windows service (start / stop from "Services"
management tool, see status, manage it remotely, etc.), to be
reliably started when the system boots, and to be reliably
stopped when the system shuts down.
Support will be provided for installing, enumerating, and
uninstalling instances of svnserve services. The
implementation would support any number of svnserve
repositories; there will not be any limitation on the
number of installed services.
svnserve would be modified to support these new command-line
Causes the process to run as a Windows service. Users do
not specify this switch; this switch will only be present
when the service is launched by the Windows Service Control
Manager (SCM). This flag is mutually exclusive with the
other start-mode flags, such as --inetd, --tunnel, --daemon,
and so on. Does not require any parameters.
--create-service <name> [parameters]
Installs a new Windows Service for a given Subversion
repository. The service is created, but is intentionally
not started. The usual Windows procedures for starting
and stopping the service apply ("net start <name>" and
"net stop <name>", or using the standard Windows service
management GUI). The following parameters may be specified:
Specifies the root directory of the repository.
This parameter is required.
Specifies whether the service should automatically be
started when the system boots. "auto" means that the
service should be started. "manual" means that the
service should not be started, but can be started
later by an administrator. This parameter is optional;
if omitted, the "auto" value is the default.
Specifies the hostname or IP address on which to listen.
This parameter is optional; if omitted, then the service
will listen on all installed IP interfaces.
Specifies the TCP port on which to listen. This
parameter is optional; if omitted, then the service
will listen on the default port.
--update-service <name> [create-parameters] [--restart]
Changes the parameters of an existing service instance.
The parameters are the same as for the --create-service
option, in addition to the --restart parameter.
This command will also check to see if the service is
currently running. If the service is running, and the
user has specified the --restart parameter, then the
command will stop the service, update the configuration,
and restart the service.
If the service is running, and the user has not specified
the --restart parameter, then the command will display
a warning, indicating that the service needs to be stopped
If the service is not running, then the command will
display a message indicating that the service is not
running, and will not take any other actions; the --restart
parameter is ignored.
--list-service [--config] [--csv | --tsv]
Shows a list of the installed SVN services on the local
machine. For each installed SVN service, the command
displays the service name, current status of the service
(stopped, running, starting, stopping, etc.), and if the
service is running, shows the process ID.
If the --config parameter is specified, then this command
will also display the configuration for each service. This
includes the service name (the name originally provided
to --create-service), the root path, the listen port, and
the listen host of each service.
If the --csv option is specified, then the fields are
printed as comma-separated values. If the --tsv option
is specified, then the fields are printed as tab-separated
values. This facilitates the use of this command in
--delete-service <name> --root <root>
Deletes a service that was created using --create-srevice.
As a safe-guard, the user must provide the same root path
that was specified during --create-service, in order to
insure that the correct service instance is being deleted.
- Will add command-line parameters for installing,
enumerating, and uninstalling svnserve service instances.
- Will add command-line parameters for running the process *as*
a service. This command-line parameter will only be used
when the Win32 Service Control Manager launches the process,
not when users launch it.
- Will contain the majority of the code relevant to running
as a Windows service.
svnserve would be modified to store and read startup parameters
in the registry key associated with the service. This includes
the repository root path, listen host, and listen port. This
allows svnserve to start without requiring that these parameters
be specified on a command-line.
No other values would be stored in the registry. Specifically,
there is no overlap with values stored in the registry and
values stored in the SVN "conf" directory.
In addition to the command-line support for creating and managing
service instances, I will contribute a GUI app for doing the same
I will document the procedures for installing, managing, and
uninstalling svnserve services.
Licensing / Intellectual Property
I will contribute this work free of charge, no strings attached,
in perpetuity, blah blah blah to the Subversion project, such
that the work is compatible with the existing Subversion license.
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Tue Feb 21 19:28:49 2006