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
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.
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.
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
19
class OliveError(Exception):
20
""" Parent class for Olive exceptions/errors """
23
class AlreadyBranchError(OliveError):
24
""" The specified directory is already a branch
30
class BoundBranchOutOfDate(OliveError):
31
""" Occurs if the bound branch is out of date
37
class BranchExistsWithoutWorkingTree(OliveError):
38
""" The specified directory is a branch, however it doesn't contain a working tree
44
class ConflictsInTreeError(OliveError):
45
""" Occurs if non-resolved conflicts remained in the tree
51
class ConnectionError(OliveError):
52
""" Occurs if cannot connect to remote host
58
class DifferentBranchesError(OliveError):
59
""" Occurs if the specified files are in different branches
65
class DirectoryAlreadyExists(OliveError):
66
""" The specified directory already exists
72
class DivergedBranchesError(OliveError):
73
""" The branches have been diverged
79
class EmptyMessageError(OliveError):
80
""" Occurs if no commit message specified
86
class LocalRequiresBoundBranch(OliveError):
87
""" Occurs when the local branch needs a bound branch
93
class MissingArgumentError(OliveError):
94
""" Occurs when not enough parameters are given.
100
class MultipleMoveError(OliveError):
101
""" Occurs when moving/renaming more than 2 files, but the last argument is not a directory
107
class NoChangesToCommitError(OliveError):
108
""" Occurs if there are no changes to commit
114
class NoFilesSpecified(OliveError):
115
""" No files were specified as an argument to a function
121
class NoLocationKnown(OliveError):
122
""" No location known or specified
129
class NoMatchingFiles(OliveError):
130
""" No files found which could match the criteria
136
class NoMessageNoFileError(OliveError):
137
""" No message and no file given (for commit)
143
class NonExistingParent(OliveError):
144
""" Parent directory doesn't exist
152
class NonExistingRevision(OliveError):
153
""" The specified revision doesn't exist in the branch
159
class NonExistingSource(OliveError):
160
""" The source provided doesn't exist
167
class NotBranchError(OliveError):
168
""" Specified directory is not a branch
176
class NotSameBranchError(OliveError):
177
""" The specified files are not in the same branch
183
class NotVersionedError(OliveError):
184
""" Occurs if the specified file/directory is not in the branch
190
class PathPrefixNotCreated(OliveError):
191
""" The path prefix couldn't be created
197
class PermissionDenied(OliveError):
198
""" Permission denied.
204
class PrefixFormatError(OliveError):
205
""" Occurs if the prefix is badly formatted
211
class RevisionValueError(OliveError):
212
""" Invalid revision value provided
218
class StrictCommitError(OliveError):
219
""" Occurs if strict commit fails
225
class TargetAlreadyExists(OliveError):
226
""" Target directory already exists