Exemplo n.º 1
0
    def update(self):
        svnclient = SVNLogClient(self.url, username=self.username, 
                password=self.password)
        try:
            laststoredrev = self.getLastStoredRev()
            rootUrl = svnclient.getRootUrl()
            (startrev, endrev) = svnclient.findStartEndRev(None, None)
            startrev = max(startrev, laststoredrev+1)

            if startrev <= endrev:
                self.convert(svnclient, startrev, endrev)

            self.save()
        except Exception as e:
            logger.error('Exception updating project - %s' % e)
Exemplo n.º 2
0
 def update(self):
     '''
     update project statistics
     '''
     svnclient = SVNLogClient(self.repository, BINARYFILEXT, username=self.username, password=self.password)
     #import pdb; pdb.set_trace()
     try:
         laststoredrev = self.getLastStoredRev()
         rootUrl = svnclient.getRootUrl()
         (startrevno, endrevno) = svnclient.findStartEndRev(None, None)
         startrevno = max(startrevno, laststoredrev+1)
         
         self.updating = True
         self.updatedate = datetime.datetime.now()
         self.save()
         if startrevno <= endrevno:
             self.ConvertRevs(svnclient, startrevno, endrevno)
         self.updatedate = datetime.datetime.now()
         self.updating = False
         self.save()
         
     except Exception as e:
         print 'Exception updating project'
         print e