Intro to Subversion’s Working Copy

转载 2013年12月05日 15:10:48

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 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 explore 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? Essentially, 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 incorporating 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 to. 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 a ‘.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 the .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. Previously, Subversion maintained a .svn directory in every versioned directory of the working copy.

Things to Watch out For

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! – the .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 the .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 a .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.


Subversion Working Copy Format

从svn导入项目的时候,Subversion Working Copy Format不能选择1.8的解决方法:在安装svn客户端的时候一定要勾选command line client tools项,如...
  • sjp_87
  • sjp_87
  • 2018年02月24日 10:36
  • 203

SVN Working copy is too old

遇到这个问题的时候怎么办? 解决办法: 找到报错对应的文件夹,里面有个.svn的文件夹,去掉在commit试试!...
  • xb12369
  • xb12369
  • 2012年07月23日 16:11
  • 3660

svn:The working copy needs to be upgraded,eclipse不编译

eclipse不编译,每次修改代码控制台都显示错误 svn:The working copy needs to be upgraded org.apache.subversion.javahl...
  • pk490525
  • pk490525
  • 2013年09月22日 15:48
  • 19473

SVN Unsupported working copy format解决

环境:VisualSVN-Server-2.5.5 + TortoiseSVN-1.6.16 + MyEclipse 6.5 问题:更新项目出现org.tigris.subversion.javahl...
  • Wentasy
  • Wentasy
  • 2012年07月08日 09:35
  • 19529

SVN : Working copy is too old (format 10, created by Subversion 1.6)

svn报错Solve ""svn : Working copy is too old (format 10, created by Subversion 1.6)。这个其实是由于我替换的文件夹,里面包...
  • chuanyituoku
  • chuanyituoku
  • 2013年12月02日 15:05
  • 5939

svn: Working copy xxx is too old (format 10, created by Subversion 1.6)

原因是Cornerstone软件 SVN checkOut得时候选择版本过低 xcode需要1.7以上版本  解决方案:删除项目 重新checkout时选择1.7版本...
  • keeploliu
  • keeploliu
  • 2015年08月26日 13:39
  • 1085

eclipse svn 插件 版本升级 解决 downgrading your Subversion client to use this working copy 的错误

1  这是 1.6.x版本的svn 2
  • changdejie
  • changdejie
  • 2014年03月05日 11:59
  • 5051

Subversion版本控制 — 分支和合并(三)

概要   一种项目开发流程: (1)各开发成员建立自己的分支,并在此分支上开发。 (2)各开发成员把分支合并到主干上,形成较为稳定的版本。 (3)各个成员重新从主干上建立新的分支,回到第一步...
  • zhangskd
  • zhangskd
  • 2012年07月17日 18:05
  • 6625

svn1.7 appears to be part of a Subversion 1.7 or greater working copy. Please upgrade your Subversio

The current (8.0-SNAPSHOT) build uses version 1.5 of the maven-svn-revision-number-plugin plugin, wh...
  • Sky786905664
  • Sky786905664
  • 2017年06月19日 09:35
  • 635

SVN报错The working copy needs to be upgraded

报错信息为:org.apache.subversion.javahl.ClientException: The working copy needs to be upgraded svn: Work...
  • limenghua9112
  • limenghua9112
  • 2016年02月18日 15:23
  • 9471
您举报文章:Intro to Subversion’s Working Copy