/breezy-svn/trunk

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy-svn/trunk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Development
===========

Unit testing
~~~~~~~~~~~~
To run the breezy-svn testsuite, simply run 
'brz selftest --starting-with=bazaar.plugins.svn' or 
run 'make check' in the top-level breezy-svn directory.

Unavailable breezy API's
~~~~~~~~~~~~~~~~~~~~~~~~
When dealing with things that are only available in newer versions of Breezy, 
please mention in what Breezy version they became available. This makes it 
easy to clean up the code later, e.g.::

	try:
		from breezy.revspec import revspec_registry
	except ImportError:
		# Not available in Breezy < 1.12
	else:
		revspec_registry.register_lazy("svn", "breezy.plugins.svn.revspec", 
			"RevisionSpec_svn")

Structure
~~~~~~~~~

breezy-svn provides Subversion-specific implementations of Branch, ControlDir,
Prober, Repository and WorkingTree.

Subversion essentially has two formats - the repository directory, which
contains all the revision data and the branches, and the working copy, which is
what the user works in.

Because of this, breezy-svn provides two custom probers and dir implementations - 
one that can probe for and open working copies and one which can probe for and
open Subversion repositories.

The control directory implementation for the working copy provides just a working
tree. The control directory implementation for the repository exists not just for the
file system directory of the repository itself but for each of the "virtual"
file paths in the repository too.

Most of the complexity in breezy-svn has to do with mapping Subversion history into 
Bazaar history and making the distinction between what is a branch and what isn't.

The "repository layout" is an object that takes a path and can tell whether it is
the path to a branch, merely a path inside of a branch or something else. There
are a couple of implementations of repository layouts which use common conventions
(like the standard trunk;branches/XX;tags/YY approach, or a branch at the
 repository root). If no repository layout is specified, breezy-svn will autodetect it
using the code in layout/guess.py.

A "mapping" describes a particular way in which bzr metadata is mapped onto svn
and vice versa.

There are three layers to the code that actually deals with analysis of history.

logwalker.py provides an overall view of the history, sticking mostly to the
Subversion semantics. There are two implementations - one that just calls out
to Subversion and one that stores the history in a cache and reads from that
cache later.

metagraph.py provides the next layer, which wraps the logwalker and allows
iterating over the history but split up by branch according to a specified branch
layout.

revmeta.py provides another layer, and allows walking over both branches and the
relevant mappings.

Coding Style, etc
~~~~~~~~~~~~~~~~~
Please refer to HACKING in the Breezy source distribution.