Mercurial > hgweb.cgi > hwm
changeset 5:d5991e08acb9
Generalised the module name for a managed repository. IN: -
author | John Schneiderman <JohnMS@CodeGNU.com> |
---|---|
date | Mon, 21 Jul 2014 23:35:28 -0500 |
parents | d25225017d5f |
children | 75b05ad6b26d |
files | src/hwm.py src/manager.py src/manrepo.py src/repository.py |
diffstat | 4 files changed, 78 insertions(+), 78 deletions(-) [+] |
line wrap: on
line diff
--- a/src/hwm.py Mon Jul 21 23:32:52 2014 -0500 +++ b/src/hwm.py Mon Jul 21 23:35:28 2014 -0500 @@ -57,9 +57,9 @@ @return A managed repository object. """ - import repository + import manrepo - managed = repository.Repository() + managed = manrepo.Repository() if args.repository: managed.StorageName = args.repository @@ -75,7 +75,7 @@ def main(args): import argparse - import repository + import manrepo import manager if not is_hgWeb_user():
--- a/src/manager.py Mon Jul 21 23:32:52 2014 -0500 +++ b/src/manager.py Mon Jul 21 23:35:28 2014 -0500 @@ -23,7 +23,7 @@ """ IMPORTS """ -import repository +import manrepo from hwm import settings
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/manrepo.py Mon Jul 21 23:35:28 2014 -0500 @@ -0,0 +1,74 @@ +#!/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/>. *** +#******************************************************************************* + +class Repository(object): + # The directory name of the managed repository. + __storageName = None + # The displayed web-site name of the managed repository. + __displayName = None + # The displayed web-site description of the managed repository. + __description = None + # The displayed web-site contact information of the managed repository. + __contact = None + + @property + def StorageName(self): + """ Gets the name of the directory where the managed repository is located. """ + return self.__storageName + @StorageName.setter + def StorageName(self, value): + """ Sets the name of the directory with a supplied name. """ + self.__storageName = value + + @property + def DisplayName(self): + """ Gets the name to display for the managed repository. """ + return self.__displayName + @DisplayName.setter + def DisplayName(self, value): + """ Sets the name of the managed repository to display. """ + self.__displayName = value + + @property + def Description(self): + """ Gets the description of the managed repository. """ + return self.__description + @Description.setter + def Description(self, value): + """ Sets the description of the managed repository to display. """ + self.__description = value + + @property + def Contact(self): + """ Gets the contact point for the managed repository. """ + return self.__contact + @Contact.setter + def Contact(self, value): + """ Sets the contact point for the managed repository. """ + self.__contact = value + + def __init__(self): + """ Initialises the object with default values. """ + self.__storageName = None + self.__displayName = None + self.__description = None + self.__contact = None
--- a/src/repository.py Mon Jul 21 23:32:52 2014 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -#!/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/>. *** -#******************************************************************************* - -class Repository(object): - # The directory name of the managed repository. - __storageName = None - # The displayed web-site name of the managed repository. - __displayName = None - # The displayed web-site description of the managed repository. - __description = None - # The displayed web-site contact information of the managed repository. - __contact = None - - @property - def StorageName(self): - """ Gets the name of the directory where the managed repository is located. """ - return self.__storageName - @StorageName.setter - def StorageName(self, value): - """ Sets the name of the directory with a supplied name. """ - self.__storageName = value - - @property - def DisplayName(self): - """ Gets the name to display for the managed repository. """ - return self.__displayName - @DisplayName.setter - def DisplayName(self, value): - """ Sets the name of the managed repository to display. """ - self.__displayName = value - - @property - def Description(self): - """ Gets the description of the managed repository. """ - return self.__description - @Description.setter - def Description(self, value): - """ Sets the description of the managed repository to display. """ - self.__description = value - - @property - def Contact(self): - """ Gets the contact point for the managed repository. """ - return self.__contact - @Contact.setter - def Contact(self, value): - """ Sets the contact point for the managed repository. """ - self.__contact = value - - def __init__(self): - """ Initialises the object with default values. """ - self.__storageName = None - self.__displayName = None - self.__description = None - self.__contact = None