How do I delete code from the repository?

Scott Stanchfield

VAJ version 2.0 and above has three repository functions called "purge", "restore" and "compact."

"Purge" marks projects, packages, classes/interfaces and methods as "garbage".  If you decide to get them back, you can "restore" these marked objects.  They still exist in the repository.  You cannot purge versions of objects that are referenced in your workspace.

"Compact" removes all purged items from the repository.  They CANNOT be recovered.  Note that you cannot compact unless all objects in your workspace have been versioned.  "Compact" also gets rid of "open" editions of methods.  These are all those time-stamped versions of methods that you can replace while working on methods.

There's a trick with "purge", though.

If you purge a project, you ONLY purge the project object from the repository.  It does not affect any of the packages, class/interfaces or methods referenced in that project.

If you purge a package, all versions of objects referenced in that package are purged (as long as those versions aren't used somewhere else, like in a different version of the package.)

Deletion Procedure

  1. Add everything you want to keep to your workspace (this makes sure you don't accidentally purge something you wanted, as its in the workspace and VAJ won't let you purge it.)
  2. Make sure everything in your workspace is versioned
  3. Bring up repository explorer (Window->Repository Explorer)
  4. Purge versions of projects you don't want any more (purge is on the popup menu for packages and projects in the repository explorer)
  5. Purge versions of packages you don't want any more
  6. Compact the repository (Admin->Compact repository)

The compact may give you time to get that Columbian coffee directly from Columbia, so give it some time...

Notes:

  • Compact creates a new repository containing everthing except the items you purge.
  • The old repository is still available in case you accidentally delete something you need. It's under c:IBMVJavaide epositoryivj.bak. You can repository import things from this if you need to.
  • Purge/compact is a bit more involved for the Enterprise Edition of VisualAge for Java. See the VisualAge for Java Enterprise Team Support redbook at http://www.redbooks.ibm.com/abstracts/sg245245.html.

 

See also

Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.