diff options
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPOBJ.pm')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPOBJ.pm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm index dcd22ff99eb..cdaa93b2db2 100644 --- a/Master/tlpkg/TeXLive/TLPOBJ.pm +++ b/Master/tlpkg/TeXLive/TLPOBJ.pm @@ -199,13 +199,16 @@ sub from_fh { } sub recompute_revision { - my ($self,$tltree) = @_; + my ($self,$tltree, $revtlpsrc) = @_; my @files = $self->all_files; my $filemax = 0; foreach my $f (@files) { $filemax = $tltree->file_svn_lastrevision($f); $self->revision(($filemax > $self->revision) ? $filemax : $self->revision); } + if (defined($revtlpsrc)) { + $self->revision( $filemax > $revtlpsrc ? $filemax : $revtlpsrc ); + } } sub recompute_sizes { @@ -930,9 +933,13 @@ which the files should be taken. recomputes the sizes based on the information present in C<$tltree>. -=item C<recompute_revision($tltree)> +=item C<recompute_revision($tltree [, $revtlpsrc ])> recomputes the revision based on the information present in C<$tltree>. +The optional argument C<$rectlpsrc> can be an additional revision number +which is taken into account. C<$tlpsrc->make_tlpobj> adds the revision +number of the C<tlpsrc> file here so that collections (which do not +contain files) also have revision number. =item C<update_from_catalogue($texcatalogue)> |