Version Control Systems The ADI (Analog Devices, Inc.) specific GNU (GNU's Not Unix) toolchain, u-boot and buildroot Lniux distribution projects keep their source code in GIT. While the ADI (Analog Devices, Inc.) specific Linux libraries, applications and test suites are kept in Subversion (SVN (Subversion)). git git is a fast distributed scm that is used in many open source projects but most notably, the Linux kernel. Unlike SVN (Subversion)/CVS (Concurrent Versions System), it has no centralized repository. All of the blackfin Linux projects except for the obsolete uClinux-dist switched to the new GIT repositories at http://blackfin.uclinux.org/ from the SVN (Subversion) repositories. Check out the ADI Linux projects The sub directory will be called “u-boot”: $git clone git://git.code.sf.net/p/adi-toolchain/blackfin toolchain $git clone git://git.code.sf.net/p/adi-u-boot/code u-boot $git clone git://git.code.sf.net/p/adi-buildroot/code buildroot Subversion Subversion is touted as a replacement for CVS (Concurrent Versions System). Improvements include: Better file movement handling Better branch and merge features More suited to work groups Atomic commits True version History An online book is available http://svnbook.red-bean.com. Packages The source code for subversion itself is found at its homepage http://subversion.tigris.org. Most popular distributions already have packages available for you. Quick Start Check out the ADI open application project $svn checkout svn://svn.code.sf.net/p/adi-openapp/code/trunk adi-open-app Initial actions find out what version you have checked out:$svn info find out what version upstream is at:$svn info svn://svn.code.sf.net/p/adi-openapp/code/branch/2008R1 look at the files that were updated upstream:$svn log -v svn://svn.code.sf.net/p/adi-openapp/code/branches/2008R1 | less bring your working copy up-to-date with the repository$svn update bring your working copy up-to-date with a specific revision in the repository (this can upgrade or downgrade, depending on the revision you give):$svn update -r 5316 check the status of your local copy:$svn st'A' Added 'C' Conflicted 'D' Deleted 'I' Ignored 'M' Modified 'R' Replaced '?' item is not under version control '!' item is missing (removed by non-svn command) or incomplete see what has changed in your local version, and why:$svn log -v | less to get unified diff output of your local changes:$svn diff commit a new version into the repository:$svn commit Switching Between Repos Say you want to checkout a repository from a fast local mirror and then use that checkout to commit to the original repository (so you don't need to check things out twice from different servers). SVN (Subversion) provides a method for switching the repository your local checkout works against. $ svn co svn://some.fast.mirror/project/trunk project $ cd project $ svn switch --relocate svn://some.fast.mirror/project/trunk svn://some.slow.server.to.commit.to/project/trunk Once you've made your checkins, you can of course switch back to the fast mirror by doing the inverse of the above switch command. Branches/Tags While CVS (Concurrent Versions System) requires you to use magic commands to create tags and branches, SVN (Subversion) has actual directories in the top level. So to create a branch in svn, you would: $ svn cp trunk branch/2013R1 $ svn commit -m 'add new 2013R1 branch' branch/2013R1 And to tag a release: $ svn cp branch/2013R1 tags/2013R1-RC1 $ svn commit -m 'tag new 2013R1-RC1 release' tags/2013R1-RC1 Quick References Here's a quick reference for common commands and their counterparts in CVS (Concurrent Versions System), SVN (Subversion), and git. Most commands are (purposefully) pretty much the same, but the little details are what nag you. Purpose , CVS (Concurrent Versions System) , SVN (Subversion) , GIT Checkout a repository , cvs -d co , svn co , git clone Update a repository , cvs up , svn up , git pull See changed files , cvs up , svn st , git status Revert local changes , cvs up , svn revert , git checkout Accessing revisions , cvs … -r old_rev -r new_rev … , svn … -r old_rev:new_rev … , git old_rev..new_rev Generating diffs , cvs diff file , svn diff file , git diff file Viewing history , cvs log file , svn log file , git log file Adding files , cvs add file , svn add file , git add file Removing files , cvs rm file , svn rm file , git rm file Rename a file , (no cvs equivalent) , svn mv , git mv Copy a file , (no cvs equivalent) , svn cp , (no git equivalent) Commit changes , cvs commit -m 'log message' file , svn commit -m 'log message' file , git commit -m 'log message' file blackfin.uclinux.org Services Other than per-project repositories, people with accounts may create as many per-user git or svn repos as they like. However, the interface is command line only (no website interface to this). By default, the repo is created with permissions such that only you may access it (read or write). If you want, you can change the permissions to let any one read it (but you still are the only one who can write it). The interface is simple (to use the svn version, simply change git-publish to svn-publish): $ssh $USER@sources.blackfin.uclinux.org git-publish -hUsage: git-publish Usage: git-publish Usage: git-publish Usage: git-publish Usage: git-publish Usage: git-publish <-r|--remove) Public: world readable (git/rsync) and via http viewgit Semipub: world readable (git/rsync) but not via http viewgit Private: readable only by you So to create a new git repo and then check it out, you do: $ssh $USER@sources.blackfin.uclinux.org git-publish -c foo$git clone ssh://$USER@sources.blackfin.uclinux.org/git/$USER/foo.git Or for svn: $ssh $USER@sources.blackfin.uclinux.org svn-publish -c foo$svn co svn+ssh://$USER@sources.blackfin.uclinux.org/svn/users/$USER/foo The git interface has a gitweb interface, but there is nothing for svn.