Hello friends, This blog is to introduce subversion.
It is software which is used for tracking the changes in collaborative management system. It tracks the history of a file using different versions. Each version contains new changes and the information about it’s author.We checked out the complete code from subversion directory this is called our working directory. We make changes in this directory and then make a new revision of changes using svn commit.Now svn track these changes.

There are few commands you will need while working with svn.

  • svn –help
    list all of the svn command. You can use this also with specific command
    e.g: svn help commandName
  • svn add fileName/dirName
    This command is used to add a file or directory to svn. But note that after using this command commit is necessary otherwise svn doesnot track the changes.
  • svn ci file or svn commit fileName
    This is used to commit the file or directory.
  • svn ci -message “any message to related commit” fileName
    svn ci -m “any message to related commit” fileName
    These are used to commit the file or directory with message.
  • svn commit file1 file2 file3
    Used to commit more than one file
  • svn blame fileName
    It will show the content of file annotated with author and revision.
  • svn cat fileName
    It will show all the content of file under svn.
  • svn checkout http://subversion-repositry-url
    or

  • svn co http://subversion-repositry-url
    It is used to checkout the project from svn.
  • svn cleanup
    It is used clean the svn files resulting from escaped processes and crashed.
    svn copy source destination_clone
    or
    svn cp source destination_clone
    Used to copy files from one local directory to other or from repositry server url.
  • svn delete fileName
    or svn del or rm fileName
    Used to delete file from svn.
  • svn diff fileName
    or
    svn di fileName
    Used to show difference between subversion file and your local file.
  • svn diff -r revesion1:revisio2 fileName
    Used to show difference between two specified revision.
  • svn diff fileName > patch-file
    Used to make patch for changes.
  • svn info fileName
    Show the information of files.
  • svn list fileName/Dir
    list files or directory of files in repositry.
  • svn lock fileName -m “message why you lock the file”
    svn unlock fileName to unloack the file.
  • svn log
    Show svn messages for set of revision.
    svn log fileName
    Svn messages for set of file.
    svn log -v
    List verbose information about changes in repositry.
    svn log -l 10
    Svn messages for last 10 revesion.
  • svn log -r RevisionNumber http://URL-of-file
    Show changes associated in given revision for particular file.
  • svn status
    Used to show status of file changes in current directory and recursively in directories below.

  • svn status -u
    Used to show status of file changes in current directory and repositry.
  • svn switch http://server/new-branch
    Switch your local working copy to mirror a new repository branch instead of previous branch.
    svn switch –relocate http://server/old-path http://server/new-path
    This allows you to point your repository to a new path on the server.
  • svn update
    This is used to migrate all updates from Subversion repository to your local copy.
    svn update fileName
    Update the given file only.
    svn update -r(revision no)
    This update the local copy with the given revision.

I hope it will help you.