gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r743993 - in /gump/trunk/python/gump: core/model/module.py test/model.py
Date Fri, 13 Feb 2009 05:33:40 GMT
Author: bodewig
Date: Fri Feb 13 05:33:39 2009
New Revision: 743993

URL: http://svn.apache.org/viewvc?rev=743993&view=rev
Log:
remove hasCvs and friends

Modified:
    gump/trunk/python/gump/core/model/module.py
    gump/trunk/python/gump/test/model.py

Modified: gump/trunk/python/gump/core/model/module.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/core/model/module.py?rev=743993&r1=743992&r2=743993&view=diff
==============================================================================
--- gump/trunk/python/gump/core/model/module.py (original)
+++ gump/trunk/python/gump/core/model/module.py Fri Feb 13 05:33:39 2009
@@ -720,21 +720,6 @@
     def isUpdatable(self):
         return len(self.scms) > 0
                 
-    def hasCvs(self):
-        return 'cvs' in self.scms
-        
-    def hasSvn(self):
-        return 'svn' in self.scms
-        
-    def hasP4(self):
-        return 'p4' in self.scms
-        
-    def hasArtifacts(self):
-        return 'artifacts' in self.scms
-        
-    def hasGit(self):
-        return 'git' in self.scms
-        
     # Where the contents (at the repository) Modified?
     def isModified(self):
         return self.modified
@@ -765,13 +750,13 @@
         # CVS over svn over P4 over GIT and artifacts last
 
         # will be swapped against a list based version later
-        if self.hasCvs():
+        if 'cvs' in self.scms:
             return self.scms['cvs']
-        if self.hasSvn():
+        if 'svn' in self.scms:
             return self.scms['svn']
-        if self.hasP4():
+        if 'p4' in self.scms:
             return self.scms['p4']
-        if self.hasGit():
+        if 'git' in self.scms:
             return self.scms['git']
         return self.scms.get('artifacts')
 

Modified: gump/trunk/python/gump/test/model.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/test/model.py?rev=743993&r1=743992&r2=743993&view=diff
==============================================================================
--- gump/trunk/python/gump/test/model.py (original)
+++ gump/trunk/python/gump/test/model.py Fri Feb 13 05:33:39 2009
@@ -166,8 +166,8 @@
         module1=self.module1
         module2=self.module2
         
-        self.assertTrue('Module has CVS', module1.hasCvs())
-        self.assertFalse('Module has NOT SVN', module1.hasSvn())
+        self.assertTrue('Module has CVS',
+                        module1.getScm().getScmType() == 'cvs')
         self.assertNonZeroString('CVSROOT',module1.cvs.getCvsRoot())
         self.assertNonZeroString('Has Tag',module1.cvs.getTag())
         self.assertNonZeroString('Has Tag',module2.getTag())
@@ -175,8 +175,8 @@
     def testSvn(self):
         svnmodule1= self.workspace.getModule('svn_module1')
         
-        self.assertTrue('Module has SVN', svnmodule1.hasSvn())
-        self.assertFalse('Module has NOT CVS', svnmodule1.hasCvs())
+        self.assertTrue('Module has SVN',
+                        module1.getScm().getScmType() == 'svn')
         self.assertNonZeroString('SVN URL',svnmodule1.svn.getRootUrl())
         self.assertTrue('SVN Dir',svnmodule1.svn.hasDir())
     



Mime
View raw message