人生是一场不能存盘的RPG,我只能尽量多搞几个Screenshot

May 15, 2006

使用NAnt操作VSS

Filed under: NAnt

1.首先需要下载NAntContrib,把所有的文件和NAnt的执行文件放在一起.

2.NAntContrib会调用VSS的客户端来get源代码,如果不想安装VSS,可以
只copyVSS安装路径下的SSAPI.dll  和SSUS.dll,并注册ssapi.dll,命令如下:
regsvr32 ssapi.dll

3.script
——–get:
<vssget
     user="myusername"
      password="mypassword"
      localpath="myLocalpath"
      recursive="true"
      writable="true"
      dbpath="myVSS\srcsafe.ini"
      path="$/MyProduct"
    />
——-checkout:
  <vsscheckout
      user="myusername"
      password="mypassword"
      localpath="myLocalpath"
      recursive="true"
      writable="true"
      dbpath="myVSS\srcsafe.ini"
      path="$/MyProduct"
    />
注意localpath只能指定为本地路径
path,可以制定为vss中的路径或某个文件

——–checkin:
<vsscheckin
    user="myusername"
      password="mypassword"
      localpath="myLocalpath"
      recursive="true"
      writable="false"
      dbpath="myVSS\srcsafe.ini"
      path="$/MyProduct"
  comment="NAnt checkin"
/>

也可以直接使用vss来进行操作:
比如get:
<exec program="${vss_path}\ss.exe" commandline="GET ${path_vss} -R -I-Y -O- -GTM -GL${path_local}"
               output="my.log">
</exec>
只是那一堆的参数让人有点头大.

Comments »

The URI to TrackBack this entry is: http://recordsome.blogsome.com/2006/05/15/p13/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.






















Get free blog up and running in minutes with Blogsome
Theme designed by Hadley Wickham