Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-team-dev] CVS resource retrieval hangs on second query

Ping?

On Mon, Nov 7, 2011 at 1:38 PM, Robert Munteanu
<robert.munteanu@xxxxxxxxx> wrote:
> Hi,
>
> I'm not sure whether this is an error in my usage of the CVS APIs or a
> bug, so I'm posting it here first.
>
> I'm trying to retrieve the contents of file from a CVS repository and
> it works as expected for the first time, but the second time it times
> out and aborts with 'I/O has been interrupted.'. The CVS repository is
> running on localhost, so I can exclude network problems.
>
> Here's how I use the CVS code ( a bit simplified )
>
>                ICVSRepositoryLocation repositoryLocation = ...;
>
>                String unqualifiedPath = ...;
>
>                CVSTag tag = new CVSTag(_revision, CVSTag.VERSION);
>
>                ICVSRemoteFile remoteFile =
> repositoryLocation.getRemoteFile(unqualifiedPath, tag);
>
>                if ( !remoteFile.exists(monitor) )
>                    return null;
>
>                InputStream contents = remoteFile.getContents(monitor);
>
>                try {
>                    ByteArrayOutputStream outputStream = new
> ByteArrayOutputStream();
>
>                    IOUtils.copy(contents, outputStream);
>
>                    return outputStream.toByteArray();
>
>                } catch (IOException e) {
>                    throw new CoreException(new Status(IStatus.ERROR,
> Activator.PLUGIN_ID, "Error communicating with the repository : " +
> e.getMessage(), e));
>                } finally {
>                    IOUtils.closeQuietly(contents);
>                }
>
> I have attached a stack trace with the code as it hangs.
>
> I'm running with plug-in versions
>
> org.eclipse.team.core (3.5.1.r35x_20100113-0800) "Team Support Core" [Active]
> org.eclipse.team.cvs.core (3.3.200.I20090430-0408) "CVS Team Provider
> Core" [Active]
> org.eclipse.team.cvs.ui (3.3.202.r35x_20090930-0800) "CVS Team
> Provider UI" [Active]
> org.eclipse.team.ui (3.5.0.I20090430-0408) "Team Support UI" [Active]
>
> and CVS version
>
> Concurrent Versions System (CVS) 1.12.12 (client/server)
>
> Thanks,
>
> Robert
>
> --
> Sent from my (old) computer
>



-- 
Sent from my (old) computer


Back to the top