User Tools

Site Tools


mywiki:versiontool:start

This is an old revision of the document!


svn ( Subversion )

Add all files without any ignore for the first time to import to svn svn add --force --no-ignore
add all new files, even for files/directories started with ., for example .hgsub svn status | grep '\?' | awk '{print $2}' | xargs svn add
delete all files which is missing in the svn repository svn status | grep '^!' | awk '{print $2}' | xargs svn delete --force

Remote Fully Backup Repository

Backup Example svnrdump dump svn://myrepohost.com:port/repos/myproject > C:\myrepobackup.dump
Restore Example svnrdump load svn://myrepohost.com:port/repos/newproject < C:\myrepobackup.dump

Remote Partially Backup Repository

Basic the script is like below to clone openwrt svn repo to local windows PC:

dest_repo="https://sgh-pc/svn/openwrt"
src_repo="svn://svn.openwrt.org/openwrt"

#create local empty repository: one time effort
#svnadmin create --fs-type fsfs ./openwrt

#int Pre-revision-change.cmd hook: just exit 0 should be ok

#syn initialize from openwrt repo to local repo: one time effort
#svnsync init $dest_repo $src_repo --sync-username svnsync --sync-password svnsync

#main script to syn openwrt to local repo: 
svnsync sync $dest_repo $src_repo --sync-username svnsync --sync-password svnsync  

In Windows, use visualsvn as svn server.

Note: if windows file system is NTFS, it had better set VisualSVN Server and visualSVN service login with windows administrator. Its detail path is :

Start→Control Panel → Administrative Tools → Services →

Otherwise, it will report trick errors, like: access Pre-revision-change fail or non-exist, access write-lock fail and so on.

mywiki/versiontool/start.1405866317.txt.gz · Last modified: (external edit)