Intro to subversion's working copy

Source: Internet
Author: User
Tags svn update

Apache subversion (also referred to as SVN) is an open source version control system. although it's widely used for managing source code files, it can be actually be used to manage any type of file: images, videos and Word documents can all be managed with subversion. at its core, subversion allows teams to manage and coordinate the changes being made to a collection of files.

Subversion consists of two major elements. the first is the repository, which is a server where all your files are stored. the most recent revision of the repository is called the head, although you can access previous versions from the repository. the second element, is the working copy, which we will need e in-depth in this post.

The working copy

'working copy' is a term that's thrown around a lot in Subversion tutorials and guidelines-but what exactly is the working copy, and how does it work? Essential, A Subversion working copy is a directory tree on a local system that looks like any other ordinary directory full of files, but it provides a developer with their own private work area, complete with copies of the files contained within the repository. subversion waits for instructions before making your working copy changes public, or in‑ating other people's changes into your workspace. when you're ready to perform either of these actions, subversion has the following commands:

      • SVN commit-Sends changes from your working copy to the repository. log messages can be added with either the-file or-message switch.

         

      • SVN update-Updates your working copy with changes from the repository. the-revision switch can be used to provide a revision, or a range of revisions, to be updated. if no revision is specified, this command brings your working copy into line with the head (I. e The latest) revision.

 

 

The working copy contains all the files that have been checked out from the Subversion repository, but it also contains some additional files generated by subversion to help maintain the working copy. one of these additional files, is '. SVN subdirectory 'which serves as the working copy's administrative directory, and helps subversion distinguish which of the versioned files contain unpublished changes, and which files are out of sync with the repository.

If you 've been using previous versions of subversion, you'll notice that. SVN subdirectory underwent a major change in Subversion 1.7. in 1.7, the working copy metadata is stored in a single location, with just one. SVN directory in the root of the working copy. previusly, subversion maintained. SVN directory in every versioned directory of the working copy.

Things to watch out

The. SVN folders are critical to subversion's smooth running. typically, the best cause of action is to leave them alone, but there are several issues worth bearing in mind, to avoid disrupting these hidden folders:

  • Do not delete!-. SVN file contains the metadata that links the parent folder with the repository, So if you delete. SVN, your working copy will be unable to communicate with the repository-subversion will stop working completely!
  • No nesting-Do not try to nest one working copy inside another working copy (regardless of whether the working copies have been checked out from the same repository, or different repositories .) nesting will confuse. SVN folders, and it is likely they will be unable to communicate with any of the corresponding repositories.
  • watch out for hidden. SVN folders -make sure that when you are adding a folder to your working copy, it doesn't contain a hidden. SVN folder. if you try to copy a folder into a working copy that already contains. SVN folder, you will just get an error. if you really need to add the folder, you must first delete all the extra. SVN folders.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.