您的位置:首页 > 职场人生

程序员成长笔记(二):SVN,Git,Mercurial

2016-01-11 14:36 549 查看
SVN:

概念:SVN是Subversion的简称,是一个开放源代码的版本控制系统,相较于RCS、CVS,它采用了分支管理系统,它的设计目标就是取代CVS。互联网上很多版本控制服务已从CVS迁移到Subversion。本质是:版本管理工具。详见百度百科:http://baike.baidu.com/link?url=RrCaqdqVdOX_Nmh8ftNiNirfNiWn-GAekDbBCzOYVtIaF976gEcgWfiW1ejFbERqiQqrHHsa_3lgD8hcebUyUq

使用教程:/content/5363456.html(这些都是在windows上的)


TortoiseSVN官网:http://tortoisesvn.sourceforge.net/


TortoiseSVN is an Apache™ Subversion
(SVN)® client, implemented as a Windows shell extension. It's intuitive and easy to use, since it
doesn't require the Subversion command line client to run. And it is free to use, even in a commercial environment. Simply the coolest Interface to (Sub)Version Control!

SVN in ROS :
Let's assume that the SVN source you would like to check out is located
at http://repository/svn/package_name. To do the initial checkout and build the package in your personal catkin directory, run the following commands. (If necessary, change the first command to reflect the actual location of your catkin source directory.)

<span style="font-family:SimHei;font-size:18px;">$ cd ~/catkin_ws/src
$ svn checkout http://repository/svn/package_name $ cd ~/catkin_ws
$ catkin_make
$ source devel/setup.bash
$ rospack profile
</span>


To update the package later on, run the commands:

$ cd ~/catkin_ws/src/package_name
$ svn update
$ cd ~/catkin_ws
$ catkin_make
$ source devel/setup.bash


Git:
基本概念:Git是一款免费、开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目。Git的读音为/gɪt/。Git
是 Linus Torvalds 为了帮助管理 Linux 内核开发而开发的一个开放源码的版本控制软件。

使用方法:
in ROS:
Let's
assume that the Git source you would like to check out is located at git://repository/package_name. To do the initial checkout and build the package in your personal catkin directory, run the following commands. (If necessary, change the first command
to reflect the actual location of your personal catkin source directory.)

$ cd ~/catkin_ws/src
$ git clone git://repository/package_name
$ cd ~/catkin_ws
$ catkin_make
$ source devel/setup.bash
$ rospack profile


To update the package later on, run the commands:

<span style="font-family:SimHei;font-size:18px;">$ cd ~/catkin_ws/src/package_name
$ git pull
$ cd ~/catkin_ws
$ catkin_make
$ source devel/setup.bash
</span>


Mercurial:

基本概念:Mercurial 是一种轻量级分布式版本控制系统,采用 Python 语言实现,易于学习和使用,扩展性强。其是基于 GNU General Public License
(GPL) 授权的开源项目。

使用方法:
in ROS:
Let's assume that the Mercurial source you'd like to check out is located at http://repository/package_name. To do the initial checkout and build the package in your personal catkin directory, run the following commands. (If necessary, change the first command to reflect the actual location of your personal catkin source directory.)

<span style="font-family:SimHei;font-size:18px;">$ cd ~/catkin_ws/src
$ hg clone http://repository/package_name $ cd ~/catkin_ws
$ catkin_make
$ source devel/setup.bash
$ rospack profile</span>


(In case you are wondering why Mercurial uses hg for its main command name, Hg is the symbol for the element Mercury on the Periodic Table in chemistry.) To update the package later on, run the commands:

$ cd ~/catkin_ws/src/package_name
<span style="font-family:SimHei;">$ hg update
$ cd ~/catkin_ws
$ catkin_make
$ source devel/setup.bash
</span>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: