Example #1
0
 def check_for_local_changes(self):
     
     svn_client = get_svn_client()
     statuses = svn_client.status(self.project_dir)
     
     for status in statuses:
         if status['text_status'] != pysvn.wc_status_kind.normal:
             return True
     return False
Example #2
0
 def needs_update(self):
     
     if not os.path.exists(self.project_dir):
         return True
     
     svn_client = get_svn_client()
     
     statuses = svn_client.status(self.project_dir, get_all = False, update = True)
     
     return len(statuses)
Example #3
0
 def update_svn(self):
     
     # check that the checkout dir exists
     
     if not os.path.exists(self.project_dir):
         os.makedirs(self.project_dir)
     
     # get a checkout
     svn_client = get_svn_client()
     
     # work out if we need to update or checkout
     if os.path.exists(os.path.join(self.project_dir, '.svn')):
         svn_client.update(self.project_dir)
     else:
         svn_client.checkout(self.svn_url, self.project_dir)
Example #4
0
 def commit(self, message):
     
     svn_client = get_svn_client()
     svn_client.checkin(self.project_dir, message)