Here's a new webrev, at the same place:
http://cr.grommit.com/~stevel/156_ws/

With Stephen's & Rich's comments addressed.

My initial question re: protodefs still stands, since neither Darren, Rich, nor I were able to address it:
Hi Bill (cc'ing tools-discuss),
    I'm looking at 'ws', and wondering about the use of the 
Codemgr_ws/sunos/protodefs file... Rich said you were able to convince him not 
to throw it away; do you mind convincing me too? :-)
I'm debating about what to do in the Hg case, whether we should keep a symmetrical .hg/sunos/protodefs file, or what..., but I could use some more background.

Anyone know, or have an opinion?

cheers,
steve

Stephen Hahn wrote:
* Stephen Lau <[EMAIL PROTECTED]> [2007-02-15 15:24]:
I've taken Darren's ws, merged in the stuff from my attempt at porting ws and have a webrev for a unified version here:

http://cr.grommit.com/~stevel/156_ws/

At the moment it only supports Mercurial & Teamware, I can add Subversion support if people need it.

Anyone want to review it?

  On a first pass, I didn't like

  tmpwsname=`foo`
  if [ -z "$tmpwsname ]; then
        tmpwsname=`bar`
        if [ -z "$tmpwsname ]; then
                ...
        else
                ...
        fi
  else
        ...
  fi

  very much.  I think

  if [ -n "${tmpwsname:=$(cd $wsname >/dev/null && hg root 2>/dev/null)}" ];
  then
        ...
  elif [ -n "${tmpwsname:=$(cd $wsname >/dev/null && workspace name)}" ]; then
        ...
else ...
  fi

  is clearer for multiple SCMs.  Oh, and the "cd $wsname && cmd" should
  be well-named shell functions.

  - Stephen



--
stephen lau // [EMAIL PROTECTED] | 650.786.0845 | http://whacked.net
opensolaris // solaris kernel development
_______________________________________________
tools-discuss mailing list
tools-discuss@opensolaris.org

Reply via email to