/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 backend/errors.py

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-07-06 17:08:45 UTC
  • mto: (0.14.1 main) (93.1.1 win32.bialix)
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: Szilveszter.Farkas@gmail.com-20060706170845-da015b629f5876a4
2006-07-06  Szilveszter Farkas <Szilveszter.Farkas@gmail.com>

    * I'm not dead :)
    * backend/errors.py: added some exceptions related to fileops.move()
    * backend/fileops.py: implemented move()
    * backend/info_helper.py: added diff_helper()
    * backend/info.py: implemented diff()

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2006 by Szilveszter Farkas (Phanatic)
 
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 DirectoryAlreadyExists(OliveError):
 
52
    """ The specified directory already exists
 
53
    
 
54
    May occur in:
 
55
        fileops.mkdir()
 
56
    """
 
57
 
 
58
class DivergedBranchesError(OliveError):
 
59
    """ The branches have been diverged
 
60
    
 
61
    May occur in:
 
62
        commit.push()
 
63
    """
 
64
 
 
65
class EmptyMessageError(OliveError):
 
66
    """ Occurs if no commit message specified
 
67
    
 
68
    May occur in:
 
69
        commit.commit()
 
70
    """
 
71
 
 
72
class LocalRequiresBoundBranch(OliveError):
 
73
    """ Occurs when the local branch needs a bound branch
 
74
    
 
75
    May occur in:
 
76
        commit.commit()
 
77
    """
 
78
 
 
79
class MissingArgumentError(OliveError):
 
80
    """ Occurs when not enough parameters are given.
 
81
    
 
82
    May occur in:
 
83
        fileops.move()
 
84
    """
 
85
 
 
86
class MultipleMoveError(OliveError):
 
87
    """ Occurs when moving/renaming more than 2 files, but the last argument is not a directory
 
88
    
 
89
    May occur in:
 
90
        fileops.move()
 
91
    """
 
92
 
 
93
class NoChangesToCommitError(OliveError):
 
94
    """ Occurs if there are no changes to commit
 
95
    
 
96
    May occur in:
 
97
        commit.commit()
 
98
    """
 
99
 
 
100
class NoFilesSpecified(OliveError):
 
101
    """ No files were specified as an argument to a function
 
102
    
 
103
    May occur in:
 
104
        fileops.remove()
 
105
    """
 
106
 
 
107
class NoLocationKnown(OliveError):
 
108
    """ No location known or specified
 
109
    
 
110
    May occur in:
 
111
        commit.push()
 
112
        init.pull()
 
113
    """
 
114
 
 
115
class NoMatchingFiles(OliveError):
 
116
    """ No files found which could match the criteria
 
117
    
 
118
    May occur in:
 
119
        fileops.remove()
 
120
    """
 
121
 
 
122
class NoMessageNoFileError(OliveError):
 
123
    """ No message and no file given (for commit)
 
124
    
 
125
    May occur in:
 
126
        commit.commit()
 
127
    """
 
128
 
 
129
class NonExistingParent(OliveError):
 
130
    """ Parent directory doesn't exist
 
131
    
 
132
    May occur in:
 
133
        init.branch()
 
134
        init.checkout()
 
135
        commit.push()
 
136
    """
 
137
 
 
138
class NonExistingRevision(OliveError):
 
139
    """ The specified revision doesn't exist in the branch
 
140
    
 
141
    May occur in:
 
142
        init.branch()
 
143
    """
 
144
 
 
145
class NonExistingSource(OliveError):
 
146
    """ The source provided doesn't exist
 
147
    
 
148
    May occur in:
 
149
        init.branch()
 
150
    """
 
151
 
 
152
class NotBranchError(OliveError):
 
153
    """ Specified directory is not a branch
 
154
    
 
155
    May occur in:
 
156
        commit.commit()
 
157
    """
 
158
 
 
159
class NotVersionedError(OliveError):
 
160
    """ Occurs if the specified file/directory is not in the branch
 
161
    
 
162
    May occur in:
 
163
        fileops.remove()
 
164
    """
 
165
 
 
166
class PathPrefixNotCreated(OliveError):
 
167
    """ The path prefix couldn't be created
 
168
    
 
169
    May occur in:
 
170
        commit.push()
 
171
    """
 
172
 
 
173
class RevisionValueError(OliveError):
 
174
    """ Invalid revision value provided
 
175
    
 
176
    May occur in:
 
177
    """
 
178
 
 
179
class StrictCommitError(OliveError):
 
180
    """ Occurs if strict commit fails
 
181
    
 
182
    May occur in:
 
183
        commit.commit()
 
184
    """
 
185
 
 
186
class TargetAlreadyExists(OliveError):
 
187
    """ Target directory already exists
 
188
    
 
189
    May occur in:
 
190
        init.branch()
 
191
        init.checkout()
 
192
    """