aboutsummaryrefslogtreecommitdiff
blob: 70419e672f3ae07b4dad745563cd0b191335fd96 (plain)
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
# (Be in -*- python -*- mode.)
#
# ====================================================================
# Copyright (c) 2000-2009 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 classes that hold the cvs2svn output options."""


class OutputOption:
  """Represents an output choice for a run of cvs2svn."""

  def register_artifacts(self, which_pass):
    """Register artifacts that will be needed for this output option.

    WHICH_PASS is the pass that will call our callbacks, so it should
    be used to do the registering (e.g., call
    WHICH_PASS.register_temp_file() and/or
    WHICH_PASS.register_temp_file_needed())."""

    pass

  def check(self):
    """Check that the options stored in SELF are sensible.

    This might including the existence of a repository on disk, etc."""

    raise NotImplementedError()

  def check_symbols(self, symbol_map):
    """Check that the symbols in SYMBOL_MAP are OK for this output option.

    SYMBOL_MAP is a map {AbstractSymbol : (Trunk|TypedSymbol)},
    indicating how each symbol is planned to be converted.  Raise a
    FatalError if the symbol plan is not acceptable for this output
    option."""

    raise NotImplementedError()

  def setup(self, svn_rev_count):
    """Prepare this output option."""

    raise NotImplementedError()

  def process_initial_project_commit(self, svn_commit):
    """Process SVN_COMMIT, which is an SVNInitialProjectCommit."""

    raise NotImplementedError()

  def process_primary_commit(self, svn_commit):
    """Process SVN_COMMIT, which is an SVNPrimaryCommit."""

    raise NotImplementedError()

  def process_post_commit(self, svn_commit):
    """Process SVN_COMMIT, which is an SVNPostCommit."""

    raise NotImplementedError()

  def process_branch_commit(self, svn_commit):
    """Process SVN_COMMIT, which is an SVNBranchCommit."""

    raise NotImplementedError()

  def process_tag_commit(self, svn_commit):
    """Process SVN_COMMIT, which is an SVNTagCommit."""

    raise NotImplementedError()

  def cleanup(self):
    """Perform any required cleanup related to this output option."""

    raise NotImplementedError()