CVS status problem

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

CVS status problem

Hi there,

I am trying to fire off a cvs status command using the netbeans cvs lib in my project. I receive the following error: " unrecognized request `'". I have done some googling but have not turned anything up.

Any assistance would be greatly appreciated. Thanks.


    private Connection getCvsConnection(ScmContext context, GlobalOptions globalProps) throws ScmException {
        File cvsRootFile = new File(context.getRootPath(), CVS_ROOT_FILE);

        Connection cvsConnection = null;
        try {
            String cvsRootContents = new String(FileCopyUtils.copyToByteArray(cvsRootFile));

            CVSRoot cvsRoot = CVSRoot.parse(cvsRootContents);


            if (cvsRootContents.startsWith(PSERVER)) {
                cvsConnection = new PServerConnection(cvsRoot);
            } else {
                AbstractConnection abstractConn = new LocalConnection();
                cvsConnection = abstractConn;

            return cvsConnection;
        } catch (IOException ioException) {
            String errorMsg = String.format("Unable to load file: %s", cvsRootFile.getPath());
            LOG.error(errorMsg, ioException);

            throw new ScmException(errorMsg);

    public List<File> getOutOfSyncFiles(ScmContext context) throws ScmException {
        GlobalOptions globalProps = new GlobalOptions();

        Connection connection = getCvsConnection(context, globalProps);
        Client client = new Client(connection, new StandardAdminHandler());

        StatusCommand cmd = new StatusCommand();
        cmd.setFiles(new File[]{context.getRootPath()});

        Boolean callSuccess = Boolean.FALSE;

        try {
            StatusListener listener = new StatusListener();

            callSuccess = client.executeCommand(cmd, globalProps);

            if(!callSuccess) {
                LOG.error("Unable to run 'cvs status' command.");

                throw new ScmException("Unable to run 'cvs status' command.");
            } else {
                return listener.getModifiedFiles();
        } catch(CommandException commandException) {
            String errorMsg = "Unable to perform status command.";

            LOG.error(errorMsg, commandException);

            throw new ScmException(errorMsg, commandException);
        } catch(AuthenticationException authException) {
            String errorMsg = "Not authenticated against CVS server.";

            LOG.error(errorMsg, authException);

            throw new ScmException(errorMsg, authException);