Commits

Manabu TERADA committed de49b71

ignore Don't get repo, if main_branch is null.

  • Participants
  • Parent commits 94a0186

Comments (0)

Files changed (4)

 *.pyo
 dist/*
 build/*
+eggs/*
+bin/*
 c2.recipe.bitbucketbk.egg-info/*
 .semantic.cache
 .DS_Store
 .DS_Store
 .svn
 .hg
-.hgignore
 .hgsvn
 .as2proj
 .as3proj
 Thumbs.db
-
+.idea/*
+develop-eggs/*

File buildout.cfg

 [buildout]
 develop = .
-parts = test
+parts =
+    test
+    bitbucketbk
 
 [test]
 recipe = zc.recipe.testrunner
 eggs = c2.recipe.bitbucketbk [tests]
 
+[bitbucketbk]
+recipe = c2.recipe.bitbucketbk
+username = terapyon
+password = 6543S555
+location = /Users/terapyon/dev/misc/c2.recipe.bitbucketbk/backup
+ignore_project =
+    fumbaro.wallpaper.cachesetting
+    sphinx-kobe
+    collective.sphinxuploader
+    misc_hg
+    myojin

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', ''), repo.get('main_branch', u'null')
+        yield repo.get('name', None), repo.get('scm', '')
 
 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, main_branch in repos:
+    for repo_name, scm, in repos:
         if repo_name in ignore_project:
             continue
-        if main_branch == u'null':
-            continue
         if scm == u"hg":
             base_url = BITBUCKET_BASE_URL % {'user' : username, 'passwd' : password}
             repo_url = base_url + username + u'/' + repo_name.lower()
       install_requires=['setuptools',
                         'zc.buildout',
                         'zc.recipe.egg',
+                        'mercurial',
                         # -*- Extra requirements: -*-
                         ],
       tests_require=tests_require,