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 testGetGit(self):
     scms = SCMFactory()
     self.destroy(name='svn')
     self.assertEqual(scms.get_scm_from_sandbox(self.packagedir).name, 'git')
Beispiel #4
0
 def testGetSubversion(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_sandbox(self.clonedir).name, 'svn')
 def testGetMercurial(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_sandbox(self.packagedir).name, 'hg')