Alien-SVN

 view release on metacpan or  search on metacpan

src/subversion/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNAdmin.java  view on Meta::CPAN

     *
     * @param path              the path to the repository
     * @param messageOut        the receiver of all messages
     * @param start             the first revision
     * @param end               the last revision
     * @throws ClientException If an error occurred.
     */
    public void verify(String path, OutputInterface messageOut,
                       Revision start, Revision end)
            throws ClientException
    {
        try
        {
            aSVNAdmin.verify(new File(path),
                             start == null ? null : start.toApache(),
                             end == null ? null : end.toApache(),
                             new ReposNotifyHandler(messageOut));
        }
        catch (org.apache.subversion.javahl.ClientException ex)
        {
            throw new ClientException(ex);
        }
    }

    /**
     * list all locks in the repository
     * @param path              the path to the repository
     * @throws ClientException  throw in case of problem
     * @since 1.2
     */
    public Lock[] lslocks(String path)
            throws ClientException
    {
        try
        {
            Set<org.apache.subversion.javahl.types.Lock> aLocks =
                                                    aSVNAdmin.lslocks(
                                                        new File(path),
                                                        Depth.toADepth(
                                                              Depth.infinity));
            Lock[] locks = new Lock[aLocks.size()];

            int i = 0;
            for (org.apache.subversion.javahl.types.Lock lock : aLocks)
            {
                locks[i] = new Lock(lock);
                i++;
            }

            return locks;
        }
        catch (org.apache.subversion.javahl.ClientException ex)
        {
            throw new ClientException(ex);
        }
    }

    /**
     * remove multiple locks from the repository
     * @param path              the path to the repository
     * @param locks             the name of the locked items
     * @throws ClientException  throw in case of problem
     * @since 1.2
     */
    public void rmlocks(String path, String [] locks)
            throws ClientException
    {
        try
        {
            aSVNAdmin.rmlocks(new File(path), locks);
        }
        catch (org.apache.subversion.javahl.ClientException ex)
        {
            throw new ClientException(ex);
        }
    }

    private class OutputWrapper extends OutputStream
    {
        private OutputInterface outputer;

        OutputWrapper(OutputInterface outputer)
        {
            this.outputer = outputer;
        }

        public void write(int b) throws IOException
        {
            outputer.write(new byte[]{ (byte) ( b & 0xFF) });
        }

        public void write(byte[] b) throws IOException
        {
            outputer.write(b);
        }

        public void close() throws IOException
        {
            outputer.close();
        }
    }

    private class InputWrapper extends InputStream
    {
        private InputInterface inputer;

        InputWrapper(InputInterface inputer)
        {
            this.inputer = inputer;
        }

        public int read() throws IOException
        {
            byte[] b = new byte[1];
            if (inputer.read(b) > 0)
                return b[0];
            else
                return -1;
        }

        public int read(byte[] b) throws IOException



( run in 1.220 second using v1.01-cache-2.11-cpan-39bf76dae61 )