ADA集成开发环境GNAT-GPS的版本控制配置

68 篇文章 2 订阅
12 篇文章 0 订阅

ADA集成开发环境GNAT-GPS集成了CVS功能。其基本配置界面如下:


这里对ariane工程(一个新建的ADA库代号,google code地址http://code.google.com/p/ariane/

(Sorry, with IME turned off, the rest of the article is to be in English)

This is a section inside the project preference which can be brought up by clicking on the appropriate item in the context menu of the project node in the project view.

Normally google code assigns to each user a user name (which should be the google account) and a password (a system generated password for google code purpose only). So when one first time accesses the code base through a client, authentication is requested. No exception to this ADA IDE. But fortunately, it seems the password only needs to be input once, and on a linux machine (should similarly apply to windows), once svn client with command line tool is installed (which means it's allowed to do svn operations by typing in commands starting svn in a linux terminal), one can use this IDE to talk to google code server through svn client without difficulty. The only thing needs to be done is specify the authentication information, the pair of user name and password. There is no way to do so with the user interface of the gnat-gps IDE, however the IDE is actually very powerful in that it allows users to write scripts in XML and Python to configure it and customize its behavior. In this simple case, we only need to modify XML code for Subversion setup located specifically in a file named (on ubuntu linux platform) /usr/share/gps/plug-ins/subversion.xml, the folder where the file is placed is for all gnat-gps plugins which are XMLs and Pythons that respectively declare and define the actions the IDE would take for these specific tasks.

There is only one place we need to change, which is in the following XML section. 

   <action name="generic_svn_commit" show-command="false" output="none" category="">
      <shell output="">echo "Committing file(s) $2-"</shell>
      <shell>dump "$1" TRUE</shell>
      <external check-password="true">svn --non-interactive --non-recursive commit -F "%1" "$2-"</external>
      <on-failure>
         <shell output="">echo_error "SVN error:"</shell>
         <shell output="">echo_error "%2"</shell>
      </on-failure>
      <shell>delete "%2"</shell>
      <shell>Hook "file_changed_on_disk"</shell>
      <shell>Hook.run %1 null</shell>
   </action>

This XML section describes the action the IDE performs whenever the user makes a svn commit, and what the system does is specified in the external element which is an svn command line the system directs to the linux shell to execute. We don't need to worry about the details of the arguments, among some options regarding the modes of the commit process, what they mainly specify are the source and the target (which is actually the path we input in the repository field above), and what's missing here, the authentication information can be appended at the end, as below

      <external check-password="true">
         svn --non-interactive --non-recursive commit -F "%1" "$2-" -username someuser@gmail.com -password somepassword
      </external>

From now on, the CVS in svn mode for google code access should be properly configured. And the first thing to do afterwards is committing some file onto the server to activate the authentication, and once this is done, I guess google would approve this client and no longer request authentication data later on. And the user might well restore the svn plugin file to what it was. There should be some other nicer and more flexible way to specify the authentication information, like by reading it from the IDE's environment variables, some registry or whatever, but it surely would take some time to find them, and since for this particular use with google code, the data is sent once and for all, I am not very keen to make this exploration.



  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值