ConvertFilePath diff

Index: constants.pm
===================================================================
RCS file: /home/repositories/freshports-1/scripts/constants.pm,v
retrieving revision 1.10
diff -r1.10 constants.pm
82a83,85
> #
> # Special repositories we watch
> #
83a87
> $FreshPorts::Constants::Repository_Ports                = 'ports';
Index: observer_commits.pm
===================================================================
RCS file: /home/repositories/freshports-1/scripts/observer_commits.pm,v
retrieving revision 1.3
diff -r1.3 observer_commits.pm
17c17
<       my $this                        = {};
---
>       my $this                = {};
59,60c59,60
<               print "Observer has noticed that commit '" . $object->id() . "' contains file $params{FilePath} as revision $params{FileRevision}\n";
<               FreshPorts::SpecialProcessingFiles::Eat($class->{dbh}, $params{FileAction}, $params{FilePath}, $params{FileRevision});
---
>               print "Observer has noticed that commit '" . $object->id() . "' contains file $params{FilePath} as revision $params{FileRevision} in repository $params{Repository}\n";
>               FreshPorts::SpecialProcessingFiles::Eat($class->{dbh}, $params{FileAction}, $params{FilePath}, $params{FileRevision}, $params{Repository});
Index: special_processing_files.pm
===================================================================
RCS file: /home/repositories/freshports-1/scripts/special_processing_files.pm,v
retrieving revision 1.8
diff -r1.8 special_processing_files.pm
16,20c16,21
< sub Eat($;$;$;$) {
<       my $dbh      = shift;
<       my $Action   = shift;
<       my $File     = shift;
<       my $Revision = shift;
---
> sub Eat($;$;$;$;$) {
>       my $dbh        = shift;
>       my $Action     = shift;
>       my $File       = shift;
>       my $Revision   = shift;
>       my $Repository = shift;
60,61c61,62
<       if ($File eq $FreshPorts::Constants::CVSROOT_Ports_Approvers) {
<               # fetch this file.  It's not in the ports tree
---
>       if ($File eq $FreshPorts::Constants::CVSROOT_Approvers && $Repository eq $FreshPorts::Constants::Repository_Ports) {
>               # must fetch this file.  It's not in the ports tree.
65c66
<               my $SRCDIR  = dirname($FreshPorts::Constants::CVSROOT_Ports_Approvers);
---
>               my $SRCDIR  = dirname ($FreshPorts::Constants::CVSROOT_Ports_Approvers);
Index: xml_munge.pm
===================================================================
RCS file: /home/repositories/freshports-1/scripts/xml_munge.pm,v
retrieving revision 1.7
diff -r1.7 xml_munge.pm
596c596
<       $self->notify_observers($FreshPorts::Messages::FileUpdate, (FileAction => $FileAction, FilePath => $FilePath, FileRevision => $FileRevision) );
---
>       $self->notify_observers($FreshPorts::Messages::FileUpdate, (FileAction => $FileAction, FilePath => $FilePath, FileRevision => $FileRevision, Repository => $Updates{repository}) );
740c740
<                       $sql = "delete from commit_log where message_id = $message_id";
---
>                       $sql = 'delete from commit_log where message_id = ' .  $self->{dbh}->quote($message_id);
975a976,985
> sub repo {
>       # what repo are we updating?
>       # this is important for CVSROOT.  Each commit will refer to CVSROOT, yet the actual file being updated will be in CVSROOT-ports
>       if (defined($Updates{repository})) {
>               return $Updates{repository};
>       } else {
>               return '';
>       }
> }
>

Leave a Reply

Scroll to Top