Richard Lowe wrote: > 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).
I thought about that... and the only reason we have the CLONE_ and BRINGOVER_ distinctions is because we don't want to tie up the gate by doing the bringover from onnv-gate. This isn't an issue with Mercurial. >> 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. That's what I was describing, yes. :) But that's not what I believe is the better suggestion... >> 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. Me too. :) >> 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 believe so, I'm not sure about NWS - but I can check. > 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. I was wondering about that (hence my initial thought of defining CLOSED as a variable in the env file (exactly like how $SRC is). But the rest of nightly.sh refers to closed by $SRC/../closed, which is why I ended up thinking that was better. So I'm fine either way - I prefer the generalised CLOSED, but I don't know how realistically other non-nightly consuming consolidations would want to use it; if not, then I'd like to leave it as $SRC/../closed to be consistent with the other bits. cheers, steve -- stephen lau // stevel at sun.com | 650.786.0845 | http://whacked.net opensolaris // solaris kernel development