SVN is a sub-version of Version Control System (VCS), which is often classified as a free-source or an open-source control system. This indicates that subversion controls directories and files moreover even the modifications made to them as well. This allows a developer to recover earlier versions of information or assess the records of how a particular data was altered. SVN (Subversion) is also regarded as a Centralized Version Control System, that is different from distributed Version Control like “GIT”.
A centralized version control system works on a client-server model where the version history is stored in the central server. As the name indicates, a centralized version control system (VCS) updates the history of modifications on a “Central Server” from which developers can request for the latest version of the work and update their latest changes into it. This strategy suggests that every developer sharing the server also shares their work with each other.
An SVN setup has 2 main elements :
SVN Workflow
This command is used to pull an SVN tree from the server.
Syntax: svn checkout/co URL path
When we are creating a new file or directory, it needs to tell the SVN server about it. It doesn’t show in the SVN repository until and unless we perform an SVN commit.
Syntax: Svn add filename
Ex: svn add “testfile”
The file will be deleted from the local sandbox immediately as well as from the repository after committing.
EX: svn delete “sample.txt”
Delete the file from the local.
This command recursively sends your changes to the SVN server. It will commit changed files, added files and delete files
It lets you commit a simple modification to a file with the commit message on the command line.
Ex:
svn commit -m “added testfile”
Output: sending a
Transmitting file data
Committed revision 3
Ex: svn commit -m “remove the file sample.txt”
Deleting sample.txt
Committed revision 4
SVN list is used to view the content of the SVN repository without downloading the files.
Syntax: svn list
It displays the following information :
SVN diff displays the difference between your working copy and the original copy in the SVN repository
Syntax: svn diff filename
This code lets you get the status of the working file in the executing copy. It displays whether the working copy file is modified or added/deleted, or the file is not under revision control, etc.
SVN identifies every change made to your files & directories. Therefore, the SVN log is used to know all the commits made in a file or directory.
Syntax: svn log path
It moves a file from one directory to another directory or renames a file.
Syntax:
Svn move source destination
SVN update command brings the changes from the repository into your working directory.
Therefore, it’s better to update the working copy before commencing to operate on the working directory.
Syntax:
svn update path
During SVN update conflicts are required to be resolved manually, as merging is an issue with SVN.
If your project is sufficiently complex, you’ll discover that it’s sometimes better to implement the SVN repository, as it is shared, there is no extra set-up required and therefore makes collaboration easier.
For a free consultation on IoT, Enterprise or Telecom Service, contact us at sales@thinkpalm.com