2020年4月23日
Ubuntu中使用svn
- 安装svn客户端
sudo apt-get install subversion
- 帮助(help)
svn help
svn help <subcommand>
- 检出(checkout)
svn checkout URL[@REV]... [PATH]
栗子:svn checkout https://192.168.0.242/svn --username lizy
- 更新(update)
svn update [PATH...]
- 显示日志(log)
svn log [PATH] [@REV]
- 添加文件(add)
svn add PATH...
栗子:svn add main.c
- 提交(commit)
svn commit [PATH...]
栗子:svn commit -m "注释信息" main.c
- 删除文件(delete)
svn delete [PATH...]
- 还原(revert)
svn revert PATH...
#取消添加文件
svn revert --depth infinity PATH
- 清理(cleanup)
usage: cleanup [WCPATH...]
问题1:更新时报树冲突
D C catkin_ws/src > local dir unversioned, incoming dir add upon update Summary of conflicts: Tree conflicts: 1
解决1:
robot@RK612B:~$ svn resolve --accept working catkin_ws/src Resolved conflicted state of 'catkin_ws/src' robot@RK612B:~$ svn revert catkin_ws/src Reverted 'catkin_ws/src' robot@RK612B:~$ svn status catkin_ws
附全部子命令:
Available subcommands:
add
blame (praise, annotate, ann)
cat
changelist (cl)
checkout (co)
cleanup
commit (ci)
copy (cp)
delete (del, remove, rm)
diff (di)
export
help (?, h)
import
info
list (ls)
lock
log
merge
mergeinfo
mkdir
move (mv, rename, ren)
patch
propdel (pdel, pd)
propedit (pedit, pe)
propget (pget, pg)
proplist (plist, pl)
propset (pset, ps)
relocate
resolve
resolved
revert
status (stat, st)
switch (sw)
unlock
update (up)
upgrade