diff options
-rw-r--r-- | lib/git/index.py | 2 | ||||
-rw-r--r-- | lib/git/remote.py | 9 | ||||
-rw-r--r-- | test/git/test_remote.py | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/lib/git/index.py b/lib/git/index.py index b3dd12fd..54bb0209 100644 --- a/lib/git/index.py +++ b/lib/git/index.py @@ -1108,7 +1108,7 @@ class IndexFile(LazyMixin, diff.Diffable): kwargs['as_process'] = True kwargs['istream'] = subprocess.PIPE proc = self.repo.git.checkout_index(args, **kwargs) - make_exc = lambda : GitCommandError(("git-checkout-index",)+args, 128, proc.stderr.read()) + make_exc = lambda : GitCommandError(("git-checkout-index",)+tuple(args), 128, proc.stderr.read()) checked_out_files = list() for path in paths: path = self._to_relative_path(path) 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): diff --git a/test/git/test_remote.py b/test/git/test_remote.py index f1086875..4849dfd0 100644 --- a/test/git/test_remote.py +++ b/test/git/test_remote.py @@ -70,6 +70,7 @@ class TestRemote(TestBase): # self._print_fetchhead(remote.repo) assert len(results) > 0 and isinstance(results[0], FetchInfo) for info in results: + assert isinstance(info.note, basestring) if isinstance(info.ref, Reference): assert info.flags != 0 # END reference type flags handling @@ -85,6 +86,7 @@ class TestRemote(TestBase): assert len(results) > 0 and isinstance(results[0], PushInfo) for info in results: assert info.flags + assert isinstance(info.summary, basestring) if info.old_commit is not None: assert isinstance(info.old_commit, Commit) if info.flags & info.ERROR: |