PackageDescription: UpdateFromStore

Update From Store

Last published: March 25, 2011 by 'xp'

Defines 3 Classes
Extends 6 Classes

This package provides some utilities for updating a package and its pre-requisites from a Store repository.

See the list of caveats and "to-do's" below before using this package.

The first utility is a menu item on the Package menu called "Update to Head (w/ Prereqs)". Selecting a package and using this menu item will look at that package and all of its (recursive) pre-requisites that are in the same Store database. It will then show a list of any packages that have newer versions in the repository along with a proposed action (Load, Update, or Merge). If you choose to continue, it will perform the action. Merging is done using the same mechanism as the Upsync Image tool, outlined below.

In VW 7.6, this package depends on StoreRegexPrerequisitePolicy, which it uses to determine whether a pundle version should be considered as a valid pre-requisite (using #isSatisfiedBy:). In 7.7, this method has been provided in the base, so it won't be necessary to have StoreRegexPrerequisitePolicy loaded any more. If you have a versionRegex defined, it will be considered when selecting the version to load.

The second utility adds menu items to any VersionBrowsers and the version pane of the Published Items dialog called "Upsync Image". Essentially, this will automatically merge the changes from the selected version into your current image and then reconcile the image to the current version so that the selected version is now the "parent version" of the code in your image. If the merge cannot be done automatically because of conflicts, the Merge Tool is opened to allow you to perform the merge manually. You will also need to reconcile the merged package with the database once you have completed the merge. See for more details.

The core of these utilities is the service provided by the DeepPrereqTrace object. This is used to assemble the load list as derived from a head package.

The basic idea of these two utilities is to make it easier to work with Store in an "optimistic locking" manner that is similar to other version control tools like Subversion and CVS.

You may want to consider implementing your own Policies prerequisitePolicy to refine what package versions are considered trunkish. An example that does this for a number of scenarioes is the package StoreRegexPrerequisitePolicy.