/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/plugins/propose/gitlabs.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2019-10-13 15:54:23 UTC
  • mfrom: (7397.1.2 propose-fixes)
  • Revision ID: breezy.the.bot@gmail.com-20191013155423-ka18kpgkongho53h
Fix forking on GitHub/GitLab.

Merged from https://code.launchpad.net/~jelmer/brz/propose-fork/+merge/373703

Show diffs side-by-side

added added

removed removed

Lines of Context:
301
301
        if response.status not in (200, 201):
302
302
            raise errors.InvalidHttpResponse(path, response.text)
303
303
        # The response should be valid JSON, but let's ignore it
304
 
        json.loads(response.data)
 
304
        project = json.loads(response.data)
305
305
        # Spin and wait until import_status for new project
306
306
        # is complete.
307
307
        deadline = time.time() + timeout
308
 
        while True:
309
 
            project = self._get_project(project_name)
310
 
            if project['import_status'] in ('finished', 'none'):
311
 
                return project
 
308
        while project['import_status'] not in ('finished', 'none'):
312
309
            mutter('import status is %s', project['import_status'])
313
310
            if time.time() > deadline:
314
311
                raise Exception('timeout waiting for project to become available')
315
312
            time.sleep(interval)
 
313
            project = self._get_project(project['path_with_namespace'])
 
314
        return project
316
315
 
317
316
    def _get_logged_in_username(self):
318
317
        return self._current_user['username']