/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Public Attributes | Static Public Attributes | Properties | Static Private Attributes
DybPython::dbsvn::Msg Class Reference
Collaboration diagram for DybPython::dbsvn::Msg:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def validate_annotation_xref
def __init__
def __repr__

Public Attributes

 msg

Static Public Attributes

string baseurl = "http://dayabay.ihep.ac.cn/svn/dybsvn"
string tracurl = "http://dayabay.ihep.ac.cn/tracs/dybsvn"

Properties

 logurl = property(lambda self:os.path.join(self.tracurl,"log", self['path'] ))

Static Private Attributes

tuple _ptn = re.compile("(?P<link>dybsvn:source:(?P<path>dybgaudi/trunk/(?P<relpath>\S*))\@(?P<rev>\d*))\s*")

Detailed Description

A valid DBI update commit message contains a link of the form::

    dybsvn:source:dybgaudi/trunk/Database/DybDbiTest/tests/README@9716 

Note that the link must start ``dybsvn:source:dybgaudi/trunk`` and that 
when multiple valid links are included only the first is acted upon. 

The link provides crucial association between a DB update 
and the package and revision of the code used in the preparation 
and invokation of the update.

Dummy links will be denied, a real path that was modified at the specified 
revision is required.

Definition at line 277 of file dbsvn.py.


Constructor & Destructor Documentation

def DybPython::dbsvn::Msg::__init__ (   self,
  msg 
)

Definition at line 322 of file dbsvn.py.

00323                             :
00324         dict.__init__(self)
00325         self.msg = msg
00326         m = self._ptn.search( msg )
00327         assert m, "DID NOT FIND VALID ANNOTAION LINK IN MESSAGE %s  " % self.msg + self.__doc__
00328         self.update( m.groupdict() )


Member Function Documentation

def DybPython::dbsvn::Msg::validate_annotation_xref (   self,
  refpath,
  refcreds 
)
Check that the annotation link points to a valid changed annotation file in xref repository  

Definition at line 299 of file dbsvn.py.

00300                                                             :
00301         """ 
00302         Check that the annotation link points to a valid changed annotation file in xref repository  
00303         """
00304         revision = self.get('rev', None)
00305         path     = self.get('path', None)
00306         assert revision and path , "failed to find annotation link path and revision in commit message "
00307 
00308         if refpath.startswith("http:"):
00309             xmd = SVN( path=refpath , revision=revision, creds=refcreds )         
00310         elif os.path.exists(refpath):
00311             xmd = SVNLook( repo_path=refpath , revision=revision )
00312         else:
00313             assert 0, "refpath is invalid %s " % refpath
00314         changed = xmd.changed
00315 
00316         errmsg = lambda:"\n".join([
00317                     "INVALID COMMIT MESSAGE",
00318                     "referenced repository path \"%s\" was not touched by revision \"%s\"" % ( path, revision) , 
00319                     "the below paths were changed in this revision... ",] + changed + 
00320                     ["", "check trac url %s to find valid links/revisions " % self.logurl ,"" ]  )
00321         assert path in changed, errmsg()

def DybPython::dbsvn::Msg::__repr__ (   self)

Definition at line 329 of file dbsvn.py.

00330                       :
00331         return "Msg %s %r " % ( self.msg, dict.__repr__(self) ) 
00332 
00333 


Member Data Documentation

string DybPython::dbsvn::Msg::baseurl = "http://dayabay.ihep.ac.cn/svn/dybsvn" [static]

Definition at line 294 of file dbsvn.py.

string DybPython::dbsvn::Msg::tracurl = "http://dayabay.ihep.ac.cn/tracs/dybsvn" [static]

Definition at line 295 of file dbsvn.py.

tuple DybPython::dbsvn::Msg::_ptn = re.compile("(?P<link>dybsvn:source:(?P<path>dybgaudi/trunk/(?P<relpath>\S*))\@(?P<rev>\d*))\s*") [static, private]

Definition at line 296 of file dbsvn.py.

Definition at line 322 of file dbsvn.py.


Property Documentation

DybPython::dbsvn::Msg::logurl = property(lambda self:os.path.join(self.tracurl,"log", self['path'] )) [static]

Definition at line 297 of file dbsvn.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:55:41 for DybPython by doxygen 1.7.4