/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to olive/backend/errors.py

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-09-27 19:11:59 UTC
  • mfrom: (0.8.90 merge)
  • mto: (93.1.1 win32.bialix)
  • mto: This revision was merged to the branch mainline in revision 103.
  • Revision ID: Szilveszter.Farkas@gmail.com-20060927191159-cc4e54f613575779
Merge all changes. Release 0.11.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 by Szilveszter Farkas (Phanatic) <szilveszter.farkas@gmail.com>
2
 
# Some parts of the code are:
3
 
# Copyright (C) 2005, 2006 by Canonical Ltd
4
 
 
5
 
# This program is free software; you can redistribute it and/or modify
6
 
# it under the terms of the GNU General Public License as published by
7
 
# the Free Software Foundation; either version 2 of the License, or
8
 
# (at your option) any later version.
9
 
 
10
 
# This program is distributed in the hope that it will be useful,
11
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
# GNU General Public License for more details.
14
 
 
15
 
# You should have received a copy of the GNU General Public License
16
 
# along with this program; if not, write to the Free Software
17
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 
 
19
 
class OliveError(Exception):
20
 
    """ Parent class for Olive exceptions/errors """
21
 
    pass
22
 
 
23
 
class AlreadyBranchError(OliveError):
24
 
    """ The specified directory is already a branch
25
 
    
26
 
    May occur in:
27
 
        init.init()
28
 
    """
29
 
 
30
 
class BoundBranchOutOfDate(OliveError):
31
 
    """ Occurs if the bound branch is out of date
32
 
    
33
 
    May occur in:
34
 
        commit.commit()
35
 
    """
36
 
 
37
 
class BranchExistsWithoutWorkingTree(OliveError):
38
 
    """ The specified directory is a branch, however it doesn't contain a working tree
39
 
    
40
 
    May occur in:
41
 
        init.init()
42
 
    """
43
 
 
44
 
class ConflictsInTreeError(OliveError):
45
 
    """ Occurs if non-resolved conflicts remained in the tree
46
 
    
47
 
    May occur in:
48
 
        commit.commit()
49
 
    """
50
 
 
51
 
class ConnectionError(OliveError):
52
 
    """ Occurs if cannot connect to remote host
53
 
    
54
 
    May occur in:
55
 
        update.missing()
56
 
    """
57
 
 
58
 
class DifferentBranchesError(OliveError):
59
 
    """ Occurs if the specified files are in different branches
60
 
    
61
 
    May occur in:
62
 
        info.diff()
63
 
    """
64
 
 
65
 
class DirectoryAlreadyExists(OliveError):
66
 
    """ The specified directory already exists
67
 
    
68
 
    May occur in:
69
 
        fileops.mkdir()
70
 
    """
71
 
 
72
 
class DivergedBranchesError(OliveError):
73
 
    """ The branches have been diverged
74
 
    
75
 
    May occur in:
76
 
        commit.push()
77
 
    """
78
 
 
79
 
class EmptyMessageError(OliveError):
80
 
    """ Occurs if no commit message specified
81
 
    
82
 
    May occur in:
83
 
        commit.commit()
84
 
    """
85
 
 
86
 
class LocalRequiresBoundBranch(OliveError):
87
 
    """ Occurs when the local branch needs a bound branch
88
 
    
89
 
    May occur in:
90
 
        commit.commit()
91
 
    """
92
 
 
93
 
class MissingArgumentError(OliveError):
94
 
    """ Occurs when not enough parameters are given.
95
 
    
96
 
    May occur in:
97
 
        fileops.move()
98
 
    """
99
 
 
100
 
class MultipleMoveError(OliveError):
101
 
    """ Occurs when moving/renaming more than 2 files, but the last argument is not a directory
102
 
    
103
 
    May occur in:
104
 
        fileops.move()
105
 
    """
106
 
 
107
 
class NoChangesToCommitError(OliveError):
108
 
    """ Occurs if there are no changes to commit
109
 
    
110
 
    May occur in:
111
 
        commit.commit()
112
 
    """
113
 
 
114
 
class NoFilesSpecified(OliveError):
115
 
    """ No files were specified as an argument to a function
116
 
    
117
 
    May occur in:
118
 
        fileops.remove()
119
 
    """
120
 
 
121
 
class NoLocationKnown(OliveError):
122
 
    """ No location known or specified
123
 
    
124
 
    May occur in:
125
 
        commit.push()
126
 
        init.pull()
127
 
    """
128
 
 
129
 
class NoMatchingFiles(OliveError):
130
 
    """ No files found which could match the criteria
131
 
    
132
 
    May occur in:
133
 
        fileops.remove()
134
 
    """
135
 
 
136
 
class NoMessageNoFileError(OliveError):
137
 
    """ No message and no file given (for commit)
138
 
    
139
 
    May occur in:
140
 
        commit.commit()
141
 
    """
142
 
 
143
 
class NonExistingParent(OliveError):
144
 
    """ Parent directory doesn't exist
145
 
    
146
 
    May occur in:
147
 
        init.branch()
148
 
        init.checkout()
149
 
        commit.push()
150
 
    """
151
 
 
152
 
class NonExistingRevision(OliveError):
153
 
    """ The specified revision doesn't exist in the branch
154
 
    
155
 
    May occur in:
156
 
        init.branch()
157
 
    """
158
 
 
159
 
class NonExistingSource(OliveError):
160
 
    """ The source provided doesn't exist
161
 
    
162
 
    May occur in:
163
 
        init.branch()
164
 
        fileops.rename()
165
 
    """
166
 
 
167
 
class NotBranchError(OliveError):
168
 
    """ Specified directory is not a branch
169
 
    
170
 
    May occur in:
171
 
        commit.commit()
172
 
        init.branch()
173
 
        init.checkout()
174
 
    """
175
 
 
176
 
class NotSameBranchError(OliveError):
177
 
    """ The specified files are not in the same branch
178
 
    
179
 
    May occur in:
180
 
        fileops.move()
181
 
    """
182
 
 
183
 
class NotVersionedError(OliveError):
184
 
    """ Occurs if the specified file/directory is not in the branch
185
 
    
186
 
    May occur in:
187
 
        fileops.remove()
188
 
    """
189
 
 
190
 
class PathPrefixNotCreated(OliveError):
191
 
    """ The path prefix couldn't be created
192
 
    
193
 
    May occur in:
194
 
        commit.push()
195
 
    """
196
 
 
197
 
class PermissionDenied(OliveError):
198
 
    """ Permission denied.
199
 
    
200
 
    May occur in:
201
 
        fileops.status()
202
 
    """
203
 
 
204
 
class PrefixFormatError(OliveError):
205
 
    """ Occurs if the prefix is badly formatted
206
 
    
207
 
    May occur in:
208
 
        info.diff()
209
 
    """
210
 
 
211
 
class RevisionValueError(OliveError):
212
 
    """ Invalid revision value provided
213
 
    
214
 
    May occur in:
215
 
        info.log()
216
 
    """
217
 
 
218
 
class StrictCommitError(OliveError):
219
 
    """ Occurs if strict commit fails
220
 
    
221
 
    May occur in:
222
 
        commit.commit()
223
 
    """
224
 
 
225
 
class TargetAlreadyExists(OliveError):
226
 
    """ Target directory already exists
227
 
    
228
 
    May occur in:
229
 
        init.branch()
230
 
        init.checkout()
231
 
    """