Commits

Manabu TERADA  committed 5ff7e7f

Don't get repo, if main_branch is null. [Manabu TERADA]

  • Participants
  • Parent commits 4ca2742
  • Tags 1.0a2

Comments (0)

Files changed (3)

+1.0a2 (2012-01-08)
+----------------------
+
+- Don't get repo, if main_branch is null. [Manabu TERADA]
+
 1.0a1 (2012-01-08)
 ---------------------
 

File c2/recipe/bitbucketbk/backuprunner.py

 
     repos = json.load(bitbucket_obj).get('repositories', [])
     for repo in repos:
-        yield repo.get('name', None), repo.get('scm', '')
+        yield repo.get('name', None), repo.get('scm', ''), repo.get('main_branch', 'null')
 
 def has_repo(repo_name, location):
     if repo_name in os.listdir(location):
     """Main method, gets called by generated bin/bitbucketbk.
     """
     repos = get_repositories(username, password)
-    for repo_name, scm in repos:
+    for repo_name, scm, main_branch in repos:
+        if main_branch == 'null':
+            continue
         if scm == u"hg":
             base_url = BITBUCKET_BASE_URL % {'user' : username, 'passwd' : password}
             repo_url = base_url + username + u'/' + repo_name.lower()
 def read(*rnames):
     return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
 
-version = '1.0a1'
+version = '1.0a2'
 
 long_description = (
     read('README.txt')