Hi All,
         I am using Subversion version1.2 and need one favour. I have
written code to delete particular revision from SVN Repository.
Unfortunately, i couldn't delete particular version from repository. Any one
can response me.. how to delete?

public void deleteDocRevision(String collDir, String fileName, Long revNum)
                        throws SVNException {
                if (logger.isDebugEnabled()) {
                        logger.debug("deleteDocRevision(String, String, Long) - 
start");
//$NON-NLS-1$
                }

                String path = this.getPath() + "/" + DOC_COLL_FOLDER_NAME;
                path = path + "/" + collDir;
                String filePath = path + "/" + fileName;

                SVNNodeKind kind = this.getTheRepository().checkPath(filePath, 
revNum);

                if (kind == SVNNodeKind.NONE) {
                        SVNErrorMessage message = SVNErrorMessage.create(
                                        SVNErrorCode.BAD_FILENAME, filePath + " 
Not found");
                        throw new SVNException(message);
                }

                try {

                        ISVNEditor editor = 
this.getTheRepository().getCommitEditor(
                                        "file deleted", null);
                        editor.openRoot(-1);
                        editor.deleteEntry(filePath, revNum);
                        editor.closeDir();
                        editor.closeEdit();
                } catch (Exception e) {

                        logger.error("deleteDocRevision(String, String, Long)", 
e); //$NON-NLS-1$
                        e.printStackTrace();
                }

                if (logger.isDebugEnabled()) {
                        logger.debug("deleteDocRevision(String, String, Long) - 
end");
//$NON-NLS-1$
                }
        }

        Can you help me? Thanks in advance..
-- 
View this message in context: 
http://old.nabble.com/How-to-delete-particular-revision-of-file-from-SVN-Repos-tp30520057p30520057.html
Sent from the Subversion Dev mailing list archive at Nabble.com.

Reply via email to