Personal tools

rPath Appliance Platform Agent:Mercurial

From rPath Wiki

Jump to: navigation, search

Contents

rPath Appliance Platform Agent provides developers with the option to check out the latest rPath Appliance Platform development files for particular versions. This form of development is an alternative to the recommended plugin development environment for appliance developers. Note that the appliance agent development files in the source control repositories are not the same as those provided in the plugin development environment, and the development files may change frequently as the checkout represents a development tip instead of a stable release.

Install Mercurial

The rPath Appliance Platform uses Mercurial for source control. According to its homepage, Mercurial is "a fast, lightweight Source Control Management system designed for efficient handling of very large distributed projects." Install Mercurial prior to running its corresponding hg commands for checking out the Appliance Platform development files. rPath has packaged Mercurial for Conary-based systems, allowing users to install using the following command:

#> conary update mercurial=contrib.rpath.org@rpl:1 --resolve

The Mercurial package will be included in future rPath Linux releases, replacing the need to specify the contrib label when installing on rPL.

Check out rPath Appliance Platform Files from Mercurial

Navigate to http://hg.rpath.com/ to see a list of public Mercurial repositories made available by rPath. All the Appliance repositories are preceded by raa.

Check out one of these repositories to obtain the files specific to that version of the Appliance Platform. The Mercurial (hg) command to do this is hg clone, as shown in the following example:

$> hg clone http://hg.rpath.com/raa-2.1/

Run the rPath Appliance Platform from the Checkout

Run the rPath Appliance Platform from the checkout to see how the Appliance Platform web interface appears and functions throughout development. Run the Appliance the same way as running from the rPath Appliance Platform plugin development environment: stop the raa and raa-lighttpd services and launch the start-raa-service.sh and raa-web scripts in the checkout directory. The following commands can be used for this:

$> sudo service raa stop
$> sudo service raa-lighttpd stop
$> ./raa-web
$> ./start-raa-service.sh

Stop and restart the raa-web script between changes to incorporate those changes into the running the rPath Appliance Platform.

Update the Checkout

Periodically, use hg pull to get updates from upstream.

To update the current working directory to the newest pulled version, use hg update. Use the command without arguments to get the latest revision, and specify a revision argument to change to that specific revision:

$> hg update
$> hg update 973:3d5e1ebaee97

Use hg log to see all revisions.

Use hg diff to see differences between the checkout directory and the repository contents. Use this to identify where Appliance Platform developers have committed changes:

$> hg diff -r tip

Show the tip revision, shown as the changeset value, using hg tip:

$> hg tip
changeset:   973:3d5e1ebaee97
tag:         tip
user:        Og Maciel <https//issues.rpath.com/>
date:        Thu Apr 12 16:01:03 2007 -0400
summary:     Updated NEWS

See the manual page hg(1) for further usage information.