0

i need to delete all the versions/histroy of a file in svn. I know how to delete a file in svn using following code

            ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager((String) userKey,
                    (String) pwd);
            repository.setAuthenticationManager(authManager);
            ourClientManager = SVNClientManager.newInstance(null,
                    repository.getAuthenticationManager());
            updateClient = ourClientManager.getUpdateClient();
            System.out.println("SVN Authendication updateClient status - " + updateClient);
            System.out.println("Start to delete an existing directory at '" + url + "'...");
            try {
                long deletedRevision = ourClientManager.getCommitClient().doDelete(new SVNURL[]{importToURL},
                        "New directory deletion").getNewRevision();
            } catch (SVNException svne) {
                System.err.println("Error on delete directory from SVN" + svne);
            }

With this code am able to delete the file but there is no change in svn size. For this i need to delete its versions/history also to reduce size.Any other idea using java

Dhinakar
  • 4,061
  • 6
  • 36
  • 68

1 Answers1

0

You cannot do this from any Subversion client because Subversion revisions are, for all intents and purposes, immutable.

To complete remove all traces of an item from a Subversion repository, you need administrative access to the repository and must complete dump, filter & reload the repository (or perform a sync which filters out the item(s), then switch the original and the new copy).

See the Subversion FAQ.

alroc
  • 27,574
  • 6
  • 51
  • 97