The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

ClearCase::Wrapper::MGi - Marc Girod's contributed cleartool wrapper functions

SYNOPSIS

This is an overlay module for ClearCase::Wrapper containing Marc Girod's non-standard extensions. See perldoc ClearCase::Wrapper (by David Boyce) for more details.

CLEARTOOL EXTENSIONS

  • LSGENEALOGY

    New command. LsGenealogy is an alternative way to display the version tree of an element. It will treat merge arrows on a par level with parenthood on a branch, and will navigate backwards from the version currently selected, to find what contributors took part in its state. This is thought as being particularly adapted to displaying the bush-like structure characteristic of version trees produced under the advocated branching strategy.

    Flags:

    -all

    Show 'uninteresting' versions, otherwise skipped:

    - bearing no label
    - not at a chain boundary.
    -obsolete

    Add obsoleted branches to the search.

    -short

    Skip displaying labels and 'labelled' versions and do not report alternative paths or siblings.

    -depth

    Specify a maximum depth at which to stop displaying the genealogy of the element.

  • CO/CHECKOUT

    Supports the BranchOff feature, which you can set up via an attribute in the config spec. The rationale and the design are documented in:

     http://www.cmwiki.com/BranchOffMain0

    Instead of branching off the selected version, the strategy is to branch off the root of the version tree, copy-merging there from the former.

    This allows to avoid both merging back to /main or to a delivery branch, and to cascade branches indefinitely. The logical version tree is restituted by navigating the merge arrows, to find all the direct or indirect contributors.

    Flag:

    -ver/sion

    Ignored under a BranchOff config spec, but the version specified in the pname is anyway obeyed, as a branch may always be spawn.

  • MKBRANCH

    Actually a special case of checkout.

    Flag:

    -nco

    Special case of reverting to the default behaviour, as this cannot reasonably be served in a new branch under BranchOff (no version to which to attach the Merge hyperlink).

  • DIFF

    Evaluate the predecessor from the genealogy, i.e. take into account merges on an equal basis as parents on the same physical branch. In case there are multiple parents, consider the one on the same branch as 'more equal than the others' (least surprise principle).

    Preserve the (Wrapper default) assumption of a -pred flag, is only one argument is given.

  • UNCHECKOUT

    The wrapper implements the functionality commonly provided by a trigger, to remove the parent branch if it has no checkouts, no sub-branches, and no remaining versions, while unchecking out version number 0.

  • MKLBTYPE

    Extension: families of types, with a chain of fixed types, linked in a succession, and one floating type, convenient for use in config specs. One application is incremental types, applied only to modified versions, allowing however to simulate full baselines. This is implemented as part of UCM, for fixed types, and magic config specs. The wrapper offers thus a similar functionality on base ClearCase.

    The current baseline is embodied with floating labels, which are moved over successive versions. This floating type is however not mandatory. It is created with the -fam/ily flag. Families with no such floating type are just chains, and can still be used with the -inc/rement flag.

    Types forming a family are related with hyperlinks of two types:

    EqInc
    PrevInc

    One attribute:

    DelInc

    Flags:

    -fam/ily

    Create two label types, linked with an EqInc hyperlink. The first, given as argument, will be considered as an alias for successive increments of the second. It is the family type. The name of the initial incremental type is this of the family type, with a suffix of _1.00.

    -inc/rement

    Create a new increment of an existing label type family, given as argument. This new type will take the place of the previous increment, as the destination of the EqInc hyperlink on the family type. It will have a PrevInc hyperlink pointing to the previous increment in the family.

    -arc/hive

    Rename the current type to an archive value (name as prefix, and a numeral suffix. Initial value: -001), create a new type, and make the archived one its predecessor, with a PrevInc hyperlink.

    -glo/bal

    Global types (in an Admin vob or not) are incompatible with the family property.

  • LOCK

    New -allow and -deny flags. These work like -nuser but operate incrementally on an existing -nuser list rather than completely replacing it. When -allow or -deny are used, -replace is implied.

    When -iflocked is used, no lock will be created where one didn't previously exist; the -nusers list will only be modified for existing locks.

    In case of a family type, lock also the equivalent incremental type.

    There may be an issue if the two types are not owned by the same account. You may overcome it by providing a module specification via the environment variable FORCELOCK. This module must export both a flocklt and a funlocklt (force lock and unlock label type) functions. The functions take an lbtype and a vob tag as input (flocklt optionally takes a replace flag and an nusers exception list). The two functions take the responsibility of printing the standard output (but not necessarily the errors), and return an error code: 0 for success, other for error. See the documentation for examples of implementation.

  • UNLOCK

    In case of a family type, unlock also the equivalent incremental type.

    There may be an issue if the two types are not owned by the same account. See the LOCK documentation for overcoming it with a FORCELOCK environment variable.

  • MKLABEL

    In case of a family type, apply also the equivalent incremental type. The meaning of -replace is affected: it concerns the equivalent fixed type, and is implicit for the floating type (the one given as argument).

    Preserve the support for the -up flag from ClearCase::Wrapper::DSB and lift the restriction to using it only with -recurse.

    Added a -force option which makes mostly sense in the case of applying incremental labels. Without it, applying the floating label type will be skipped if there has been errors while (incrementally) applying the equivalent fixed one. Forcing the application may make sense if the errors come from multiple application e.g. due to links, or in order to retry the application after a first failure. It may also be used to apply labels upwards even if recursive application produced errors.

    Extension: -over takes either a label or a branch type. In either case, the labels will be applied over the result of a find command run on the unique version argument, and looking for versions matching respectively lbtype(xxx) or <version(.../xxx/LATEST)> queries, and !lbtype(lb) (with xxx the -over, and lb the main label type parameter.

COPYRIGHT AND LICENSE

Copyright (c) 2007 IONA Technologies PLC (until v0.05), 2008-2009 Marc Girod (marc.girod@gmail.com) for later versions. All rights reserved. This Perl program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

perl(1), ClearCase::Wrapper, ClearCase::Wrapper::DSB, ClearCase::Argv