forked from chassing/gitflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexceptions.py
More file actions
103 lines (64 loc) · 2.19 KB
/
Copy pathexceptions.py
File metadata and controls
103 lines (64 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
#
# This file is part of `gitflow`.
# Copyright (c) 2010-2011 Vincent Driessen
# Copyright (c) 2012-2013 Hartmut Goebel
# Copyright (c) 2015 Christian Assing
# Distributed under a BSD-like license. For full terms see the file LICENSE.txt
#
__copyright__ = "2010-2011 Vincent Driessen; 2012-2013 Hartmut Goebel; 2015 Christian Assing"
__license__ = "BSD"
class GitflowError(Exception):
pass
class Usage(GitflowError):
def __str__(self):
return '\n'.join(map(str, self.args))
class OperationsError(GitflowError):
pass
class PrefixNotUniqueError(OperationsError):
pass
class MergeError(OperationsError):
pass
class StatusError(GitflowError):
pass
class WorkdirIsDirtyError(StatusError):
pass
class NotInitialized(StatusError):
pass
class AlreadyInitialized(StatusError):
def __str__(self):
return ("Already initialized for gitflow.\n"
"To force reinitialization use: git flow init -f")
class MergeConflict(StatusError):
def __str__(self):
return '\n'.join([
"Merge conflicts not resolved yet, use:",
" git mergetool",
" git commit",
])
class ObjectError(GitflowError):
pass
class BadObjectError(ObjectError):
pass
class NoSuchBranchError(ObjectError):
pass
class NoSuchRemoteError(ObjectError):
def __str__(self):
return ("No remote repository named '%s' found." % (self.args[0]))
class BaseNotOnBranch(ObjectError):
def __str__(self):
return ("Given base '%s' is not a valid commit on '%s'."
% (self.args[1], self.args[0]))
class BranchExistsError(ObjectError):
def __str__(self):
return ("A branch named '%s' already exists." % self.args[0])
class TagExistsError(ObjectError):
pass
class BranchTypeExistsError(ObjectError):
def __str__(self):
return "There is an existing %s branch. Finish that one first." % self.args[0]
class NoSuchLocalBranchError(NoSuchBranchError):
def __str__(self):
return ("Local branch '%s' does not exist." % self.args[0])