diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-11-24 21:28:03 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-11-24 22:20:43 +0100 |
commit | c5f92b17729e255ca01ffb4ed215d132e05ba4da (patch) | |
tree | 5c6e46b3da9d46182f965bdde624a7a877dd7c01 /lib/git/remote.py | |
parent | 279d162f54b5156c442c878dee2450f8137d0fe3 (diff) | |
download | gitpython-c5f92b17729e255ca01ffb4ed215d132e05ba4da.tar.gz |
PushInfo: added summary field to help providing user readable information
Index.checkout: fixed bug in exception creator function
Diffstat (limited to 'lib/git/remote.py')
-rw-r--r-- | lib/git/remote.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/git/remote.py b/lib/git/remote.py index 56c6cf96..5eddfa2d 100644 --- a/lib/git/remote.py +++ b/lib/git/remote.py @@ -154,9 +154,10 @@ class PushInfo(object): # the remote_ref_string. It can be a TagReference as well. info.old_commit # commit at which the remote_ref was standing before we pushed # it to local_ref.commit. Will be None if an error was indicated + info.summary # summary line providing human readable english text about the push """ - __slots__ = ('local_ref', 'remote_ref_string', 'flags', 'old_commit', '_remote') + __slots__ = ('local_ref', 'remote_ref_string', 'flags', 'old_commit', '_remote', 'summary') NEW_TAG, NEW_HEAD, NO_MATCH, REJECTED, REMOTE_REJECTED, REMOTE_FAILURE, DELETED, \ FORCED_UPDATE, FAST_FORWARD, UP_TO_DATE, ERROR = [ 1 << x for x in range(11) ] @@ -165,7 +166,8 @@ class PushInfo(object): '+' : FORCED_UPDATE, ' ' : FAST_FORWARD, '=' : UP_TO_DATE, '!' : ERROR } - def __init__(self, flags, local_ref, remote_ref_string, remote, old_commit=None): + def __init__(self, flags, local_ref, remote_ref_string, remote, old_commit=None, + summary=''): """ Initialize a new instance """ @@ -174,6 +176,7 @@ class PushInfo(object): self.remote_ref_string = remote_ref_string self._remote = remote self.old_commit = old_commit + self.summary = summary @property def remote_ref(self): @@ -241,7 +244,7 @@ class PushInfo(object): old_commit = Commit(remote.repo, old_sha) # END message handling - return PushInfo(flags, from_ref, to_ref_string, remote, old_commit) + return PushInfo(flags, from_ref, to_ref_string, remote, old_commit, summary) class FetchInfo(object): |