ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sivaprasad.Kanche...@itsindia.com
Subject Re: vssget - optional label
Date Wed, 19 Sep 2001 13:54:38 GMT

Hi Will,

I faced a similar problem. This is how I fixed the problem. You call ant as
'ant -Dvss.label=build42'.

    <target name="vssget" depends="vssget.label" unless="vss.label">
        <vssget localpath="${vssget.localpath}"
                recursive="true"
                login="${vss.userid},${vss.password}"
                vsspath="${vssget.vsspath}"
                writable="false"
                ssdir="${vss.ssdir.path}"/>
    </target>

    <target name="vssget.label" depends="init" if="vss.label">
        <vssget localpath="${vssget.localpath}"
                recursive="true"
                login="${vss.userid},${vss.password}"
                vsspath="${vssget.vsspath}"
                label="${vss.label}"
                writable="false"
                ssdir="${vss.ssdir.path}"/>
    </target>

You should always call the target 'vssget', which will delegate it to the
target 'vssget.label' if the property 'vss.label' is set. The only
disadvantage with this approach is that you need to maintain another target
with duplicate information. To avoid that I have defined all the
information as properties and referenced them in both the targets. This
way, I avoid the pain of maintaining information at two places.

This should solve your problem, let me know if it does not.

- Siva



                                                                                         
                         
                    Will Dyke                                                            
                         
                    <will.dyke@bb        To:     "'ant-user@jakarta.apache.org'" <ant-user@jakarta.apache.org>
    
                    c.co.uk>             cc:                                          
                            
                                         Subject:     vssget - optional label            
                         
                    09/19/01                                                             
                         
                    03:04 PM                                                             
                         
                    Please                                                               
                         
                    respond to                                                           
                         
                    ant-user                                                             
                         
                                                                                         
                         
                                                                                         
                         



Very occasionally, I need to get a particular build out of VSS, defined
by its label. What I would like to do is to add -Dlabel=build42, for
example,
in these rare cases, and use label="${label}" within the vssget task.
However, this causes the vssget to fail at all other times. I have tried
setting a default value of an empty string for label, but vssget doesn't
like an empty label either.

At the moment, I'm having to resort to editing my build.xml file every
time I wish to get a particular version, and editing it back for the
rest of the time. I'm not a big fan of this - any ideas?

Most potential solutions that I see would probably involve a change to
the vssget task (so that e.g. an empty string value for label means
get standard version) - I don't mind doing this, but would prefer not
to have to.

Will

Will Dyke
beeb.com Systems Engineer
020 8433 1510



This e-mail, and any attachment, is confidential. If you have received
it in error, please delete it from your system, do not use or disclose
the information in any way, and notify me immediately. The contents of
this message may contain personal views which are not the views of the
BBC, unless specifically stated.






Mime
View raw message