Author : Gowri Sundari

Published on: June 24, 2020

Category : Industry Updates

Print

“SVN” is a Centralized Version Control System, different from distributed Version Control like “GIT”.

What Does Centralized Version Control mean:

Centralized Version Control means that the version history is stored in the central server. When a developer wants to do change in a certain file, they pull the latest version of the file from the server to the own computer. After the developer made changes, they send the change files back to the central server with a different version.

How does SVN work:

  • The “Server”, which has all the version of all the files in the project
  • A “local copy of the files” which is on your computer

SVN Workflow:

gowri

Advantages of SVN:

  • Manage files between multiple users
  • SVN can be faster
  • Easier Merging
  • History

SVN commands in Linux:

  • SVN checkout/co:

Svn checkout or svn co. This command is used to pull an SVN tree from the server.

Syntax: svn checkout/co URL path

  • SVN add:

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 we do SVN commit.

Syntax: Svn add filename

Ex: svn add “testfile”

  • SVN delete:

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.

  • SVN commit/ci:

This command recursively sends your changes to the SVN server. It will commit changed files, added files and delete files

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:

SVN list used to view the content of the SVN repository without downloading the files.

Syntax: svn list

It displays the following information:

  • The revision number of the last commit
  • Author of the last commit
  • Size (in bytes)
  • Date & Time of the last commit
  • SVN Diff:

SVN diff displays the difference between your working copy and the original copy in the SVN repository

Syntax: svn diff filename

  • SVN status:

Get the status of the working file in the working copy. It displays whether the working copy file is modified or added/deleted, or the file is not under revision control etc

  • SVN log:

SVN remembers every change made to your files & directories. To know all the commits made in a file or directory.

Syntax: svn log path

  • SVN move:

It moves a file from one directory to another directory or renames a file.

Syntax:

Svn move source destination

  • SVN update:

Svn update command brings the changes from the repository into your working directory.

Better update the working copy before starts to work on the working directory.

Syntax:

svn update path

SVN requires to resolve the conflict manually:

Merging is a big problem with SVN.

When two or more developer working with the same code needs to merge. In this case, developers need to resolve the conflicts manually.

For a free consultation on IoT, Enterprise or Telecom Service, contact us at sales@thinkpalm.com

Author bio:

B612_20200206_135848_093

Gowri Sundari: Gowri is working at ThinkPalm as Senior Software Engineer. She is passionate about Perl & Python programming.

FacebooktwitterlinkedinFacebooktwitterlinkedin