Stephen Lau <stevel at sun.com> writes: > I'm hacking on 285 right now, and my initial thought is to the following: > > in bringover_hg(), after the 'hg pull -u' is done for the open tree, > test to see if $CLOSED (defined as $CODEMGR_WS/usr/closed in the env > file) exists, and if $PARENT_CLOSED_WS (also defined in the env file) is > set.
I *think* PARENT_* is the wrong set of vars. You want CLONE_ and BRINGOVER_ (see the little dance with those early in nightly.sh). > if both conditions are true, then we do the 'pull -u'. so effectively, > nightly will never do the 'hg clone' for you. this is inconvenient if > you want to work on closed code, which afaik, is a good thing. > (justification: 'closed source is teh sux0r'). After an initial bringover, $CLOSED will never exist. Am I reading the above to mean you're intending to never support an *initial* bringover of usr/closed? If that's the case, I disagree. > but i concede that this is not uber friendly to Sun folks who don't have > a choice. so my other thought is in the codepath where it does: > if [[ ! -d $CODEMGR_WS/.hg ]]; then > staffer hg init $CODEMGR_WS > fi > (at the top of bringover_hg), we see if PARENT_CLOSED_WS is set, and > also do a 'hg init' for the closed repository (thus causing it to be > pulled in in my proposed codepath above). That I'm happier with. > I think that should work, the check_closed_tree() check should allow it > to go through since the $SRC/Makefile.master check will show that the > workspace hasn't been initialised yet. > > What is slightly tricky (thanks Rich for pointing this out to me) is > that nightly then runs check_closed_tree() again to check again (to deal > with pre-split to post-split bringovers). At this point, > CLOSED_IS_PRESENT will have already been set, so it won't actually check > it again. So I think the 'hg clone' of the $PARENT_CLOSED_WS should > also explicitly set CLOSED_IS_PRESENT=yes. > > Does that make sense? Or would it help if I just coded this up and > webrev'd it? > Am I right in thinking the only (current) users of nightly are ON, SFW and CCD? If so, I think that probably makes sense. I'm wondering if there's benefit to generalizing the *destination* of closed, to deal with other consolidations (such as NWS and Install, which don't use nightly, but...) that may not follow the $CODEMGR_WS/usr/*/... layout. -- Rich