Apache SVN Interview Questions & Answer [GUIDE TO CRACK]
Subversion SVN Interview Questions and Answers

Apache SVN Interview Questions & Answer [GUIDE TO CRACK]

Last updated on 04th Jul 2020, Blog, Interview Questions

About author

Giridharan (Sr SVN Administrator )

(5.0) | 16212 Ratings 1325

Subversion is a free/open source version control system (VCS). That is, Subversion manages files and directories, and the changes made to them, over time. This allows you to recover older versions of your data or examine the history of how your data changed. In this regard, many people think of a version control system as a sort of “time machine.”

1) What Exactly Is Svn?


Open source version control system (VCS) which is in the short referred to as SVN, specifically designed for tracing all the modifications that have taken place to the source code of your design or files. SVN is a source which is utilised to direct all the files and folders and all the recent modifications which have happened in these files. SVN helps us to keep a complete track of the changes done by any person or by yourself onto the files.

2) 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 Meting and Imp Email

3) 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.

4) What Is Use Of Revert In Svn?


Revert your local changes.

It have two types:

  • Local Revert: It will delete all changes from files which you made after updates and before commit.
  • Repo Revert: Upload the changes to previous Repo.

5) List Out All The Command Prompts Used In The Svn?


SVN has a quite long list of commands prompt out of which few are considered to be most effective and are regularly used in performing different operations in this system.
Some of the most commonly used common prompts in SVN are:

  • Revert
  • Import
  • Checkout
  • Commit
  • Update
  • Copy
  • Beside these command prompts SVN has also the presence of other set of commands which are handy for different set of operations.

6) How To Delete File From Svn Repo?


svn delete filename

7) What Is The Use Of Tortoisesvn?


TortoiseSVN is a Subversion client, implemented as a Microsoft Windows shell extension, that helps programmers manage different versions of the source code for their programs. It is a free software released under the GNU General Public License.

8)How To List The Entire Cos By A User In Different Jobs Through A Single Command?


  • ct lsco -me
  • this gives all checked out files by a user
  • ct lsco -avobs -cview -me
  • List all files checked out to all views by a user

9) Describe About Different Best Practices For Svn?


Some of the best practical approaches which are the best fit for SVN if effectively followed include:

  • The very first thing to be taken care of while working with the SVN is that make use of your own local space in order to perform any function in the SVN.
  • Secondly while working on SVN platform it is highly advisable to commit to all the autonomous changes no matter how small the changes may be. 
  • Making use of the comment option will be of a great help for the team to know what are the changes are done and why by just going through the comment section. 
  • The best approach in SVN is to validate all the set of files you are committing, you actually changed and it is always advisable to keep a copy of the update whenever you proceed to commit to the report.

10) Tell Us About All The Elements That Should Be Stored In The Svn Repository?


SVN repository can be used for storing all the existing changes and files which are present in the branches of the existing system. 

Here below is the list of all the things which are stored in the SVN repository:

  • MySQL Queries
  • Project regarding important files
  • Product Documents
  • Database Updates
  • Minutes of Meting and Imp Email
  • Source Code

11) Explain About The Concept Of Synchronizing With The Repository & Tell Us About The Disparity Between Synchronizing And Update?


The term synchronizing with the repository simply relates to the procedure of updating your local workspace with all the changes which have been committed by the other members of your team.

This is totally different from the concept of Update as Merge is a function that can be performed manually for the merge conflicts by simply using this.

12) 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

13) 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/my surface/programming 

file:///home/mysurface/repo/programing_repo-m “initial import”.

14) State The Procedure Of Creating A Patch Is Svn?


For the purpose of applying a patch in SVN the first thing you are required to do is to “Create Patch” by stimulating changes and creating the .dff file. Then, this existing .diff file can be implemented to the latest code base by using “Apply Patch”.

15) Differentiate Between The Git & Svn Repository?


The major differentiating aspects of GIT & SVN concepts are:

  • The command “commit” is not supported by GIT across multiple branches or tags & whereas SVN facilitates the creation of new folders t any location of your repository. 
  • GIT is considered to be unvarying where as SVN supports the function of multiple revisions.
  • In the case where your presented with larger files and frequently varying binary files, the GIT is less preferred & where as SVN is best preferred for handling a number of projects which are stored in the same repository.

16) Differentiate The Concepts Of Commit And Update?


In the SVN repository the word update relates to the process of updating the local workspace in relation to all the changes which are done within the repository by the members of the team.

While the word commit relates to the simple process of making changes within the local to repository. In much easier terminology it can stated as uploading a file into the repository.

17) What Can You Say Regarding The G & R Result Codes In Svn?


The SVN result codes are:

G Code: G Code indicates all the changes which are that are consolidated into working copy of the report automatically. 

R Code: R Code specifies that particular context or item which is replaced in the present working directory copy. It indicates that a particular file has underwent some changes are is arranged for deleting and some other new file is scheduled to get added in its area.

18) State The Process Involved To Revert To A Previous Version?


For the purpose of retrieving the previously existing version, the main command on which you are needed to focus is the “revert” command. The action performed by the revert command is that it simply erase all the local edits. But the main command which is needed to be used for this operation is the “merge” command. 

 This can be explained with a simple example.  For instance, the present version of your file [xyz.txt] is version 201 and the version which you currently require is 301.

In such an instance the command code should be executed in this manner

 svn merger 201:301 xyz.txt

svn commit –m “Reverted to revision 301” xyz.txt

    Subscribe For Free Demo

    19) What Do You Mean By “synchronizing With Repository” ? How Is It Different From “update”?


    Synchronizing with Repository is the process of updating the local workspace with the changes committed by others. This is different from Update as we can do Merge Manually for the Merge conflicts using this.

    20) What Is The Best Practice For Svn?


    Best practices for SVN:

    • 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

    21) 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.

    22) 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”.

    23) 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.

    24) 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.

    25) 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.

    26) 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

    27) What Is The Function Of Revert In Subversion?


    “Revert” function will remove your local changes and reload the latest version from the repository.

    28) 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
    Course Curriculum

    Get Subversion SVN Training with Industry Oriented Topics From Real-Time Experts

    • Instructor-led Sessions
    • Real-life Case Studies
    • Assignments
    Explore Curriculum

    29) 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.

    30) 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

    31) What Are The Commands 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

    32) What is the command to view the difference between the local version and repository version?


    The command used to view the difference between the local and repository version is

    • svn diff filename
    • svn diff dirname

    33) 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 the 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

    34) 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.

    For example, you have a project located in the repository created at URL location http://www.guru99.com/svn/myrepo/myproject.  So you have to checkout myproject into your local system assuming myrepo is a public repository. You will use code

    • svn co http://www.guru99.com/svn/myrepo/myproject .

    This command will copy all your files to your current directory. If you want checkout the directory which is in a private repository, you will then use the following command

    • svn co http://www.guru99.com/svn/privaterepo/myproject –username admin –password admin

    35) List out what is the best practices for SVN?


    1. Work from your own local work-space
    2. Commit small autonomous changes
    3. Use comment
    4. Validate the files you are committing, you actually changed
    5. Take Update before commit to the Repo.

    36) What is Version Control System?


    It is a software that helps software developers to work together and maintain a complete history of their work.

    37) What are the different goals of Version Control System?


    Following are the goals of VCS:

    • It allow developers to work simultaneously.
    • Do not overwrite each other’s changes.
    • Maintain history of every version of everything.

    38) What are the different categories of VCS?


    Following are the different categories of VCS:

    • Centralized Version Control System (CVCS)
    • Distributed/Decentralized Version Control System (DVCS).

    Centralized Version Control System – works on client-server model. There is a single master copy of the code base so the developer who has to work on part of that code need to lock it and take the check out.

    Distributed Version Control System – these system works on peer-to-peer model. There is still a master copy of the code base, but it is on a client machine rather than a server. There is no locking of parts of the code; developers make changes in their local copy and then, once they are ready to integrate their changes into the master copy, they issue a request to the owner of the master copy to merge their changes into the master copy.

    Course Curriculum

    Enroll in Instructor-led Subversion SVN Course to UPGRADE Your Skills

    Weekday / Weekend BatchesSee Batch Details

    39) What is the repository in version control system?


    It is the central place where developers store all their work. Repository not only stores files but also the history. Repository is accessed over a network, acting as a server and version control tool acting as a client.

    40) What is the trunk in version control system?


    The trunk is a directory where all the main development happens and is usually checked out by developers to work on the project.

    41) What are the tags in version control system?


    The tags directory is used to store named snapshots of the project. Tag operation allows to give descriptive and memorable names to specific version in the repository.

    42) What are the branches in version control system?


    Branch operation is used to create another line of development. It is useful when you want your development process to fork off into two different directions.

    43) What is the life cycle of Version Control System?


    Here is the life cycle of Version Control System:

    • Create Repository
    • Checkout
    • Update
    • Perform Changes
    • Review Changes
    • Fix Mistakes
    • Resolve Conflicts
    • Commit Changes

    44) What is create repository in VCS?


    The ‘create’ operation is used to create a new repository. Most of the times this operation is done only once.

    1. What is the difference between Git and SVN?

    Git is a Decentralized Version Control toolSVN is a  Centralized Version Control tool
    It belongs to the 3rd generation of Version Control toolsIt belongs to the 2nd generation of Version Control tools
    Clients can clone entire repositories on their local systemsVersion history is stored on a server-side repository
    Commits are possible even if offlineOnly online commits are allowed
    Push/pull operations are fasterPush/pull operations are slower
    Works are shared automatically by commitNothing is shared automatically

    45) What is a distributed VCS?


    • These are the systems that don’t rely on a central server to store a project file and all its versions.
    • In Distributed VCS, every contributor can get a local copy or “clone” of the main repository.
    • As you can see in the above diagram, every programmer can maintain a local repository which is actually the copy or clone of the central repository which is present on their hard drive. They can commit and update their local repository without any hassles.
    • With an operation called “pull”, they can update their local repositories with new data from the central server and “pull” operation affects changes to the main repository from their local repository.

    46) What is SubGit?


    SubGit is a tool for SVN to Git migration. It can create a writable Git mirror of a local or remote Subversion repository and use both Subversion and Git as long as you like.

    Now you can also include some advantages like you can do a fast one-time import from Subversion to Git or use SubGit within Atlassian Bitbucket Server. We can use SubGit to create a bi-directional Git-SVN mirror of an existing Subversion repository. You can push to Git or commit to Subversion as per your convenience. Synchronization will be done by SubGit. 

    47)Basic use of Subversion


    Here are some examples of common operations that are performed with a Subversion (SVN) repository. They are shown here using the SVN command-line client but the same operations apply to any SVN client.

    The examples show the typical development process using Subversion (SVN):

    1. Import existing code into the SVN repository
    2. Standard work cycle of development and testing
    3. Commit the finished code to the SVN repository

    The examples on this page refer to a source code file prog.c in the repository repo1 of the BigProject project, being accessed by a user with the username nye.

    48) Importing Code


    Import files into the repository with the svn import command:

    > svn –username nye import prog.c -m “Initial import” https://svn.rcs.le.ac.uk/BigProject/repo1/prog.c

    Authentication realm: <https://svn.rcs.le.ac.uk:443> RCS SVN Repository

    Password for ‘nye’: ********

    Adding     prog.c

    Committed revision 1.

    Use the -m option to add a comment explaining why the change was made. Whenever changes are made to the contents of the repository, SVN will expect a comment to be added for the audit log.

    At this point the program source file is in the repository and has a revision number 1. It would be accessible as https://svn.rcs.le.ac.uk/BigProject/repo1/prog.c

    Subversion SVN Sample Resumes! Download & Edit, Get Noticed by Top Employers! Download

    49) Work Cycle


    Once you have imported some code into the repository, you would typically follow this work cycle of development and testing:

    1. Checkout a working copy of the code
    2. Make changes to the code
    3. Resolve conflicts
    4. Commit the updated code to the SVN repository

    50) Checkout the working copy


    Use the svn co command to check out the latest version of the code to the local file system. You can only check out directories, not individual files. Therefore in this example the top level of the repository must be checked out.

    > svn –username nye co https://svn.rcs.le.ac.uk/BigProject/repo1

    svn co https://svn.rcs.le.ac.uk/BigProject/repo1

    Authentication realm: <https://svn.rcs.le.ac.uk:443> RCS SVN Repository

    Password for ‘nye’: ********

    A   repo1/prog.c

    Checked out revision 1.

    This creates a new directory repo1 containing a working copy of the prog.c file.

    51) Make changes


    Once you have checked out the code, you can make changes and compile and test the code as normal.

    SVN allows collaborators to work on the same files concurrently, so before committing the updated file to the repository it is a good idea to check whether there are any conflicts between your changes and any changes that may have been made by someone else.

    52) Resolve conflicts


    Run the svn update command. This will attempt to bring your working copy up to date with the latest version in the repository. If there are any conflicts they will be flagged for further action before the working copy can be updated.

    In the example below a conflict has occurred between the working copy and the copy in the repository.

    > svn –username nye update prog.c

    Authentication realm: <https://svn.rcs.le.ac.uk:443> RCS SVN Repository

    Password for ‘nye’: ********

    Conflict discovered in ‘prog.c’.

    Select: (p) postpone, (df) diff-full, (e) edit,

         (mc) mine-conflict, (tc) theirs-conflict,

         (s) show all options:

    How to proceed at this point depends on the nature of the conflict. See the Resolving Conflicts section in Version Control with Subversion for more information.

    Are you looking training with Right Jobs?

    Contact Us
    Get Training Quote for Free