Apache Subversion Interview Questions for Freshers Part - 1

Apache Subversion Interview Questions
Explain What Is Svn?
SVN or Subversion is an open source control system; it is used to trace all the changes made to your source code or files. It is a repository used to manage files, folders, directories and the modification made to these files over a period of time. While SVN repository provides a complete history of changes made to the files and can easily track if someone had made changes in the file.
Mention What Is The Difference Between Git And Svn Repository?
The difference between SVN and GIT is
Git does not support “commits” across multiple branches or tags. Subversion allows the creation of folders at any location in the repository layout
Gits are unchangeable while subversion enables committers to treat a tag a branch and to create multiple revisions under a tag root
Git is less preferred for handling large files or frequently changing binary files while SVN is capable of handling multiple projects stored in the same repository
List Out What All Things Should Be Stored In Svn Repository?
In SVN repository you can store
Source Code
Build scripts
Test data used by QA
DB schema
Project settings (When whole team is using the same IDE)
Project documentation (Internal and External)
Minutes of meetings, significant e-mails and info from the web
Expensively generated artifacts
And other documents related to the project
Mention What Is The Command To Add A File Or Dir?
To add a file or dir in SVN the command you will use
svn add filename
svn add dirname
List Out The Common Subversion Commands?
Common subversion commands include
Import
Checkout
Commit
Update
Other than these it also has command like revert, move, copy and merge.
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.
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”.
Mention What Is The Command To Create A New Directory Under Version Control?
Command to create a new directory under version control includes
svn mkdir directory
svn mkdir http://url/directory
Mention How You Can Import Your Existing Directory Into The New Repository?
The command you will use to import your existing directory into the new repository you have to write
svn import/home/mysurface/programming file:///home/mysurface/repo/programing_repo-m “initial import”
Mention What Is The Command To See What Is Inside The Repository?
Command svn list file:///home/mysurface/repo/programming_repo is used to see what is inside the repository.
Mention What Is The Command Use To View The Difference Between The Local Version And Repository Version?
The command uses to view the difference between the local and repository version is
svn diff filename
svn diff dirname
Mention What Does The Result Codes G And R In Svn Indicates?
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
Mention What Is The Function Of Revert In Subversion?
“Revert” function will remove your local changes and reload the latest version from the repository.
Explain How You Can Revert To A Previous Version?
To retrieve a previous version, you have to use “revert” command. But revert command will simply erase local edits, what you actually need is to “merge” command. For example, you have a file [abc.txt] and the current version is 101, and you want version 201. Then you will use the command like
svn merge –r 101:201 abc.txt
svn commit –m “Reverted to revision 201” abc.txt
Mention What Are The Command That Can Be Used To Move Some Subset Of Code And History Of This Code From One Svn Repo To Another?
Following commands can be used
svnadmin dump
svndumpfilter include
svnadmin load
svn remove
List Out What Is The Best Practices For Svn?
Best practices for SVN is
Update and Test before commit
Work from your own local workspace
Commit small autonomous changes
Validate the files you are committing, you actually changed
Keep in touch with repository
Watch for conflicts
Always group your check-in logically
Use comment
Explain What Checkout Command Is And How To Use The Checkout Command In Svn?
Check-Out command in SVN is used to create a local workable copy of your project retrieved from the local 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 baselining the code after a major release.

Related

Interview Questions 5347961284475161436

Post a Comment

emo-but-icon

item