1. 程式人生 > >程式設計師成長筆記(二):SVN,Git,Mercurial

程式設計師成長筆記(二):SVN,Git,Mercurial

SVN:

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>