コード例 #1
0
 def __init__(self, repo_dir, do_clone, org='ros', repo='ros-overlay'):
     self.repo = RepoInstance(
         org, repo, repo_dir=repo_dir, do_clone=do_clone
     )
     self.branch_name = 'gentoo-bot-%s' % rand_ascii_str()
     info('Creating new branch {0}...'.format(self.branch_name))
     self.repo.create_branch(self.branch_name)
コード例 #2
0
 def __init__(self,
              repo_dir,
              do_clone,
              org='allenh1',
              repo='meta-ros',
              from_branch=''):
     self.repo = RepoInstance(org,
                              repo,
                              repo_dir,
                              do_clone,
                              from_branch=from_branch)
     self.branch_name = 'yocto-bot-%s' % rand_ascii_str()
     info('Creating new branch {0}...'.format(self.branch_name))
     self.repo.create_branch(self.branch_name)
コード例 #3
0
 def __init__(self,
              repo_dir,
              do_clone,
              org='ros',
              repo='ros-overlay',
              from_branch='',
              new_branch=True):
     self.repo = RepoInstance(org,
                              repo,
                              repo_dir=repo_dir,
                              do_clone=do_clone,
                              from_branch=from_branch)
     if new_branch:
         self.branch_name = 'gentoo-bot-%s' % rand_ascii_str()
         info('Creating new branch {0}...'.format(self.branch_name))
         self.repo.create_branch(self.branch_name)
     else:
         self.branch_name = None
コード例 #4
0
ファイル: test_utils.py プロジェクト: seanyen/superflore
 def test_rand_ascii_str(self):
     """Test the random ascii generation function"""
     rand = rand_ascii_str(100)
     self.assertEqual(len(rand), 100)
     self.assertTrue(all(c in string.ascii_letters for c in rand))