Dean Roehrich <Dean.Roehrich at sun.com> writes: > On Wed, Jan 30, 2008 at 02:24:39PM -0500, Richard Lowe wrote: >> > Okay, so 'hg commit' will be naked, and won't have a cdm wrapper to make >> > sure >> > the commit message is in the correct form (PSARC case, or CR number and >> > synopsis, on first line). Is this covered by one of the commit hooks? >> >> We really don't want to do that on commit, I don't think. > > If not on commit, then when? I take it that on/nv users would expect to make > frequent use of cdm_recommit? I'm not real clear on what is happening in > cdm_recommit...it looks like we're concatenating the log messages for several > changesets and then, what is squishdeltas doing?, maybe an 'hg revert', 'hg > strip', 'hg commit -A' kind of thing with the new, concatenated, log message?
I can't tell if you're asking about the implementation or its result. The result is the same as you would have with 'wx redelget' The implementation forces a commit of the current workspace content over a different prior revision, then removes the prior set of changes. I don't think we would want to do comment checks on hg commit, because much of the time, in projects or other development the comments will not be well-formed, we certainly couldn't fail an 'hg commit' for that reason, and I think warning people about them then, and thus constantly, will just lead them to hit 'y' as a reflex (and annoy them in the process) >> > And 'hg push' would of course be naked. There would have to be a mechanism >> > for registering one's public ssh key, I suppose? >> > >> > Will one of the hg commit or push hooks invoke cdm for sanity checks? But >> > even with wx apparently the sanity checks are not bullet-proof (see >> > 58030e1dc0c2). >> >> We intend to have the hooks on the gate refuse the more outrages >> classes of error (bad comments, merges, etc). > > I suppose another call to cdm_recommit can be used to fix the bad comments. Yes. >> If people have a specific list of what they feel needs to exist when, >> it'd help a great deal if they'd post it here, and/or file/update >> related bugs with us. > > For my project, I would like to enforce that the first line of the comment > be: > > CR-number<colon, space>CR-Synopsis<newline> > > or even without the colon, as I see in on/nv, > > or even, > > ?SARC/yyyy/xxx <case description> > > I would hate to have that one-line 'hg log' summary to be, "Here's a fix from > Larry". Yes, that's almost precisely the format comchk requires (with the addition of allowing backout:.*, and Contributed by, which opensolaris requires in some cases. > It's not clear to me, yet, where this enforcement should happen. I think it > makes sense for cdm to do this, given that the users will be taught to use a > bunch of cdm commands anyway; if the user had to do it with a commit hook then > what happens when they are working on different projects that require > different commit hooks (what if people on my team are also working on on/nv)? > The bullet-proofing would have to be on the gate; it would need to do some > verification, with the ability to abort the incoming push. That's precisely what we hope to do (check such things in a gate hook). I'd also like to check them pre-push, but that could cause problems for projects with different needs, yes. -- Rich