Connect a Eclipse project with a Harvest project
search cancel

Connect a Eclipse project with a Harvest project

book

Article ID: 250967

calendar_today

Updated On:

Products

CA Harvest Software Change Manager CA Harvest Software Change Manager - OpenMake Meister

Issue/Introduction

The Harvest project has a top-level folder containing the files for the main project as it has been checked into Harvest before.

In Eclipse, the local project has the same name

  • It corresponds to the same project in the Harvest repository but is not currently connected to it.
  • It contains many changes when compared with the Harvest project.
  • The goal is to connect (bind) the local project with the Harvest project without initially checking anything in.  Files will be selectively checked in at a later time.

Environment

Harvest Software Change Manager all versions

Cause

The normal ways that Harvest creates an association between a project in the Harvest database and the workspace are through Team -> Share and "Add to Workspace".  

Team -> Share assumes that the Eclipse project is a brand new project that Harvest has never seen before.  This option will accomplish 2 goals:

  • It will check in the brand new project to Harvest so that all the files are preserved (explaining why it needs a package name and a folder within the Harvest project structure to store the new project)
  • As it does this checkin process it will create the connections (bindings) so that for each file in the Harvest repository it knows with which exact file on the local file system it is linked.

By comparison, "Add to Workspace" performs a similar task, but going the other way.  It assumes that a project checked into the Harvest repository does not already exist in the local workspace.  This option will also accomplish 2 goals:

  • It will check out the Harvest project to the local workspace
  • As it does this checkout process it will create the connections (bindings) so that for each file in the Harvest repository it knows with which exact file on the local file system it is linked.

The scenario described above is a third "hybrid" situation.  The project in the local workspace corresponds to the project in the Harvest repository, but some of the files in the local workspace are new or have been updated.  The scenario aims to create the connections (bindings) so that for each file in the Harvest repository it knows with which exact file on the local file system it is linked, but without checking in any new or updated files until a later time.

Harvest does not have a utility that only creates the connections (bindings) outside the context of a checkin or checkout.  One thing that is different about Harvest is that it does not store versions of files as actual files on the hard disk of a computer, but as compressed blob fields in the Harvest database.  During checkin and checkout a signature file is placed in every folder in the workspace containing the relationships between files in the folder on the computer and specific versions in the Harvest database.  Without this signature file Harvest would need to checkout the files in the database to do a full comparison and learn the relationships.  This is why Harvest handles the binding during checkin or checkout when it can know for sure the exact connections between the files in the workspace and files stored in the database.

In the above described "hybrid" situation, it is this signature file in every folder that must be created in order to have the binding information that Harvest needs.

Resolution

Here is the proposed solution to get things set up.

  1. Outside of Eclipse, make a backup of your entire project folder
  2. Back in Eclipse, add the Harvest project to your local workspace.  This will overwrite any files you have changed in your local file system, but not to worry.
  3. Outside of Eclipse again, use BeyondCompare or WinMerge, or another folder comparison tool to merge your changes from the backup folder into the project on your local file system.
  4. Back in Eclipse, when you're ready, execute Team -> Synchronize to check in your changes.

 

Additional Information