Mercurial > hgweb.cgi > hwm
changeset 11:7a7c6a796a6d
Packaging scripts. IN: -
author | John Schneiderman <JohnMS@CodeGNU.com> |
---|---|
date | Sat, 26 Jul 2014 13:59:13 -0500 |
parents | d90ce1288692 |
children | 43d7ef8912d3 |
files | .hgignore INSTALL MANIFEST.in README doc/CREDITS doc/TODO setup.cfg setup.py src/__init__.py src/hwm.py |
diffstat | 10 files changed, 301 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgignore Sat Jul 26 11:51:45 2014 -0500 +++ b/.hgignore Sat Jul 26 13:59:13 2014 -0500 @@ -1,3 +1,6 @@ syntax: glob *.pyc hwm.ini +dist/* +MANIFEST +build/*
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/INSTALL Sat Jul 26 13:59:13 2014 -0500 @@ -0,0 +1,32 @@ +******************************************************************************** +*** This file is part of HgWeb Manager. *** +*** *** +*** Copyright (C) 2014 *** +*** CodeGNU Solutions <Licensing _AT_ CodeGNU _DOT_ com> *** +*** *** +*** This program is free software: you can redistribute it and/or modify it *** +*** under the terms of the GNU Affero General Public License as published *** +*** by the Free Software Foundation, either version 3 of the License, or *** +*** (at your option) any later version. *** +*** *** +*** This program is distributed in the hope that it will be useful, but *** +*** WITHOUT ANY WARRANTY; without even the implied warranty of *** +*** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *** +*** See the GNU Affero General Public License for more details. *** +*** *** +*** You should have received a copy of the GNU Affero General Public License*** +*** along with this program. If not, see <http://www.gnu.org/licenses/>. *** +******************************************************************************** + +Needed for compiling +==================== +1) Python 2.7+ + +How To compile the programme +============================ +1) python setup.py build +2) python setup.py install + +Known Issues +============ +None known.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MANIFEST.in Sat Jul 26 13:59:13 2014 -0500 @@ -0,0 +1,28 @@ +#******************************************************************************* +#** This file is part of HgWeb Manager. *** +#** *** +#** Copyright (C) 2014 *** +#** CodeGNU Solutions <Licensing _AT_ CodeGNU _DOT_ com> *** +#** *** +#** This program is free software: you can redistribute it and/or modify it *** +#** under the terms of the GNU Affero General Public License as published *** +#** by the Free Software Foundation, either version 3 of the License, or *** +#** (at your option) any later version. *** +#** *** +#** This program is distributed in the hope that it will be useful, but *** +#** WITHOUT ANY WARRANTY; without even the implied warranty of *** +#** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *** +#** See the GNU Affero General Public License for more details. *** +#** *** +#** You should have received a copy of the GNU Affero General Public License*** +#** along with this program. If not, see <http://www.gnu.org/licenses/>. *** +#******************************************************************************* + +# Documentation files +include README \ + LICENSE \ + MANIFEST.in \ + INSTALL \ + doc/ChangeLog \ + doc/TODO \ + doc/CREDITS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README Sat Jul 26 13:59:13 2014 -0500 @@ -0,0 +1,55 @@ +******************************************************************************** +*** This file is part of HgWeb Manager. *** +*** *** +*** Copyright (C) 2014 *** +*** CodeGNU Solutions <Licensing _AT_ CodeGNU _DOT_ com> *** +*** *** +*** This program is free software: you can redistribute it and/or modify it *** +*** under the terms of the GNU Affero General Public License as published *** +*** by the Free Software Foundation, either version 3 of the License, or *** +*** (at your option) any later version. *** +*** *** +*** This program is distributed in the hope that it will be useful, but *** +*** WITHOUT ANY WARRANTY; without even the implied warranty of *** +*** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *** +*** See the GNU Affero General Public License for more details. *** +*** *** +*** You should have received a copy of the GNU Affero General Public License*** +*** along with this program. If not, see <http://www.gnu.org/licenses/>. *** +******************************************************************************** + + DESCRIPTION +HgWebManager (HWM) is an application to administrate a shared central repository +hosting a Mercurial repository via HgWeb. HWM uses a configuration file to +manipulate a repository in an OS independent manner. + +Main website: http://www.codegnu.com/pages/hwm.html +Development website: http://www.codegnu.org + + BUILD ENVIRONMENT +HgWebManager is developed on Mageia 4 using just the standard development +libraries, mercurial, and python. + + DIRECTORY MAP +All the source code is listed in the src directory. Documentation is located in +the doc directory. The build instructions are explained in the INSTALL file. +For a listing of all the contributors to HWM you can find that information in +the CREDITS file. All the current news can be be found on the development +website. + + INSTRUCTIONS +To execute HWM type: + hwm.py --help +Once installed, HWM searches for a configuration file in the following common +locations: '/etc/hwm.ini', '~/.hwm/hwm.ini', './hwm.ini'. An empty configuration +file is shown below: + +[Mercurial] +# The absolute directory path to the managed repositories. +Base=None +# The absolute file and directory path to the mercurial command. +Command=None +# The user-name of the mercurial web manager. +User=None +# The absolute directory path to the mercurial web site. +Web=None
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/CREDITS Sat Jul 26 13:59:13 2014 -0500 @@ -0,0 +1,39 @@ +******************************************************************************** +*** This file is part of HgWeb Manager. *** +*** *** +*** Copyright (C) 2014 *** +*** CodeGNU Solutions <Licensing _AT_ CodeGNU _DOT_ com> *** +*** *** +*** This program is free software: you can redistribute it and/or modify it *** +*** under the terms of the GNU Affero General Public License as published *** +*** by the Free Software Foundation, either version 3 of the License, or *** +*** (at your option) any later version. *** +*** *** +*** This program is distributed in the hope that it will be useful, but *** +*** WITHOUT ANY WARRANTY; without even the implied warranty of *** +*** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *** +*** See the GNU Affero General Public License for more details. *** +*** *** +*** You should have received a copy of the GNU Affero General Public License*** +*** along with this program. If not, see <http://www.gnu.org/licenses/>. *** +******************************************************************************** + +This is a listing of the people that have contributed to the project. It is +sorted by name, and formatted in a way that allows for easy grepping and +beautification by scripts. The fields are: + - name (N) + - email (E) + - web-address (W) + - PGP key ID (K) + - PGP key fingerprint (F) + - description (D). +This was modified from: http://www.kernel.org/pub/linux/kernel/CREDITS +If one of the contributors did not wish to make a field public the text +"NOT_MADE_PUBLIC" is used instead. +--------------------------------------------------------------------- +N: John Schneiderman +E: JohnMS AT CodeGNU DOT com +W: http://www.codegnu.com +K: D060DD6F +F: 7BCAF9D478C242A4399B517A590BE289D060DD6F +D: Lead developer
--- a/doc/TODO Sat Jul 26 11:51:45 2014 -0500 +++ b/doc/TODO Sat Jul 26 13:59:13 2014 -0500 @@ -27,7 +27,6 @@ *** *** *** Feature Goals *** *** *** -- Ability to package HWM and deploy. - Generate default ignore file using XML. - Allow selection of multiple ignore groups during creation. - Allow plug-ins addition and removal from repositories. @@ -38,3 +37,4 @@ - Manager should handle the HgWeb configuration file settings. - Manager should provide a REST API for repository management. - Manager should have an API key per user permission values. +- Specify from command line where to search for a configuration file.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/setup.cfg Sat Jul 26 13:59:13 2014 -0500 @@ -0,0 +1,30 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +#******************************************************************************* +#** This file is part of HgWeb Manager. *** +#** *** +#** Copyright (C) 2014 *** +#** CodeGNU Solutions <Licensing _AT_ CodeGNU _DOT_ com> *** +#** *** +#** This program is free software: you can redistribute it and/or modify it *** +#** under the terms of the GNU Affero General Public License as published *** +#** by the Free Software Foundation, either version 3 of the License, or *** +#** (at your option) any later version. *** +#** *** +#** This program is distributed in the hope that it will be useful, but *** +#** WITHOUT ANY WARRANTY; without even the implied warranty of *** +#** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *** +#** See the GNU Affero General Public License for more details. *** +#** *** +#** You should have received a copy of the GNU Affero General Public License*** +#** along with this program. If not, see <http://www.gnu.org/licenses/>. *** +#******************************************************************************* + +[install] +optimize=2 + +[bdist_rpm] +# Use --release to set the release number +group = Development +requires = python, mercurial +doc_files = README, LICENSE, doc/ChangeLog, doc/CREDITS, doc/TODO
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/setup.py Sat Jul 26 13:59:13 2014 -0500 @@ -0,0 +1,76 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +#******************************************************************************* +#** This file is part of HgWeb Manager. *** +#** *** +#** Copyright (C) 2014 *** +#** CodeGNU Solutions <Licensing _AT_ CodeGNU _DOT_ com> *** +#** *** +#** This program is free software: you can redistribute it and/or modify it *** +#** under the terms of the GNU Affero General Public License as published *** +#** by the Free Software Foundation, either version 3 of the License, or *** +#** (at your option) any later version. *** +#** *** +#** This program is distributed in the hope that it will be useful, but *** +#** WITHOUT ANY WARRANTY; without even the implied warranty of *** +#** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *** +#** See the GNU Affero General Public License for more details. *** +#** *** +#** You should have received a copy of the GNU Affero General Public License*** +#** along with this program. If not, see <http://www.gnu.org/licenses/>. *** +#******************************************************************************* + +from distutils.core import setup +import sys + +sys.path.append('./src') +from hwm import YEARS,VERSION,DESCRIPTION,LONG_DESCRIPTION + +required= \ + [ + 'mercurial', + 'mercurial.hg', + 'mercurial.ui', + 'mercurial.error', + 'mercurial.hgweb' + ] + +# Basic package setup information +setup( name='hwm', + version=VERSION, + description=DESCRIPTION, + long_description=LONG_DESCRIPTION, + author='CodeGNU Solutions', + author_email='Licensing@CodeGNU.com', + url='http://www.codegnu.com', + download_url="http://www.codegnu.com/files/hwm-{0}.tar.gz".format(VERSION), + license='AGPLv3+', + packages=['HgWebManager'], + package_dir = {'HgWebManager': 'src'}, + provides=['HgWebManager'], + requires=required, + platforms= [ + 'GNU/Linux', + 'POSIX', + 'Mac OS', + 'Windows' + ], + classifiers=[ + 'Development Status :: 3 - Alpha', + 'Environment :: Console', + 'Environment :: Web Environment', + 'Intended Audience :: Developers', + 'Intended Audience :: System Administrators', + 'Intended Audience :: Information Technology', + 'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)', + 'Natural Language :: English', + 'Operating System :: MacOS', + 'Operating System :: Microsoft :: Windows', + 'Operating System :: POSIX :: Linux', + 'Programming Language :: Python :: 2.7', + 'Topic :: Internet :: WWW/HTTP :: Site Management', + 'Topic :: Software Development :: Version Control', + 'Topic :: System :: Systems Administration' + ], + data_files= None, +)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/__init__.py Sat Jul 26 13:59:13 2014 -0500 @@ -0,0 +1,30 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +#******************************************************************************* +#** This file is part of HgWeb Manager. *** +#** *** +#** Copyright (C) 2014 *** +#** CodeGNU Solutions <Licensing _AT_ CodeGNU _DOT_ com> *** +#** *** +#** This program is free software: you can redistribute it and/or modify it *** +#** under the terms of the GNU Affero General Public License as published *** +#** by the Free Software Foundation, either version 3 of the License, or *** +#** (at your option) any later version. *** +#** *** +#** This program is distributed in the hope that it will be useful, but *** +#** WITHOUT ANY WARRANTY; without even the implied warranty of *** +#** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *** +#** See the GNU Affero General Public License for more details. *** +#** *** +#** You should have received a copy of the GNU Affero General Public License*** +#** along with this program. If not, see <http://www.gnu.org/licenses/>. *** +#******************************************************************************* + + +# Files to include when creating the package. +__all__ = [ + 'configuration.py' + , 'hwm.py' + , 'manager.py' + , 'manrepo.py' + ]
--- a/src/hwm.py Sat Jul 26 11:51:45 2014 -0500 +++ b/src/hwm.py Sat Jul 26 13:59:13 2014 -0500 @@ -21,9 +21,13 @@ #******************************************************************************* # The current version of the application -VERSION = "0.2.0" +VERSION = '0.2.0' # The current copyright years. -YEARS = "2014" +YEARS = '2014' +# A short description of the application +DESCRIPTION = 'Manages HgWeb Repositories' +# A long description of the application +LONG_DESCRIPTION = 'An application to simplify the management of repositories shared through the Mercurial web publishing method.' """ IMPORTS @@ -82,7 +86,7 @@ print >>sys.stderr, "Must execute as the Mercurial Web manager." exit(1) - parser = argparse.ArgumentParser(description='Manages HgWeb Repositories') + parser = argparse.ArgumentParser(description=DESCRIPTION) parser.add_argument("repository", action="store", help='The storage-name of the repository to perform an action upon.') parser.add_argument("-a", "--action", action="store", nargs=1, type=str, choices=['create','modify','delete'], help='Performs an action upon a managed HgWeb repository.') parser.add_argument("-n", "--name", action="store", nargs='?', default=None, help='The display name of the repository.')