Phillip Pearson - web + electronics notes

tech notes and web hackery from a new zealander who was vaguely useful on the web back in 2002 (see: python community server, the blogging ecosystem, the new zealand coffee review, the internet topic exchange).

What is absolutely required in a .svn directory for 'svn update' to work

.svn directories contain lots of files, but it seems that you only need a relatively small subset for everything to work. Here it is:

.svn/format — required for svn to work at all. A two byte file, with contents “4\n”.

.svn/tmp — required for ‘svn update’. An empty directory.

.svn/text-base — required for most things to work. Contains a pristine copy of each file in the working dir, with “.svn-base” appended to the filename.

It seems that ‘svn status’ actually compares each file in the working dir against its equivalent in .svn/text-base to determine whether it has been modified (it doesn’t use the checksums in .svn/entries). If you remove .svn/text-base, ‘svn status’ says everything in the working dir is modified, and ‘svn update’ appears to work but doesn’t seem to do anything (although I haven’t tested it much).

.svn/entries — required for svn to work at all. An XML file containing details of each file in the directory. The minimum required fields seem to be:

It looks like dir-wcprops, prop-base, props and wcprops aren’t required. ‘svn update’ recreates dir-wcprops if you delete it.

If a file in the directory has a different revision to the directory itself, its <> element gets a ‘revision’ attribute. Otherwise all files have the revision specified in the directory’s <> element’s ‘revision’ attribute.

← Previous - Next →