Dan:

Thanks for your comments.

> > >>function detect_scm
> > >>{
> > >>        #
> > >>        # The presence of $CODEMGR_WS and a Codemgr_wsdata 
> directory> >>        # is our clue that this is a teamware workspace.
> > >>        #
> > >>        if [[ -n $CODEMGR_WS && -d "$CODEMGR_WS/Codemgr_wsdata" 
> ]]; then
> > >>    
> > >
> > >Wouldn't the output of workspace name be more appropriate here?
> > >  
> > I am not sure what you meant?
> > output the workspace name?
Please forgive me,still not sure.
You meant like this?
if [[ -n `workspace name` && -d "`workspace name`/Codemgr_wsdata" ]]; then

> 
> > I made a test,the time take almost the same for "hg locate" and 
> "hg manifest" 
> > in the directory of "hg root",see below.
> > ######### hg locate "glob:$dir/**/${pat#s.}" #########
> > # time flg.flp -r
> > ......
> > real 3m38.654s
> > user 2m41.522s
> > sys 0m24.115s
> > 
> > ######### hg manifest | grep "^$dir/.*/${pat#s.}\$" #######
> > # time flg.flp -r
> > ......
> > real 10m11.090s
> > user 8m2.345s
> > sys 0m45.250s
> 
I think I was wrong for the time computation,actually

    hg locate "glob:$dir/**/${pat#s.}"

can only search in the 2nd or more directories,and it will lose $dir single 
one.So the results is unfair.Maybe it should be "hg locate 
're:$dir/.*/*.${pat#s.}'",but it take much longer time.

I think the "grep" take some time in "hg manifest" case.Then actually it took 
about 5 minutes for "hg manifest" in my GX270.There was a mistake to compute 
the former one because of my typo.

> 
> Hm.  The command is run multiple times.  I'd probably just find a 
> way to
> not have to do that.  Something like
> 
>    for dir; do
>        dirs="$dirs|$dir"
>    done
>    dirs=${dirs#|}
>    hg manifest | egrep "^($dirs)/.*/${pat#s.}\$"
> 
> or something like that.  I dunno if that'd actually do what needs 
> to happen
> there.
Yes, it is faster.
Here is a time running:
# pwd
   $SRC/uts

# time flg.flp -r 

real    1m43.533s
user    1m37.697s
sys     0m8.441s

It is running in my x4200, 2 times faster than before.

And takes about 3 minutes in my DELL GX270.
real    2m57.556s
user    2m33.094s
sys     0m12.130s

Could we use "echo" to take the place "hg manifest".In my test,"echo" often 
faster than "hg manifest" a little bit.


> 
> > >>  while read srcfile; do
> > >>          if [ "$RELPATHS" != y -o $CURTREE = $codemgr_ws ]; then
> > >
> > >Why the change of adding "-o $CURTREE = $codemgr_ws"?
> > >
> > This is because when I run "flg.flp -r" at $CODEMGR_WS($CURTREE 
> is 
> > $CODEMGR_WS),
> 
> So this is a pre-existing bug?
> 
Yes,I think so.
If I run "flg.flp -r" in $CODEMGR_WS,it will be stopless to compute relative 
path.


Thanks
Jason

Reply via email to