def _get_buildout_url():
    """Get the base buildout url
    """
    scm = SCMFactory()
    wc = scm.get_scm_from_sandbox(os.getcwd())
    sandbox_url = wc.get_url_from_sandbox(os.getcwd())
    base_dir = wc.get_base_url_from_sandbox(os.getcwd())
    return sandbox_url, base_dir
    def testGetGitifySubversion(self):
        """
        Support git-svn-helpers/gitify style dual git/svn checkouts/clones.
        """
        # Simulate a git-svn-helpers/gitify style dual svn/git checkout/clone
        svn_url = urlparse.urlunsplit(('file', '', self.packagedir, '', ''))
        git_svn_clonedir = self.clonedir + '.git-svn'
        process = Process(quiet=True)
        process.system(
            'git svn clone -s {0} {1}'.format(svn_url, git_svn_clonedir))
        os.rename(
            os.path.join(git_svn_clonedir, '.git'),
            os.path.join(self.clonedir, '.git'))

        scms = SCMFactory()
        self.assertEqual(scms.get_scm_from_url(svn_url).name, 'svn')
        self.assertEqual(scms.get_scm_from_sandbox(self.clonedir).name, 'svn')
Beispiel #3
0
 def testGetSubversion(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_type('svn').name, 'svn')
Beispiel #4
0
 def testGetHttpsGitHub(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_url('https://[email protected]/jondoe/foo').name, 'git')
Beispiel #5
0
 def testGetFromSandbox(self):
     scms = SCMFactory()
     self.destroy(name='svn')
     self.assertEqual(scms.get_scm(None, self.packagedir).name, 'hg')
Beispiel #6
0
 def testGetHttpsByPath(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_url('https://jarn.com/hg/public/foo').name, 'hg')
Beispiel #7
0
 def testGetSshByExtension(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_url('ssh://jarn.com/public/foo.git').name, 'git')
Beispiel #8
0
 def testGetSvnSsh(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_url('svn+ssh://').name, 'svn')
Beispiel #9
0
 def testGetSubversion(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_sandbox(self.clonedir).name, 'svn')
 def testGetFromUrl(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm(None, 'git://jarn.com/public').name, 'git')
 def testGetFromType(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm('git', self.packagedir).name, 'git')
 def testGetFromSandbox(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm(None, self.clonedir).name, 'svn')
 def testGetFromType(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm('svn', self.clonedir).name, 'svn')
 def testGetMercurial(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_sandbox(self.packagedir).name, 'hg')
Beispiel #15
0
 def testGetMercurial(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_type('hg').name, 'hg')
Beispiel #16
0
 def testGetGit(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_type('git').name, 'git')
 def testGetFromFileUrl(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm(None, 'file://'+self.packagedir).name, 'git')
Beispiel #18
0
 def testGetGit(self):
     scms = SCMFactory()
     self.destroy(name='svn')
     self.assertEqual(scms.get_scm_from_sandbox(self.packagedir).name, 'git')
 def testGetFromSshUrl(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm(None, '[email protected]:Jarn/jarn.mkrelease').name, 'git')
Beispiel #20
0
 def testGetRsync(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_url('rsync://').name, 'git')
 def testGetFromSandbox(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm(None, self.packagedir).name, 'git')
Beispiel #22
0
 def testGetHttpByHostWithUser(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_url('http://[email protected]/public/foo').name, 'hg')
Beispiel #23
0
 def scm(self):
     return SCMFactory().get_scm_from_type(self.name)
Beispiel #24
0
 def testGetRelativeFile(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_url('file:var/dist/public/foo.git').name, 'git')
Beispiel #25
0
 def testGetSshGitHub(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_url('ssh://[email protected]/jondoe/foo').name, 'git')