Arch

 view release on metacpan or  search on metacpan

perllib/Arch/Changeset.pm  view on Meta::CPAN

113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
sub ancestor ($) {
        my $self = shift;
        my $ancestor = $self->{ancestor};
        return $ancestor if $ancestor;
 
        if (-f "$self->{dir}/=ancestor") {
                $ancestor = load_file("$self->{dir}/=ancestor");
                chomp($ancestor);
        }
        unless ($ancestor) {
                # just guess
                my $revision = $self->{revision};
                $ancestor = adjacent_revision($revision, -1) || $revision;
        }
        return $self->{ancestor} = $ancestor;
}
 
sub get_index ($$) {
        my $self  = shift;
        my $index = shift;

perllib/Arch/Changeset.pm  view on Meta::CPAN

393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
changes of types I<MODIFY>, I<ADD> and I<DELETE>.
 
=item B<join_all_diffs>
 
Returns concatenated output of all diffs in the changeset.
 
=item B<ancestor>
 
Return the ancestor of the changeset. If I<=ancestor> file is found (that is
the case for library changesets) its content is returned, otherwise try to
guess the ancestor of the revision using B<Arch::Util::adjacent_revision>.
 
=back
 
=head1 BUGS
 
Awaiting for your reports.
 
=head1 AUTHORS
 
Mikhael Goikhman (migo@homemail.com--Perl-GPL/arch-perl--devel).

perllib/Arch/Tree.pm  view on Meta::CPAN

319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
*get_missing_revision_details = *get_missing_revision_descs;
*get_missing_revision_details = *get_missing_revision_details;
 
sub get_previous_revision ($;$) {
        my $self = shift;
        my $revision = shift || $self->get_revision;
 
        return adjacent_revision($revision, -1)
                unless $revision =~ /^(.*)--version-0$/;
 
        # handle version-0 case specially, can't be guessed from the name alone
        my $revisions = $self->get_log_revisions($1);
        until (pop @$revisions eq $revision) {
        }
        return $revisions->[-1];
}
 
sub get_ancestry_logs ($%) {
        my $self = shift;
        my %args = @_;

perllib/Arch/Util.pm  view on Meta::CPAN

392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
Like B<date2daysago>, but return a human readable string, like "5 days"
or "-6 weeks" or "7 months" or "3 years".
 
=item B<parse_creator_email> I<my_id>
 
Try to parse the I<arch> B<my-id> of the patch creator. Return a list of
his/her name and email.
 
=item B<adjacent_revision> I<full_revision> I<offset>
 
Given the I<full_revision> and positive or negative offset, try to guess the
full name of the adjacent revision.
 
=back
 
=head1 BUGS
 
Awaiting for your reports.
 
=head1 AUTHORS



( run in 0.274 second using v1.01-cache-2.11-cpan-26ccb49234f )