| 1 | package VCI::VCS::Cvs::Commit; | ||||||||||
| 2 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | 1 | extends 'VCI::Abstract::Commit'; | |||||||||
| 5 | |||||||||||
| 6 | 1 | ▶ | use constant REMOVE_HEADER => ' | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | ^---------------------\n | ||||||||||
| 8 | PatchSet\s\d+\s?\n | ||||||||||
| 9 | Date:\s\S+\s\S+\n | ||||||||||
| 10 | Author:\s\S+\n | ||||||||||
| 11 | Branch:\s\S+\n | ||||||||||
| 12 | Tag:\s[^\n]+\s?\n | ||||||||||
| 13 | Log:\n | ||||||||||
| 14 | .*\n | ||||||||||
| 15 | \n | ||||||||||
| 16 | 1 | Members:\s?\n'; | |||||||||
| 17 | |||||||||||
| 18 | 0 | ▶ | sub _build_as_diff { | ||||||||
|
Subroutine
_build_as_diff: not called CC=1 SCAR=6.9
| |||||||||||
| 19 | 0 | my $self = shift; | |||||||||
| 20 | 0 | my $diff = $self->project->x_cvsps_do(['-g', '-s', $self->revision]); | |||||||||
| 21 | 0 | my $header_re = REMOVE_HEADER; | |||||||||
| 22 | # Pull off the header | ||||||||||
| 23 | 0 | $diff =~ s/$header_re//sox; | |||||||||
| 24 | # Pull off lines now until we get to "Index:" | ||||||||||
| 25 | 0 | $diff =~ s/^\s+.*?(^Index)/$1/ms; | |||||||||
| 26 | 0 | return $self->diff_class->new(raw => $diff, project => $self->project); | |||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | # In CVS, no matter how you access a repository, or what credentials you use, | ||||||||||
| 30 | # it's still the same repository. | ||||||||||
| 31 | 0 | ▶ | sub _repository_for_uuid { | ||||||||
|
Subroutine
_repository_for_uuid: not called CC=2 SCAR=17.9
| |||||||||||
| 32 | 0 | my ($self) = @_; | |||||||||
| 33 | 0 | my $repo = $self->repository->root; | |||||||||
| 34 | # This is for repos like mkanat%bugzilla.org@cvs.mozilla.org:/cvsroot | ||||||||||
| 35 | 0 | ▶ | if ($repo =~ /@/) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | 0 | $repo = s/.+@(.+)/$1/; | |||||||||
| 37 | } | ||||||||||
| 38 | # This is for repos like :pserver:cvs-mirror.mozilla.org:/cvsroot | ||||||||||
| 39 | else { | ||||||||||
| 40 | 0 | $repo =~ s/^:\w+://; | |||||||||
| 41 | } | ||||||||||
| 42 | 0 | return $repo; | |||||||||
| 43 | } | ||||||||||
| 44 | |||||||||||
| 45 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||
| 46 | |||||||||||
| 47 | 1 | 1; | |||||||||