예제 #1
0
    def fetch_svn(self, svn_uri, directory):
        """Fetch subversion repository.

        @param svn_uri: subversion repository uri to check out
        @type svn_uri: string

        @param directory: directory to download to
        @type directory: string

        """
        if not command_successful(['svn', '--version']):
            raise YolkException('Do you have subversion installed?')
        if os.path.exists(directory):
            raise YolkException(
                'Checkout directory exists - {}'.format(directory))
        try:
            os.mkdir(directory)
        except OSError as err_msg:
            raise YolkException('' + str(err_msg))
        cwd = os.path.realpath(os.curdir)
        os.chdir(directory)
        status, _ = run_command(['svn', 'checkout', svn_uri])
        os.chdir(cwd)
예제 #2
0
파일: cli.py 프로젝트: michael-yin/yolk
    def fetch_svn(self, svn_uri, directory):
        """Fetch subversion repository.

        @param svn_uri: subversion repository uri to check out
        @type svn_uri: string

        @param directory: directory to download to
        @type directory: string

        """
        if not command_successful(['svn', '--version']):
            raise YolkException('Do you have subversion installed?')
        if os.path.exists(directory):
            raise YolkException(
                'Checkout directory exists - {}'.format(directory))
        try:
            os.mkdir(directory)
        except OSError as err_msg:
            raise YolkException('' + str(err_msg))
        cwd = os.path.realpath(os.curdir)
        os.chdir(directory)
        status, _ = run_command(['svn', 'checkout', svn_uri])
        os.chdir(cwd)
예제 #3
0
파일: cli.py 프로젝트: 123mahesh/portfolio
        if not command_successful("svn --version"):
            self.logger.error("ERROR: Do you have subversion installed?")
            return 1
        if os.path.exists(directory):
            self.logger.error("ERROR: Checkout directory exists - %s" \
                    % directory)
            return 1
        try:
            os.mkdir(directory)
        except OSError, err_msg:
            self.logger.error("ERROR: " + str(err_msg))
            return 1
        cwd = os.path.realpath(os.curdir)
        os.chdir(directory)
        self.logger.info("Doing subversion checkout for %s" % svn_uri)
        status, output = run_command("/usr/bin/svn co %s" % svn_uri)
        self.logger.info(output)
        os.chdir(cwd)
        self.logger.info("subversion checkout is in directory './%s'" \
                % directory)
        return 0

    def browse_website(self, browser=None):
        """
        Launch web browser at project's homepage

        @param browser: name of web browser to use
        @type browser: string

        @returns: 0 if homepage found, 1 if no homepage found
        """
예제 #4
0
파일: cli.py 프로젝트: sharat910/eduapp
        if not command_successful("svn --version"):
            self.logger.error("ERROR: Do you have subversion installed?")
            return 1
        if os.path.exists(directory):
            self.logger.error("ERROR: Checkout directory exists - %s" \
                    % directory)
            return 1
        try:
            os.mkdir(directory)
        except OSError, err_msg:
            self.logger.error("ERROR: " + str(err_msg))
            return 1
        cwd = os.path.realpath(os.curdir)
        os.chdir(directory)
        self.logger.info("Doing subversion checkout for %s" % svn_uri)
        status, output = run_command("/usr/bin/svn co %s" % svn_uri)
        self.logger.info(output)
        os.chdir(cwd)
        self.logger.info("subversion checkout is in directory './%s'" \
                % directory)
        return 0

    def browse_website(self, browser=None):
        """
        Launch web browser at project's homepage

        @param browser: name of web browser to use
        @type browser: string

        @returns: 0 if homepage found, 1 if no homepage found
        """