http://bugs.grommit.com/show_bug.cgi?id=430





------- Comment #7 from nathan.bush at sun.com  2008-02-20 19:52 PDT -------
Yes, using a local variable for saving $PWD is good idea.

It looks like getcomments actually runs three times:
1) Early in the first per-file loop, in $PWD.
2) Later in the first per-file loop, in $WDIR/raw_files.
3) In the second per-file loop, in $CWS.

In my opinion, it would be easiest to understand if the script
avoided changing the current directory unless truly required
(as it is in the case of diff generation) or at least did it
as little as possible.  For readability and clarity, I would't
recommend changing into $CODEMGR_WS for build_old_new unless
the first per-file loop was split into two separate loops:

1) cd $CODEMGR_WS, build all of $WDIR/raw_files
2) cd $WDIR/raw_files, build all diffs

This would avoid going back-and-forth for each file.

Even then, it seems that it is only teamware, mercurial, and
subversion that have an affinity for performing operations
from within the child.  With the "unknown" SCM type, parent
and child are more like siblings, so to cd into the child
only has an advantage some of the time.


-- 
Configure bugmail: http://bugs.grommit.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to