You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gump.apache.org by bo...@apache.org on 2009/02/13 06:11:13 UTC
svn commit: r743987 - in /gump/trunk/python/gump:
actor/document/xdocs/documenter.py core/model/module.py
Author: bodewig
Date: Fri Feb 13 05:11:13 2009
New Revision: 743987
URL: http://svn.apache.org/viewvc?rev=743987&view=rev
Log:
change documenter to be more generic when documenting the SCM
Modified:
gump/trunk/python/gump/actor/document/xdocs/documenter.py
gump/trunk/python/gump/core/model/module.py
Modified: gump/trunk/python/gump/actor/document/xdocs/documenter.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/actor/document/xdocs/documenter.py?rev=743987&r1=743986&r2=743987&view=diff
==============================================================================
--- gump/trunk/python/gump/actor/document/xdocs/documenter.py (original)
+++ gump/trunk/python/gump/actor/document/xdocs/documenter.py Fri Feb 13 05:11:13 2009
@@ -1645,36 +1645,38 @@
module, \
repoList.createEntry( "Repository: ") )
- if module.hasCvs():
- if module.getScm().hasModule():
- repoList.createEntry( "CVS Module: ", module.getScm().getModule())
+ scm = module.getScm()
+ if scm:
+ scmName = scm.getScmName()
+ if scm.hasDir():
+ repoList.createEntry(scmName + " Directory: ", scm.getDir())
+ if scm.getScmType() == 'cvs':
+ if scm.hasModule():
+ repoList.createEntry(scmName + " Module: ",
+ scm.getModule())
- if module.getScm().hasTag():
- repoList.createEntry( "CVS Tag: ", module.getScm().getTag())
-
- if module.getScm().hasDir():
- repoList.createEntry( "CVS Dir: ", module.getScm().getDir())
-
- if module.getScm().hasHostPrefix():
- repoList.createEntry( "CVS Host Prefix: ", module.getScm().getHostPrefix())
+ if scm.hasTag():
+ repoList.createEntry(scmName + " Tag: ", scm.getTag())
+
+ if scm.hasHostPrefix():
+ repoList.createEntry(scmName + " Host Prefix: ",
+ scm.getHostPrefix())
- repoList.createEntry( "CVSROOT: ", module.getScm().getCvsRoot())
+ repoList.createEntry("CVSROOT: ", scm.getCvsRoot())
+
+ elif scm.getScmType() == 'p4':
+ if scm.hasTag():
+ repoList.createEntry(scmName + " Tag: ", scm.getTag())
- if module.hasSvn():
- if module.getScm().hasDir():
- repoList.createEntry( "SVN Directory: ", module.getScm().getDir())
- repoList.createEntry( "SVN URL: ", module.getScm().getRootUrl())
+ repoList.createEntry(scmName + " Port: ", scm.getPort())
+ repoList.createEntry(scmName + " Clientspec: ",
+ scm.getClientspec())
- if module.hasGit():
- if module.getScm().hasDir():
- repoList.createEntry( "GIT Directory: ", module.getScm().getDir())
- repoList.createEntry( "GIT URL: ", module.getScm().getRootUrl())
+ repoList.createEntry(scmName + " URL: ", scm.getRootUrl())
- if module.hasArtifacts():
- if module.getScm().hasUrl():
- repoList.createEntry( "Jars URL: ", module.artifacts.getUrl())
- repoList.createEntry('Redistributable: ', module.isRedistributable())
+ repoList.createEntry('Redistributable: ',
+ module.isRedistributable())
document.serialize()
document=None
Modified: gump/trunk/python/gump/core/model/module.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/core/model/module.py?rev=743987&r1=743986&r2=743987&view=diff
==============================================================================
--- gump/trunk/python/gump/core/model/module.py (original)
+++ gump/trunk/python/gump/core/model/module.py Fri Feb 13 05:11:13 2009
@@ -45,7 +45,7 @@
def getRootUrl(self):
url = self.repository.getUrl()
- if self.hasDir():
+ if url and self.hasDir():
url += self.getDir()
return url
@@ -62,6 +62,9 @@
def getScmType(self):
return self.type
+ def getScmName(self):
+ return self.repository.getType()
+
class ModuleCvs(ModuleScm):
def __init__(self,dom,repository):
ModuleScm.__init__(self, dom, repository)