Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit38b3cfb

Browse files
committed
Merge branch 'index'
2 parentsd924091 +abaefc5 commit38b3cfb

File tree

6 files changed

+1454
-1438
lines changed

6 files changed

+1454
-1438
lines changed

‎lib/git/errors.py

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
#
44
# This module is part of GitPython and is released under
55
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
6-
"""
7-
Module containing all exceptions thrown througout the git package,
8-
"""
6+
""" Module containing all exceptions thrown througout the git package, """
97

108
classInvalidGitRepositoryError(Exception):
119
""" Thrown if the given repository appears to have an invalid format. """
1210

11+
1312
classNoSuchPathError(OSError):
1413
""" Thrown if a path could not be access by the system. """
1514

15+
1616
classGitCommandError(Exception):
1717
""" Thrown if execution of the git command fails with non-zero status code. """
1818
def__init__(self,command,status,stderr=None):
@@ -24,3 +24,25 @@ def __str__(self):
2424
return ("'%s' returned exit status %i: %s"%
2525
(' '.join(str(i)foriinself.command),self.status,self.stderr))
2626

27+
28+
classCheckoutError(Exception ):
29+
"""Thrown if a file could not be checked out from the index as it contained
30+
changes.
31+
32+
The .failed_files attribute contains a list of relative paths that failed
33+
to be checked out as they contained changes that did not exist in the index.
34+
35+
The .failed_reasons attribute contains a string informing about the actual
36+
cause of the issue.
37+
38+
The .valid_files attribute contains a list of relative paths to files that
39+
were checked out successfully and hence match the version stored in the
40+
index"""
41+
def__init__(self,message,failed_files,valid_files,failed_reasons):
42+
Exception.__init__(self,message)
43+
self.failed_files=failed_files
44+
self.failed_reasons=failed_reasons
45+
self.valid_files=valid_files
46+
47+
def__str__(self):
48+
returnException.__str__(self)+":%s"%self.failed_files

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp