Clean up documentation; add --version.

Move manual gerrit remote setup docs from README to man page
(that's advanced usage).

Remove rendundant documentation from the README.

Add --version option.

Add documentation on contributing.

Change-Id: I624b56a629a6120e91ef1bfa0f4bb801b60b9d5d
This commit is contained in:
James E. Blair
2011-10-27 15:18:52 -04:00
parent 90dacb29cd
commit b8b908af1f
3 changed files with 65 additions and 32 deletions

View File

@@ -1,18 +1,20 @@
#!/usr/bin/env python
# Copyright 2011 OpenStack, LLC.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
COPYRIGHT = """\
Copyright (C) 2011 OpenStack LLC.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
See the License for the specific language governing permissions and
limitations under the License."""
import commands
import optparse
@@ -399,8 +401,10 @@ def main():
parser.add_option("-s", "--setup", dest="setup", action="store_true",
help="Just run the repo setup commands but don't "
"submit anything")
parser.add_option("--version", dest="version", action="store_true",
help="Print version number and exit")
parser.set_defaults(dry=False, rebase=True, verbose=False, update=False,
setup=False, remote="gerrit")
setup=False, version=False, remote="gerrit")
branch = "master"
(options, args) = parser.parse_args()
@@ -413,6 +417,11 @@ def main():
remote = options.remote
status = 0
if options.version:
print '%s, version %s' % (os.path.split(sys.argv[0])[-1], version)
print COPYRIGHT
sys.exit(0)
needs_update = latest_is_newer()
check_remote(remote)