SVN Interview Questions
What is SVN?
Subversion is an open source control system which is used to trace all the changes made to your source code.
List out what all things should be stored in SVN repository?
- Source Code
- MySQL Queries
- Database Updates
- Project regarding important files
- Product Documents
- Minutes of Metting and Imp Email
How to delete file from SVN Repo?
SVN delete filename
Difference between SVN commit and SVN update?
SVN commit:: Push (upload) the local changes to Repository.
SVN Update:: Get (download) the Repository changes files to local system.
List out what is the best practices for SVN?
- Work from your own local work-space
- Commit small autonomous changes
- Use comment
- Validate the files you are committing, you actually changed
- Take Update before commit to the Repo.
Explain how you can apply a patch in SVN?
To apply a patch in SVN, you are required to “Create Patch” by making changes and generating the .diff file. Then this .diff file can be implemented to the new code base using “Apply Patch” .
What is the command use to view the difference between the local version and repository version? Mention.
The command uses to view the difference between the local and repository version is
svn diff filename
svn diff dirname
What does the result codes G and R in svn indicates? Mention.
The result codes G and R in svn indicates
G code: Changes on the repo were automatically merged into the working copy.
R code: This code indicates that item has been replaced in your working copy. This means the file was programmed or scheduled for deletion, and a new file with the same name was scheduled for addition in its place.
What is the function of Revert in subversion? Mention.
“Revert” function will remove your local changes and reload the latest version from the repository.
What is “branch” , “Tag” and “Trunk” in SVN ?
Trunk is the main body of development, originating from the start of the project till end.
Branch is a copy of code derived from a certain point in the trunk that is used for applying major changes to the code while preserving the integrity of the code in the trunk.
Trunk is a point in time on the trunk or a branch that you wish to preserve. This is like base-lining the code after a major release.
Difference between Update and Commit ?
Update is used to update the local workspace with the changes committed by the team to the repository whereas Commit is the process to push changes from local to repository.
Explain what is the difference between commit and update?
Update is used to update the local workspace with the changes made by the team to the repository, while commit is the process to implement changes from local to repository, in simple words, upload a file into repository.