Can you try whith this :

    public void edit( File file )
        throws ScmException
    {
        ScmRepository repository = getScmRepository();

        EditScmResult result = getScmManager().getProviderByRepository( 
repository )
            .edit( repository, new ScmFileSet( new File( workingDirectory ), 
file ) );

        checkResult( result );
    }

    public void unedit( File file )
        throws ScmException
    {
        ScmRepository repository = getScmRepository();

        UnEditScmResult result = getScmManager().getProviderByRepository( 
repository )
            .unedit( repository, new ScmFileSet( new File( workingDirectory ), 
file ) );

        checkResult( result );
    }

I suppose you'll have the same problem for checkin command.
Let me know if it's ok.

Emmanuel

Wim Deblauwe a écrit :
Hi,

I'm testing with the updated release plugin and ClearCase, but I still get a problem that pom.xml cannot be edited because it is read-only. I traced the problem to ScmHelper:

public void edit( File file )
        throws ScmException
    {
        ScmRepository repository = getScmRepository();

EditScmResult result = getScmManager().getProviderByRepository( repository )
            .edit( repository, new ScmFileSet( file ) );

        checkResult( result );
    }

This code gets called ok, but I think you are misusing ScmFileSet. The constructor with 1 argument is using 'file' as 'basedirectory' and an empty list of files. As a result, the ClearCaseEditCommand does nothing, because there are no files in the fileset. Maybe the ScmFileSet needs to throw an IllegalArgumentException if the given argument is not a directory? Any thoughts on how the code of ScmHelper is updated best? There are also other methods that have the same problem.

regards,

Wim

Reply via email to