def _check_for_updates(self, url): branch = 'master' remote = 'origin' repo = self._setup_repo(url, remote=remote) logger.debug('pulling changes') origin = repo.remote(remote) if not repo.heads: if self._out_of_date(): origin.pull(branch) else: info = origin.fetch() if info: info = info[0] logger.debug('local commit ={}'.format(repo.head.commit)) logger.debug('remote commit ={}'.format(info.commit)) self.application.set_revisions(repo.head.commit, info.commit) if info.commit != repo.head.commit: self._load_available_changes(repo) if self._out_of_date(): #for debug dont pull changes #=========================== # origin.pull('master') #=========================== if confirmation_dialog('Restarted required for changes to take affect. Restart now?'): self._build_required = True logger.debug('Restarting')
def _check_for_updates(self, url): branch = 'master' remote = 'origin' repo = self._setup_repo(url, remote=remote) logger.debug('pulling changes') origin = repo.remote(remote) if not repo.heads: if self._out_of_date(): origin.pull(branch) else: info = origin.fetch() if info: info = info[0] logger.debug('local commit ={}'.format(repo.head.commit)) logger.debug('remote commit ={}'.format(info.commit)) self.application.set_revisions(repo.head.commit, info.commit) if info.commit != repo.head.commit: self._load_available_changes(repo) if self._out_of_date(): #for debug dont pull changes #=========================== # origin.pull('master') #=========================== if confirmation_dialog( 'Restarted required for changes to take affect. Restart now?' ): self._build_required = True logger.debug('Restarting')
def _out_of_date(self): logger.info('updates are available') if confirmation_dialog('Updates are available. Would you like to install'): return True
def _out_of_date(self): logger.info('updates are available') if confirmation_dialog( 'Updates are available. Would you like to install'): return True