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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
# (Be in -*- python -*- mode.)
#
# ====================================================================
# Copyright (c) 2000-2008 CollabNet. All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://subversion.tigris.org/license-1.html.
# If newer versions of this license are posted there, you may use a
# newer version instead, at your option.
#
# This software consists of voluntary contributions made by many
# individuals. For exact contribution history, see the revision
# history and logs, available at http://cvs2svn.tigris.org/.
# ====================================================================
"""This module contains the SVNRepositoryDelegate class."""
class SVNRepositoryDelegate:
"""Abstract superclass for any delegate to SVNOutputOption.
Subclasses must implement all of the methods below.
For each method, a subclass implements, in its own way, the
Subversion operation implied by the method's name. For example, for
the add_path method, the DumpfileDelegate would write out a
'Node-add:' command to a Subversion dumpfile, the StdoutDelegate
would merely print that the path is being added to the repository,
and the RepositoryDelegate would actually cause the path to be added
to the Subversion repository that it is creating."""
def start_commit(self, revnum, revprops):
"""An SVN commit is starting.
Perform any actions needed to start an SVN commit with revision
number REVNUM and revision properties REVPROPS."""
raise NotImplementedError()
def end_commit(self):
"""An SVN commit is ending."""
raise NotImplementedError()
def initialize_project(self, project):
"""Initialize PROJECT.
For Subversion, this means to create the trunk, branches, and tags
directories for PROJECT."""
raise NotImplementedError()
def initialize_lod(self, lod):
"""Initialize LOD with no contents.
LOD is an instance of LineOfDevelopment. It is also possible for
an LOD to be created by copying from another LOD; such events are
indicated via the copy_lod() callback."""
raise NotImplementedError()
def mkdir(self, lod, cvs_directory):
"""Create CVS_DIRECTORY within LOD.
LOD is a LineOfDevelopment; CVS_DIRECTORY is a CVSDirectory."""
raise NotImplementedError()
def add_path(self, s_item):
"""Add the path corresponding to S_ITEM to the repository.
S_ITEM is an SVNCommitItem."""
raise NotImplementedError()
def change_path(self, s_item):
"""Change the path corresponding to S_ITEM in the repository.
S_ITEM is an SVNCommitItem."""
raise NotImplementedError()
def delete_lod(self, lod):
"""Delete LOD from the repository.
LOD is a LineOfDevelopment instance."""
raise NotImplementedError()
def delete_path(self, lod, cvs_path):
"""Delete CVS_PATH from LOD.
LOD is a LineOfDevelopment; CVS_PATH is a CVSPath."""
raise NotImplementedError()
def copy_lod(self, src_lod, dest_lod, src_revnum):
"""Copy SRC_LOD in SRC_REVNUM to DEST_LOD.
SRC_LOD and DEST_LOD are both LODs, and SRC_REVNUM is a subversion
revision number (int)."""
raise NotImplementedError()
def copy_path(self, cvs_path, src_lod, dest_lod, src_revnum):
"""Copy CVS_PATH in SRC_LOD@SRC_REVNUM to DEST_LOD.
CVS_PATH is a CVSPath, SRC_LOD and DEST_LOD are LODs, and
SRC_REVNUM is a subversion revision number (int)."""
raise NotImplementedError()
def finish(self):
"""All SVN revisions have been committed.
Perform any necessary cleanup."""
raise NotImplementedError()
|