| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -269,7 +269,7 @@ def _iter_from_process_or_stream(cls, repo, proc_or_stream): | |||
| 269 | 269 | # END handle extra info | |
| 270 | 270 | ||
| 271 | 271 | assert len(hexsha) == 40, "Invalid line: %s" % hexsha | |
| 272 | - yield Commit(repo, hex_to_bin(hexsha)) | ||
| 272 | + yield cls(repo, hex_to_bin(hexsha)) | ||
| 273 | 273 | # END for each line in stream | |
| 274 | 274 | # TODO: Review this - it seems process handling got a bit out of control | |
| 275 | 275 | # due to many developers trying to fix the open file handles issue | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -199,6 +199,13 @@ def test_iteration(self): | |||
| 199 | 199 | less_ltd_commits = list(Commit.iter_items(self.rorepo, 'master', paths=('CHANGES', 'AUTHORS'))) | |
| 200 | 200 | assert len(ltd_commits) < len(less_ltd_commits) | |
| 201 | 201 | ||
| 202 | + class Child(Commit): | ||
| 203 | + def __init__(self, *args, **kwargs): | ||
| 204 | + super(Child, self).__init__(*args, **kwargs) | ||
| 205 | + | ||
| 206 | + child_commits = list(Child.iter_items(self.rorepo, 'master', paths=('CHANGES', 'AUTHORS'))) | ||
| 207 | + assert type(child_commits[0]) == Child | ||
| 208 | + | ||
| 202 | 209 | def test_iter_items(self): | |
| 203 | 210 | # pretty not allowed | |
| 204 | 211 | self.assertRaises(ValueError, Commit.iter_items, self.rorepo, 'master', pretty="raw") | |
| Back | FazBrowse Home | New Git URL |
0 commit comments