Wednesday, January 9, 2008

How to run mktrigger in post_mkstream trigger

As we know that mktrigger must be fired in a view context. However, sometimes we need to run mktrigger even though there is no view yet. For example, in my post_mkstream trigger, I want to attach a no_mkactivity trigger to the newly created stream.

cleartool mktrtype -ucm -postop mkstream -nc -execu "cleartool mktrigger no_mkactivity stream:\$CLEARCASE_STREAM" -execw "cleartool mktrigger no_mkactivity stream:%CLEARCASE_STREAM%" post_mkstream

However, when a developer joins the project to create his development stream my_dev_str, the post_mkstream trigger reports "unable to determine view for my_dev_str: no such file or direcotry". That's because he does not have any view yet. Even if he has a view, the view may not be started, or the current directory may not be under the view root.


Workaround.
Create a view that is available to everyone. Set to the view before call mktrigger in post_mkstream trigger.

cleartool mktrtype -ucm -postop mkstream -nc -execw "ccperl \\\\scm\\admin\\post_mkstream.pl" -execu "/ccstore/admin/post_mkstream_unix.pl" post_mkstream


A simplified version of the post_mkstream.pl script.

#!/usr/bin/perl

$stream = $ENV{"CLEARCASE_STREAM"};

$rst = `cleartool mount \\CBFEProjects`;
$rst = `cleartool startview ccadmin_view`;
chdir "m:\\ccadmin_view\\CBFEProjects";
$rst = `cleartool mktrigger no_mkactivity@\\CBFEProjects stream:$stream`;
$rst = `cleartool endview ccadmin_view`;
exit 0;


4 comments:

ninest123 said...

burberry, tory burch outlet, jordan shoes, sac longchamp, uggs on sale, ugg boots, louis vuitton, oakley sunglasses, michael kors, tiffany jewelry, cheap oakley sunglasses, ray ban sunglasses, christian louboutin outlet, ralph lauren pas cher, louboutin pas cher, ray ban sunglasses, air max, nike free, longchamp outlet, longchamp pas cher, ray ban sunglasses, tiffany and co, oakley sunglasses, polo ralph lauren outlet, louis vuitton, prada outlet, kate spade outlet, longchamp outlet, nike free, ugg boots, nike air max, gucci outlet, oakley sunglasses, louis vuitton outlet, longchamp, nike outlet, replica watches, louis vuitton, replica watches, prada handbags, chanel handbags, louboutin outlet, oakley sunglasses, nike roshe run, louis vuitton outlet, nike air max, louboutin shoes, louboutin, polo ralph lauren outlet, air jordan pas cher

ninest123 said...

true religion jeans, hollister pas cher, vans pas cher, tn pas cher, michael kors, true religion outlet, sac guess, nike free run uk, michael kors outlet, oakley pas cher, true religion jeans, replica handbags, ugg boots, burberry outlet online, mulberry, converse pas cher, michael kors outlet, ugg boots, true religion jeans, michael kors outlet, michael kors, nike air max, air force, hogan, new balance pas cher, vanessa bruno, ray ban uk, hollister, kate spade handbags, north face, nike air max, lululemon, coach outlet, burberry, michael kors, timberland, ray ban pas cher, michael kors outlet, coach purses, lacoste pas cher, hermes, nike air max, nike blazer, north face, ralph lauren uk, abercrombie and fitch, michael kors outlet, michael kors, nike roshe, coach outlet

ninest123 said...

converse outlet, giuseppe zanotti, hollister, insanity workout, herve leger, north face outlet, asics running shoes, nike air max, louboutin, converse, instyler, vans shoes, reebok shoes, iphone cases, abercrombie and fitch, mac cosmetics, wedding dresses, nike huarache, baseball bats, p90x workout, valentino shoes, chi flat iron, nike trainers, ghd, babyliss, oakley, soccer shoes, vans, timberland boots, gucci, celine handbags, nike air max, north face outlet, new balance, ralph lauren, hollister, jimmy choo shoes, mcm handbags, birkin bag, soccer jerseys, longchamp, beats by dre, bottega veneta, ferragamo shoes, nfl jerseys, lululemon, nike roshe, hollister, mont blanc, ray ban

ninest123 said...

moncler, lancel, canada goose, moncler outlet, canada goose, louis vuitton, juicy couture outlet, swarovski crystal, sac louis vuitton pas cher, louis vuitton, canada goose outlet, moncler, moncler, moncler, pandora charms, montre pas cher, canada goose uk, ugg,ugg australia,ugg italia, hollister, canada goose, ugg,uggs,uggs canada, bottes ugg, marc jacobs, doudoune canada goose, ugg boots uk, moncler, louis vuitton, moncler, pandora jewelry, thomas sabo, pandora charms, toms shoes, barbour, coach outlet, supra shoes, replica watches, links of london, barbour jackets, canada goose, juicy couture outlet, swarovski, pandora jewelry, canada goose outlet, louis vuitton, moncler, karen millen, wedding dresses, ugg pas cher