Project Set Tester

From Developer Documents
Jump to navigation Jump to search

Project Set Tester (psf-tester) (SVN) is a utility for auditing project set (.psf) files. These files are used by Eclipse to represent a set of projects that can be checked out from a repository. Project set files make it easier for developers to checkout the correct things from repositories for projects. The tool only supports SVN repositories.

NOTE: This tool requires the command line SVN tool (for Windows)

Using psf-tester

By giving no arguments to the program, you will receive the following instructions:

 $ java -jar psf-tester.jar
 Usage: Tester [--username <name>] [--password <pw>] [--workspace <workspace directory>] <project-set-file> [<project-set-file> ...]

The --username and --password arguments can be used to specify SVN credentials in cases where they aren't cached.

Psf-tester can currently be used for two things:

  1. validating .psf files
  2. comparing workspace contents against a set of .psf files

Validate .psf files

Validation in this case means checking whether the project references by the project set file still exist in the SVN repository.

Validation is performed by scanning SVN repository URL references from all specified .psf files and by executing svn info URL one by one for each found URL reference.

Example:

$ java -jar psf-tester.jar ../ProjectSets/simantics.psf

will take quite a while and produce printouts like this:

Read ProjectSet[file=..\ProjectSets\simantics.psf, version=2.0, 91 project references]
Testing project reference: https://www.simulationsite.net/svn/simantics/2d/branches/dev2/2d_ontologies
    svn info --non-interactive --trust-server-cert https://www.simulationsite.net/svn/simantics/2d/branches/dev2/2d_ontologies 
Path: 2d_ontologies
URL: https://www.simulationsite.net/svn/simantics/2d/branches/dev2/2d_ontologies
Repository Root: https://www.simulationsite.net/svn/simantics
Repository UUID: ac1ea38d-2e2b-0410-8846-a27921b304fc
Revision: 12266
Node Kind: directory
Last Changed Author: lehtonen
Last Changed Rev: 11643
Last Changed Date: 2009-07-12 15:21:04 +0300 (su, 12 heinä 2009)

Testing project reference: https://www.simulationsite.net/svn/simantics/foundation/branches/dev2/foundation_ontologies
    svn info --non-interactive --trust-server-cert https://www.simulationsite.net/svn/simantics/foundation/branches/dev2/foundation_ontologies 
Path: foundation_ontologies
URL: https://www.simulationsite.net/svn/simantics/foundation/branches/dev2/foundation_ontologies
Repository Root: https://www.simulationsite.net/svn/simantics
Repository UUID: ac1ea38d-2e2b-0410-8846-a27921b304fc
Revision: 12266
Node Kind: directory
Last Changed Author: villberg
Last Changed Rev: 12193
Last Changed Date: 2009-09-03 09:50:32 +0300 (to, 03 syys 2009)

Getting only these means the project set at least doesn't contain references to non-existent SVN locations.

Compare workspace against .psf files

Scenario: A developer performs project renaming or some other kind of SVN repository reorganization. He, according to standard procedure, updates project set files to reflect the new repository reality. Other developers still have the old workspace and not everyone is properly informed of the changes that have occurred. This leaves many people confused about the state of their workspace, i.e. what is old and what is not.

To resolve this situation it would be very useful to compare the user's workspace projects against the latest project set files the user has been using.

Compare example:

 $ java -jar psf-tester.jar --workspace c:\work\e3.5\workspace ../ProjectSets/simantics.psf
Read ProjectSet[file=..\ProjectSets\simantics.psf, version=2.0, 91 project references]
-------------------------------------------------------------------------------
Only in workspace c:\work\e3.5\workspace:
    ...
    og [/ode/branches/dev7/og, https://www.simulationsite.net/svn/simantics]
    org.simantics.db [/db/trunk/org.simantics.db, https://www.simulationsite.net/svn/simantics]
    org.simantics.db.client.feature [/db/trunk/org.simantics.db.client.feature, https://www.simulationsite.net/svn/simantics]
    org.simantics.db.common [/db/trunk/org.simantics.db.common, https://www.simulationsite.net/svn/simantics]
    org.simantics.db.impl [/db/trunk/org.simantics.db.impl, https://www.simulationsite.net/svn/simantics]
    org.simantics.db.management [/db/trunk/org.simantics.db.management, https://www.simulationsite.net/svn/simantics]
    org.simantics.db.procore [/db/trunk/org.simantics.db.procore, https://www.simulationsite.net/svn/simantics]
    org.simantics.db.procore.protocol [/db/trunk/org.simantics.db.procore.protocol, https://www.simulationsite.net/svn/simantics]
    org.simantics.db.procore.server [/db/trunk/org.simantics.db.procore.server, https://www.simulationsite.net/svn/simantics]
    org.simantics.db.services [/db/trunk/org.simantics.db.services, https://www.simulationsite.net/svn/simantics]
    ...
-------------------------------------------------------------------------------
Only in project sets:
    https://www.simulationsite.net/svn/simantics/ode/branches/dev6/og
    https://www.simulationsite.net/svn/simantics/db/branches/dev6/org.simantics.db
    https://www.simulationsite.net/svn/simantics/db/branches/dev6/org.simantics.db.client.feature
    https://www.simulationsite.net/svn/simantics/db/branches/dev6/org.simantics.db.common
    https://www.simulationsite.net/svn/simantics/db/branches/dev6/org.simantics.db.impl
    https://www.simulationsite.net/svn/simantics/db/branches/dev6/org.simantics.db.management
    https://www.simulationsite.net/svn/simantics/db/branches/dev6/org.simantics.db.procore
    https://www.simulationsite.net/svn/simantics/db/branches/dev6/org.simantics.db.services
    ...

Download

Version Date Download SVN
0.1.0 7.9.2009 psf-tester.jar svn:tools/psf-tester/tags/0.1.0/
unstable now psf-tester.jar svn:tools/psf-tester/trunk