(self)
| 65 | ) |
| 66 | |
| 67 | def construct(self): |
| 68 | if not settings.stdout and not settings.output_only_path and not settings.quiet: |
| 69 | print(f"{settings.INFO_STRING} {self.cmd}") |
| 70 | |
| 71 | self.show_intro() |
| 72 | head_commit = self.get_commit() |
| 73 | |
| 74 | # using -b flag, create new branch label and exit |
| 75 | if self.b: |
| 76 | self.parse_commits(head_commit) |
| 77 | self.recenter_frame() |
| 78 | self.scale_frame() |
| 79 | self.draw_ref(head_commit, self.topref, text=self.branch, color=m.GREEN) |
| 80 | else: |
| 81 | branch_commit = self.get_commit(self.branch) |
| 82 | |
| 83 | if self.is_ancestor: |
| 84 | commits_in_range = list(self.repo.iter_commits(self.branch + "..HEAD")) |
| 85 | |
| 86 | # branch is reached from HEAD, so draw everything |
| 87 | if len(commits_in_range) <= self.n: |
| 88 | self.parse_commits(head_commit) |
| 89 | reset_head_to = branch_commit.hexsha |
| 90 | self.recenter_frame() |
| 91 | self.scale_frame() |
| 92 | self.reset_head(reset_head_to) |
| 93 | self.reset_branch(head_commit.hexsha) |
| 94 | |
| 95 | # branch is not reached, so start from branch |
| 96 | else: |
| 97 | self.parse_commits(branch_commit) |
| 98 | self.draw_ref(branch_commit, self.topref) |
| 99 | self.recenter_frame() |
| 100 | self.scale_frame() |
| 101 | |
| 102 | elif self.is_descendant: |
| 103 | self.parse_commits(branch_commit) |
| 104 | reset_head_to = branch_commit.hexsha |
| 105 | self.recenter_frame() |
| 106 | self.scale_frame() |
| 107 | if "HEAD" in self.drawnRefs: |
| 108 | self.reset_head(reset_head_to) |
| 109 | self.reset_branch(head_commit.hexsha) |
| 110 | else: |
| 111 | self.draw_ref(branch_commit, self.topref) |
| 112 | else: |
| 113 | self.parse_commits(head_commit) |
| 114 | self.parse_commits(branch_commit, shift=4 * m.DOWN) |
| 115 | self.center_frame_on_commit(branch_commit) |
| 116 | self.recenter_frame() |
| 117 | self.scale_frame() |
| 118 | self.reset_head(branch_commit.hexsha) |
| 119 | self.reset_branch(head_commit.hexsha) |
| 120 | |
| 121 | self.color_by() |
| 122 | self.fadeout() |
| 123 | self.show_command_as_title() |
| 124 | self.show_outro() |
nothing calls this directly
no test coverage detected