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 DifferentBranchesError(OliveError):
52
""" Occurs if the specified files are in different branches
58
class DirectoryAlreadyExists(OliveError):
59
""" The specified directory already exists
65
class DivergedBranchesError(OliveError):
66
""" The branches have been diverged
72
class EmptyMessageError(OliveError):
73
""" Occurs if no commit message specified
79
class LocalRequiresBoundBranch(OliveError):
80
""" Occurs when the local branch needs a bound branch
86
class MissingArgumentError(OliveError):
87
""" Occurs when not enough parameters are given.
93
class MultipleMoveError(OliveError):
94
""" Occurs when moving/renaming more than 2 files, but the last argument is not a directory
100
class NoChangesToCommitError(OliveError):
101
""" Occurs if there are no changes to commit
107
class NoFilesSpecified(OliveError):
108
""" No files were specified as an argument to a function
114
class NoLocationKnown(OliveError):
115
""" No location known or specified
122
class NoMatchingFiles(OliveError):
123
""" No files found which could match the criteria
129
class NoMessageNoFileError(OliveError):
130
""" No message and no file given (for commit)
136
class NonExistingParent(OliveError):
137
""" Parent directory doesn't exist
145
class NonExistingRevision(OliveError):
146
""" The specified revision doesn't exist in the branch
152
class NonExistingSource(OliveError):
153
""" The source provided doesn't exist
160
class NotBranchError(OliveError):
161
""" Specified directory is not a branch
169
class NotSameBranchError(OliveError):
170
""" The specified files are not in the same branch
176
class NotVersionedError(OliveError):
177
""" Occurs if the specified file/directory is not in the branch
183
class PathPrefixNotCreated(OliveError):
184
""" The path prefix couldn't be created
190
class PrefixFormatError(OliveError):
191
""" Occurs if the prefix is badly formatted
197
class RevisionValueError(OliveError):
198
""" Invalid revision value provided
204
class StrictCommitError(OliveError):
205
""" Occurs if strict commit fails
211
class TargetAlreadyExists(OliveError):
212
""" Target directory already exists