예제 #1
0
    def _git_wrapper_clone_helper(self,
                                  base_dir,
                                  url,
                                  branch,
                                  dest,
                                  remove_base_dir=False):
        clone_dir = _os.path.join(base_dir, dest)
        if not remove_base_dir:
            self._set_tear_down_cb(self._clone_tear_down_cb, clone_dir)
        else:
            self._set_tear_down_cb(self._clone_tear_down_cb, base_dir)

        git = GitWrapper(base_dir)
        git.clone(url, branch, dest)
        return
예제 #2
0
    def _git_wrapper_clone_helper(self,
                                  base_dir,
                                  url,
                                  branch,
                                  dest,
                                  remove_base_dir=False):
        clone_dir = _os.path.join(base_dir, dest)
        if not remove_base_dir:
            self._set_tear_down_cb(self._clone_tear_down_cb, clone_dir)
        else:
            self._set_tear_down_cb(self._clone_tear_down_cb, base_dir)

        git = GitWrapper(base_dir)
        git.clone(url, branch, dest)
        return
예제 #3
0
    def _exec_init(self, args):
        if self._is_client_initialized():
            raise CommandHandlerError('Error: Client is already initialized')

        # Download the manifest XML
        self._get_manifest_xml()

        # Parse the manifest XML
        self._parse_manifest_xml()

        # Get the Client Spec corresponding to the Command line argument
        client_spec = self._get_client_spec(args.client_spec)

        # Process each repo in the Client Spec
        for repo in client_spec.repo_list:
            git = GitWrapper(self._current_dir)
            git.clone(repo.url, repo.branch, repo.destination)

        # Create the client file, writing the following
        # The manifest file name
        # The client spec chosen
        self._store_client_info(args.client_spec)

        return
예제 #4
0
    def _exec_init(self, args):
        if self._is_client_initialized():
            raise CommandHandlerError('Error: Client is already initialized')

        # Download the manifest XML
        self._get_manifest_xml()

        # Parse the manifest XML
        self._parse_manifest_xml()

        # Get the Client Spec corresponding to the Command line argument
        client_spec = self._get_client_spec(args.client_spec)

        # Process each repo in the Client Spec
        for repo in client_spec.repo_list:
            git = GitWrapper(self._current_dir)
            git.clone(repo.url, repo.branch, repo.destination)

        # Create the client file, writing the following
        # The manifest file name
        # The client spec chosen
        self._store_client_info(args.client_spec)

        return