| 1 | package VCI::VCS::Hg::File; | ||
| 2 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | |||
| 4 | 1 | extends 'VCI::Abstract::File'; | |
| 5 | 1 | with 'VCI::VCS::Hg::Committable'; | |
| 6 | |||
| 7 | # XXX From a Commit, we don't currently track if a file is executable or not. | ||
| 8 | 0 | ▶ | sub _build_is_executable { undef } |
|
Subroutine
_build_is_executable: not called CC=1 SCAR=6.9
| |||
| 9 | |||
| 10 | 0 | ▶ | sub _build_revision { |
|
Subroutine
_build_revision: not called CC=1 SCAR=6.9
| |||
| 11 | 0 | my $self = shift; | |
| 12 | 0 | return $self->history->commits->[-1]->revision; | |
| 13 | } | ||
| 14 | |||
| 15 | 0 | ▶ | sub _build_content { |
|
Subroutine
_build_content: not called CC=1 SCAR=6.9
| |||
| 16 | 0 | my $self = shift; | |
| 17 | 0 | return $self->project->x_get(['raw-file', $self->revision, $self->path]) | |
| 18 | } | ||
| 19 | |||
| 20 | # Theoretically we could avoid this VCS interaction in situations where | ||
| 21 | # the Project history is already built and every single commit has "contents" | ||
| 22 | # populated, but that situation is rare enough that I don't think we need to | ||
| 23 | # optimize for it. | ||
| 24 | 0 | ▶ | sub _build_history { |
|
Subroutine
_build_history: not called CC=1 SCAR=6.9
| |||
| 25 | 0 | my $self = shift; | |
| 26 | |||
| 27 | 0 | return $self->history_class->x_from_rss($self->path, $self->project); | |
| 28 | } | ||
| 29 | |||
| 30 | 1 | __PACKAGE__->meta->make_immutable; | |
| 31 | |||
| 32 | 1 | 1; | |