ajack 2004/04/30 11:55:07
Modified: python/gump/model project.py module.py
python/gump preview.py
python/gump/core gumprun.py engine.py
python/gump/document/forrest documenter.py
Log:
Work on preview (for gmp preview) to show what would occur if a
gump run were to be performed on a given project expressions
against a workspace.
Shows projects, project Sequence (Stack), modules, module Sequence (Stack) and
repositories.
Shows the command lines (plus env) for checkout, update and build.
Revision Changes Path
1.80 +2 -4 gump/python/gump/model/project.py
Index: project.py
===================================================================
RCS file: /home/cvs/gump/python/gump/model/project.py,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- project.py 24 Apr 2004 15:25:18 -0000 1.79
+++ project.py 30 Apr 2004 18:55:07 -0000 1.80
@@ -1050,10 +1050,8 @@
try:
syscp=os.environ['CLASSPATH']
except:
- syscp=''
-
- sysClasspath.importFlattenedParts(syscp)
-
+ syscp=''
+ sysClasspath.importFlattenedParts(syscp)
return sysClasspath
#
1.43 +3 -0 gump/python/gump/model/module.py
Index: module.py
===================================================================
RCS file: /home/cvs/gump/python/gump/model/module.py,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- module.py 22 Apr 2004 22:58:16 -0000 1.42
+++ module.py 30 Apr 2004 18:55:07 -0000 1.43
@@ -520,6 +520,9 @@
# :TODO: Make configurable
return 'http://cvs.apache.org/viewcvs.cgi/gump/' + location
+ def isUpdatable(self):
+ return self.hasCvs() or self.hasSvn() or self.hasJars()
+
def hasCvs(self):
if hasattr(self,'cvs') and self.cvs: return 1
return 0
1.3 +24 -4 gump/python/gump/preview.py
Index: preview.py
===================================================================
RCS file: /home/cvs/gump/python/gump/preview.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- preview.py 16 Apr 2004 17:28:38 -0000 1.2
+++ preview.py 30 Apr 2004 18:55:07 -0000 1.3
@@ -62,9 +62,29 @@
workspace=WorkspaceLoader().load(ws, options.isCache())
# The Run Details...
- run=GumpRun(workspace,ps,options)
-
+ run=GumpRun(workspace,ps,options)
run.dump()
-
+
+ # Display some interesting things...
+ # E.g. command lines, env
+ # :TODO:
+
+ for module in run.getGumpSet().getModules():
+ print "-------------------------------------------------------------"
+ print "Module : " + `module` + "\n"
+ if module.isUpdatable():
+ (repository, root, command ) = module.getUpdateCommand(0)
+ command.dump()
+
+ (repository, root, command ) = module.getUpdateCommand(1)
+ command.dump()
+
+ for project in run.getGumpSet().getProjects():
+ print "-------------------------------------------------------------"
+ print "Project : " + `project` + "\n"
+ if project.hasBuildCommand():
+ command=project.getBuildCommand()
+ command.dump()
+
# bye!
sys.exit(result)
1.3 +1 -0 gump/python/gump/core/gumprun.py
Index: gumprun.py
===================================================================
RCS file: /home/cvs/gump/python/gump/core/gumprun.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gumprun.py 22 Apr 2004 22:58:16 -0000 1.2
+++ gumprun.py 30 Apr 2004 18:55:07 -0000 1.3
@@ -330,6 +330,7 @@
def dumpList(self,list,title,indent=0,output=sys.stdout):
""" Display a single list """
i=getIndent(indent)
+ output.write('\n')
output.write(i + title + '[' + str(len(list)) + '] : \n')
idx=0
for object in list:
1.7 +1 -3 gump/python/gump/core/engine.py
Index: engine.py
===================================================================
RCS file: /home/cvs/gump/python/gump/core/engine.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- engine.py 27 Apr 2004 22:12:28 -0000 1.6
+++ engine.py 30 Apr 2004 18:55:07 -0000 1.7
@@ -230,9 +230,7 @@
# self.performModulePackageProcessing(module)
continue
- if not module.hasCvs() \
- and not module.hasSvn() \
- and not module.hasJars(): continue
+ if not isUpdatable(): continue
log.info('Perform CVS/SVN/Jars Update on #[' + `moduleNo` + \
'] of [' + `moduleCount` + ']: ' + module.getName())
1.22 +3 -0 gump/python/gump/document/forrest/documenter.py
Index: documenter.py
===================================================================
RCS file: /home/cvs/gump/python/gump/document/forrest/documenter.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- documenter.py 30 Apr 2004 18:09:12 -0000 1.21
+++ documenter.py 30 Apr 2004 18:55:07 -0000 1.22
@@ -1773,6 +1773,9 @@
if not paths:
pathTable.createLine('No ' + title + ' entries')
+
+
+ self.documentAnnotations(pathSection,classpath)
def
documentDependenciesPath(self,xdocNode,title,path,dependees,full,referencingObject,gumpSet):
# :TODO: show start and end?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]