| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -39,8 +39,14 @@ def __repr__(self): | |||
| 39 | 39 | """Representation of ourselves in git reflog format""" | |
| 40 | 40 | act = self.actor | |
| 41 | 41 | time = self.time | |
| 42 | - return u"{0} {1} {2} <{3}> {4!s} {5}\t{6}\n".format(self.oldhexsha, self.newhexsha, act.name, act.email, | ||
| 43 | - time[0], altz_to_utctz_str(time[1]), self.message).encode("utf-8") | ||
| 42 | + return u"{0} {1} {2} <{3}> {4!s} {5}\t{6}\n".format(self.oldhexsha, | ||
| 43 | + self.newhexsha, | ||
| 44 | + act.name, | ||
| 45 | + act.email, | ||
| 46 | + time[0], | ||
| 47 | + altz_to_utctz_str(time[1]), | ||
| 48 | + self.message).encode("utf-8") | ||
| 49 | + | ||
| 44 | 50 | @property | |
| 45 | 51 | def oldhexsha(self): | |
| 46 | 52 | """The hexsha to the commit the ref pointed to before the change""" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,6 +10,7 @@ | |||
| 10 | 10 | fixture, | |
| 11 | 11 | with_rw_repo | |
| 12 | 12 | ) | |
| 13 | + from git.util import Actor | ||
| 13 | 14 | from git import ( | |
| 14 | 15 | IndexFile, | |
| 15 | 16 | BlobFilter, | |
@@ -444,10 +445,10 @@ def mixed_iterator(): | |||
| 444 | 445 | assert new_commit.parents[0] == cur_commit | |
| 445 | 446 | assert len(new_commit.parents) == 1 | |
| 446 | 447 | assert cur_head.commit == cur_commit | |
| 447 | - | ||
| 448 | + | ||
| 448 | 449 | # commit with other actor | |
| 449 | 450 | cur_commit = cur_head.commit | |
| 450 | - | ||
| 451 | + | ||
| 451 | 452 | my_author = Actor("An author", "author@example.com") | |
| 452 | 453 | my_committer = Actor("An committer", "committer@example.com") | |
| 453 | 454 | commit_actor = index.commit(commit_message, author=my_author, committer=my_committer) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments