You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by aj...@apache.org on 2004/02/12 14:41:53 UTC
cvs commit: jakarta-gump/python/gump/test model.py
ajack 2004/02/12 05:41:53
Modified: python/gump/model module.py
python/gump/test/resources/full1 module2.xml module1.xml
python/gump/test model.py
Log:
Handle tag off <cvs or <module
Revision Changes Path
1.32 +17 -9 jakarta-gump/python/gump/model/module.py
Index: module.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/model/module.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- module.py 10 Feb 2004 19:20:44 -0000 1.31
+++ module.py 12 Feb 2004 13:41:52 -0000 1.32
@@ -599,14 +599,23 @@
#
cmd.addParameter('-d', root)
+ #
+ # Determine if a tag is set, on <cvs or on <module
+ #
+ tag=None
+ if self.cvs.hasTag():
+ tag=self.cvs.getTag()
+ elif self.hasTag():
+ tag=self.getTag()
+
if exists:
# do a cvs update
cmd.addParameter('update')
cmd.addParameter('-P')
cmd.addParameter('-d')
- if self.cvs.hasTag() or self.hasTag():
- cmd.addParameter('-r',self.cvs.getTag() or self.getTag(),' ')
+ if tag:
+ cmd.addParameter('-r',tag,' ')
else:
cmd.addParameter('-A')
cmd.addParameter(self.getName())
@@ -616,8 +625,8 @@
# do a cvs checkout
cmd.addParameter('checkout')
cmd.addParameter('-P')
- if self.cvs.hasTag() or self.hasTag():
- cmd.addParameter('-r',self.cvs.getTag() or self.getTag(),' ')
+ if tag:
+ cmd.addParameter('-r',tag,' ')
if not self.cvs.hasModule() or \
not self.cvs.getModule() == self.getName():
@@ -626,8 +635,7 @@
if self.cvs.hasModule():
cmd.addParameter(self.cvs.getModule())
else:
- cmd.addParameter(self.getName())
-
+ cmd.addParameter(self.getName())
return (self.repository, root, cmd)
1.12 +1 -1 jakarta-gump/python/gump/test/resources/full1/module2.xml
Index: module2.xml
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/test/resources/full1/module2.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- module2.xml 5 Feb 2004 05:43:56 -0000 1.11
+++ module2.xml 12 Feb 2004 13:41:52 -0000 1.12
@@ -1,4 +1,4 @@
-<module name="module2">
+<module name="module2" tag="module1Tag">
<url href="http://jakarta.apache.org/gump/index.html"/>
<description>
1.6 +1 -1 jakarta-gump/python/gump/test/resources/full1/module1.xml
Index: module1.xml
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/test/resources/full1/module1.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- module1.xml 28 Jan 2004 22:54:50 -0000 1.5
+++ module1.xml 12 Feb 2004 13:41:52 -0000 1.6
@@ -5,7 +5,7 @@
Module 1
</description>
- <cvs repository="repository1"/>
+ <cvs repository="repository1" tag="module1Tag"/>
<nag from="Ms. Dev 1 <dev1@jakarta.apache.org>"
to="project1@jakarta.apache.org"/>
1.13 +3 -0 jakarta-gump/python/gump/test/model.py
Index: model.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/test/model.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- model.py 9 Jan 2004 19:57:19 -0000 1.12
+++ model.py 12 Feb 2004 13:41:52 -0000 1.13
@@ -148,10 +148,13 @@
def testCvs(self):
module1=self.module1
+ module2=self.module2
self.assertTrue('Module has CVS', module1.hasCvs())
self.assertFalse('Module has NOT SVN', module1.hasSvn())
self.assertNonZeroString('CVSROOT',module1.cvs.getCvsRoot())
+ self.assertNonZeroString('Has Tag',module1.cvs.getTag())
+ self.assertNonZeroString('Has Tag',module2.getTag())
def testSvn(self):
svnmodule1= self.workspace.getModule('svn_module1')