/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
DybPython::aux::auxlog::AuxLog Class Reference

List of all members.

Public Member Functions

def __init__
def tabrevdict
def load

Public Attributes

 svnlog

Detailed Description

SVNLog history keyed by revision 

Definition at line 33 of file auxlog.py.


Constructor & Destructor Documentation

def DybPython::aux::auxlog::AuxLog::__init__ (   self,
  author = None,
  predicate = None,
  table = None 
)

Definition at line 37 of file auxlog.py.

00038                                                                 :
00039         dict.__init__(self)
00040         self.svnlog = self.load()
00041 
00042         if author:
00043             commits = filter(lambda e:e.author==author,self.svnlog)
00044         elif predicate:
00045             commits = filter(predicate,self.svnlog)        
00046         else:
00047             commits = self.svnlog 
00048 
00049         revs    = sorted(map(lambda e:int(str(e.revision)), commits ))
00050         log.info("auxlog commits/revs: %s %s " % ( len(commits), len(revs)) )
00051 
00052         for e in commits:
00053             tabs = map(lambda p:os.path.basename(p.path)[:-4], e)
00054             tabs.remove('LOCALSEQNO')
00055             assert len(tabs) % 2 == 0 , ("should be even ", tabs)
00056 
00057             tabs = map(lambda t:str(t[:-3]), filter(lambda t:t[-3:] == 'Vld', tabs ))
00058             d = dict(tabs=tabs, author=e.author, msg=e.msg.replace("\n"," "), t=e.t )
00059             if table == None or table in tabs:
00060                 self[int(e.revision)] = d
00061             else:
00062                 pass
00063                 #log.info("skipping %s " % d )
00064 
00065         #self.commits = commits
00066         #self.revs = revs


Member Function Documentation

def DybPython::aux::auxlog::AuxLog::tabrevdict (   self)
Return dict keyed by table name containing dybaux revision numbers that effect the table

Definition at line 67 of file auxlog.py.

00068                         :
00069         """
00070         Return dict keyed by table name containing dybaux revision numbers that effect the table
00071         """
00072         tt = {}
00073         for rev in sorted(self):
00074             sr = self[rev]
00075             #print "%-5s %-10s %-30s %s " % ( rev, sr['author'], sr['tabs'], sr['msg'] )
00076             for tab in self[rev]['tabs']:
00077                 if tab not in tt:
00078                     tt[tab] = [] 
00079                 tt[tab].append( rev )        
00080         return tt
00081 

def DybPython::aux::auxlog::AuxLog::load (   self,
  baseurl = "http://dayabay.ihep.ac.cn/svn/dybaux",
  revs = "3000:HEAD" 
)

Definition at line 82 of file auxlog.py.

00082                                  ://dayabay.ihep.ac.cn/svn/dybaux" , revs="3000:HEAD" ):
00083         xmlcache = "%s/svnlog%s.xml" % ( tmpdir(), hash((baseurl,revs)))  ## FIXME: HEAD is not a good thing to hash key 
00084         log.info("using cache %s " % xmlcache )
00085         return SVNLog( baseurl, revs, dict(limit=20000, xmlcache=path_(xmlcache) ) )
00086 
00087 

Member Data Documentation

Definition at line 37 of file auxlog.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:40 for DybPython by doxygen 1.7.4