1
# Copyright (C) 2006 by Szilveszter Farkas (Phanatic)
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 DirectoryAlreadyExists(OliveError):
52
""" The specified directory already exists
58
class DivergedBranchesError(OliveError):
59
""" The branches have been diverged
65
class EmptyMessageError(OliveError):
66
""" Occurs if no commit message specified
72
class LocalRequiresBoundBranch(OliveError):
73
""" Occurs when the local branch needs a bound branch
79
class MissingArgumentError(OliveError):
80
""" Occurs when not enough parameters are given.
86
class MultipleMoveError(OliveError):
87
""" Occurs when moving/renaming more than 2 files, but the last argument is not a directory
93
class NoChangesToCommitError(OliveError):
94
""" Occurs if there are no changes to commit
100
class NoFilesSpecified(OliveError):
101
""" No files were specified as an argument to a function
107
class NoLocationKnown(OliveError):
108
""" No location known or specified
115
class NoMatchingFiles(OliveError):
116
""" No files found which could match the criteria
122
class NoMessageNoFileError(OliveError):
123
""" No message and no file given (for commit)
129
class NonExistingParent(OliveError):
130
""" Parent directory doesn't exist
138
class NonExistingRevision(OliveError):
139
""" The specified revision doesn't exist in the branch
145
class NonExistingSource(OliveError):
146
""" The source provided doesn't exist
152
class NotBranchError(OliveError):
153
""" Specified directory is not a branch
159
class NotVersionedError(OliveError):
160
""" Occurs if the specified file/directory is not in the branch
166
class PathPrefixNotCreated(OliveError):
167
""" The path prefix couldn't be created
173
class RevisionValueError(OliveError):
174
""" Invalid revision value provided
179
class StrictCommitError(OliveError):
180
""" Occurs if strict commit fails
186
class TargetAlreadyExists(OliveError):
187
""" Target directory already exists