Personal tools
     DOCUMENTATION

Conary:Merge

From rPath Wiki

Jump to: navigation, search

A Conary shadow provides developers with the option to merge changes from a parent. At any time after a developer has created and modified a shadow, the developer can merge the shadow with any revision on the parent branch. The merge will increment the shadow's version string as appropriate.

Developers can examine the differences between revisions prior to merging by using cvc diff or cvc rdiff. See Conary:Compare Revisions for reference and instructions.

Use cvc merge to merge revisions. Use cvc merge without any arguments to merge from the latest revision of the parent, or add the version number or source code revision to specify an earlier revision.

In the distro-release example, the developer queries the repositories of the parent and the shadow and to compare the revisions:

$> conary rq distro-release=example.rpath.org@corp:devel
distro-release=1.0.4-0.5.1-1
$> conary rq distro-release=conary.rpath.com@rpl:1
distro-release=1.0.5-0.1-1

The difference in the revisions indicates that a newer version of the parent is available (1.0.5) since the originally shadowed version (1.0.4). The developer checks out the shadow and merges these latest updates from the parent:

$> cvc co distro-release
$> cvc merge
+ patching /home/developer/conary/example/distro-release/distro-release.recipe
+ patch: applying hunk 1 of 2
+ patch: applying hunk 2 of 2

When merge conflicts occur, Conary creates a .conflicts file for each file that had conflicts. Developers can examine these files in addition to the output on the screen in an effort to troubleshoot the failed merge.

The developer tests the merge by cooking the recipe locally, testing the resulting changeset, and making adjustments and retesting until tests are successful. The developer then commits the changes to the repository and cooks the package. The developer queries the repository after the cook to check the shadow's revision number after the merge:

$> conary rq distro-release=example.rpath.org@corp:devel
distro-release=1.0.5-0.1.2-1

The developer updates some group recipes to ensure they call this new revision of the package.

Image:Bulbgraph.png   Shadow a package or group source again to the same label to discard all committed changes and start over. In such cases, however, note that Conary cannot commit to the same revision number as a previous commit.