[Rt-commit] rt branch, 4.2/merge-shredder-overlays, repushed

Alex Vandiver alexmv at bestpractical.com
Wed Mar 4 16:42:18 EST 2015


The branch 4.2/merge-shredder-overlays was deleted and repushed:
       was c9957b5944952397c9ffc50ab3a87bd709603ae9
       now 89443789f1765b332cf8dbdeead7f48ebc3de05c

1:  a4ccd1f = 1:  f94e6c2 Pack bitmask constants more densely
2:  8c2f2a2 = 2:  836e596 Make two bitfields not overlap, to reduce changes of mixing them
3:  5eb3f35 ! 3:  4c84b30 Make shredder constants no longer exported
    @@ -28,7 +28,7 @@
     +        next if $cache_val->{'State'} & (RT::Shredder::Constants::WIPED | RT::Shredder::Constants::IN_WIPING);
              $self->Wipeout( Object => $cache_val->{'Object'} );
          }
    - }
    +     return;
     @@
      
          my $record = $args{'CacheRecord'};
4:  a29baaa = 4:  f363a0b Replace ->_AsString with ->UID
5:  8702baa ! 5:  793020d Merge RT::Shredder::Record into RT::Record
    @@ -11,9 +11,9 @@
      require RT::Link;
     +use RT::Shredder::Constants;
     +use RT::Shredder::Exceptions;
    - use Encode qw();
      
      our $_TABLE_ATTR = { };
    + 
     @@
      sub PostInflate {
      }
    @@ -162,183 +162,3 @@
      sub __DependsOn
      {
     
    -diff --git a/lib/RT/Shredder/Record.pm b/lib/RT/Shredder/Record.pm
    -deleted file mode 100644
    ---- a/lib/RT/Shredder/Record.pm
    -+++ /dev/null
    -@@
    --# BEGIN BPS TAGGED BLOCK {{{
    --#
    --# COPYRIGHT:
    --#
    --# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
    --#                                          <sales at bestpractical.com>
    --#
    --# (Except where explicitly superseded by other copyright notices)
    --#
    --#
    --# LICENSE:
    --#
    --# This work is made available to you under the terms of Version 2 of
    --# the GNU General Public License. A copy of that license should have
    --# been provided with this software, but in any event can be snarfed
    --# from www.gnu.org.
    --#
    --# This work is distributed in the hope that it will be useful, but
    --# WITHOUT ANY WARRANTY; without even the implied warranty of
    --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    --# General Public License for more details.
    --#
    --# You should have received a copy of the GNU General Public License
    --# along with this program; if not, write to the Free Software
    --# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    --# 02110-1301 or visit their web page on the internet at
    --# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
    --#
    --#
    --# CONTRIBUTION SUBMISSION POLICY:
    --#
    --# (The following paragraph is not intended to limit the rights granted
    --# to you to modify and distribute this software under the terms of
    --# the GNU General Public License and is only of importance to you if
    --# you choose to contribute your changes and enhancements to the
    --# community by submitting them to Best Practical Solutions, LLC.)
    --#
    --# By intentionally submitting any modifications, corrections or
    --# derivatives to this work, or any other work intended for use with
    --# Request Tracker, to Best Practical Solutions, LLC, you confirm that
    --# you are the copyright holder for those contributions and you grant
    --# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
    --# royalty-free, perpetual, license to use, copy, create derivative
    --# works based on those contributions, and sublicense and distribute
    --# those contributions and any derivatives thereof.
    --#
    --# END BPS TAGGED BLOCK }}}
    --
    --use RT::Record ();
    --package RT::Record;
    --
    --use strict;
    --use warnings;
    --use warnings FATAL => 'redefine';
    --
    --use RT::Shredder::Constants;
    --use RT::Shredder::Exceptions;
    --
    --=head2 _AsInsertQuery
    --
    --Returns INSERT query string that duplicates current record and
    --can be used to insert record back into DB after delete.
    --
    --=cut
    --
    --sub _AsInsertQuery
    --{
    --    my $self = shift;
    --
    --    my $dbh = $RT::Handle->dbh;
    --
    --    my $res = "INSERT INTO ". $dbh->quote_identifier( $self->Table );
    --    my $values = $self->{'values'};
    --    $res .= "(". join( ",", map { $dbh->quote_identifier( $_ ) } sort keys %$values ) .")";
    --    $res .= " VALUES";
    --    $res .= "(". join( ",", map { $dbh->quote( $values->{$_} ) } sort keys %$values ) .")";
    --    $res .= ";";
    --
    --    return $res;
    --}
    --
    --sub BeforeWipeout { return 1 }
    --
    --=head2 Dependencies
    --
    --Returns L<RT::Shredder::Dependencies> object.
    --
    --=cut
    --
    --sub Dependencies
    --{
    --    my $self = shift;
    --    my %args = (
    --            Shredder => undef,
    --            Flags => RT::Shredder::Constants::DEPENDS_ON,
    --            @_,
    --           );
    --
    --    unless( $self->id ) {
    --        RT::Shredder::Exception->throw('Object is not loaded');
    --    }
    --
    --    my $deps = RT::Shredder::Dependencies->new();
    --    if( $args{'Flags'} & RT::Shredder::Constants::DEPENDS_ON ) {
    --        $self->__DependsOn( %args, Dependencies => $deps );
    --    }
    --    return $deps;
    --}
    --
    --sub __DependsOn
    --{
    --    my $self = shift;
    --    my %args = (
    --            Shredder => undef,
    --            Dependencies => undef,
    --            @_,
    --           );
    --    my $deps = $args{'Dependencies'};
    --    my $list = [];
    --
    --# Object custom field values
    --    my $objs = $self->CustomFieldValues;
    --    $objs->{'find_expired_rows'} = 1;
    --    push( @$list, $objs );
    --
    --# Object attributes
    --    $objs = $self->Attributes;
    --    push( @$list, $objs );
    --
    --# Transactions
    --    $objs = RT::Transactions->new( $self->CurrentUser );
    --    $objs->Limit( FIELD => 'ObjectType', VALUE => ref $self );
    --    $objs->Limit( FIELD => 'ObjectId', VALUE => $self->id );
    --    push( @$list, $objs );
    --
    --# Links
    --    if ( $self->can('Links') ) {
    --        # make sure we don't skip any record
    --        no warnings 'redefine';
    --        local *RT::Links::IsValidLink = sub { 1 };
    --
    --        foreach ( qw(Base Target) ) {
    --            my $objs = $self->Links( $_ );
    --            $objs->_DoSearch;
    --            push @$list, $objs->ItemsArrayRef;
    --        }
    --    }
    --
    --# ACE records
    --    $objs = RT::ACL->new( $self->CurrentUser );
    --    $objs->LimitToObject( $self );
    --    push( @$list, $objs );
    --
    --    $deps->_PushDependencies(
    --            BaseObject => $self,
    --            Flags => RT::Shredder::Constants::DEPENDS_ON,
    --            TargetObjects => $list,
    --            Shredder => $args{'Shredder'}
    --        );
    --    return;
    --}
    --
    --# implement proxy method because some RT classes
    --# override Delete method
    --sub __Wipeout
    --{
    --    my $self = shift;
    --    my $msg = $self->UID ." wiped out";
    --    $self->SUPER::Delete;
    --    $RT::Logger->info( $msg );
    --    return;
    --}
    --
    --1;
    -
6:  5486169 = 6:  4d49320 Add new object types which have Creator and LastUpdatedBy
7:  1a0aa76 ! 7:  ec05aa1 Remove Shredder subclasses with no __DependsOn
    @@ -35,7 +35,7 @@
     -#
     -# COPYRIGHT:
     -#
    --# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
    +-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
     -#                                          <sales at bestpractical.com>
     -#
     -# (Except where explicitly superseded by other copyright notices)
    @@ -79,8 +79,8 @@
     -#
     -# END BPS TAGGED BLOCK }}}
     -
    +-package RT::ACE;
     -use RT::ACE ();
    --package RT::ACE;
     -
     -use strict;
     -use warnings;
    @@ -122,7 +122,7 @@
     -#
     -# COPYRIGHT:
     -#
    --# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
    +-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
     -#                                          <sales at bestpractical.com>
     -#
     -# (Except where explicitly superseded by other copyright notices)
    @@ -166,8 +166,8 @@
     -#
     -# END BPS TAGGED BLOCK }}}
     -
    +-package RT::CustomFieldValue;
     -use RT::CustomFieldValue ();
    --package RT::CustomFieldValue;
     -
     -use strict;
     -use warnings;
    @@ -192,7 +192,7 @@
     -#
     -# COPYRIGHT:
     -#
    --# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
    +-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
     -#                                          <sales at bestpractical.com>
     -#
     -# (Except where explicitly superseded by other copyright notices)
    @@ -236,8 +236,8 @@
     -#
     -# END BPS TAGGED BLOCK }}}
     -
    +-package RT::ObjectCustomFieldValue;
     -use RT::ObjectCustomFieldValue ();
    --package RT::ObjectCustomFieldValue;
     -
     -use strict;
     -use warnings;
8:  c9957b5 ! 8:  8944378 Fold RT::Shredder code into core record classes
    @@ -496,7 +496,7 @@
     +use RT::Shredder::Dependencies;
      use RT::Shredder::Constants;
      use RT::Shredder::Exceptions;
    - use Encode qw();
    + 
     
     diff --git a/lib/RT/Scrip.pm b/lib/RT/Scrip.pm
     --- a/lib/RT/Scrip.pm
    @@ -529,9 +529,9 @@
     +    return $self->SUPER::__DependsOn( %args );
     +}
     +
    - sub PreInflate {
    -     my $class = shift;
    -     my ($importer, $uid, $data) = @_;
    + sub Serialize {
    +     my $self = shift;
    +     my %args = (@_);
     
     diff --git a/lib/RT/ScripAction.pm b/lib/RT/ScripAction.pm
     --- a/lib/RT/ScripAction.pm
    @@ -637,7 +637,7 @@
     -#
     -# COPYRIGHT:
     -#
    --# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
    +-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
     -#                                          <sales at bestpractical.com>
     -#
     -# (Except where explicitly superseded by other copyright notices)
    @@ -681,8 +681,8 @@
     -#
     -# END BPS TAGGED BLOCK }}}
     -
    +-package RT::Attachment;
     -use RT::Attachment ();
    --package RT::Attachment;
     -
     -use strict;
     -use warnings;
    @@ -737,7 +737,7 @@
     -#
     -# COPYRIGHT:
     -#
    --# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
    +-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
     -#                                          <sales at bestpractical.com>
     -#
     -# (Except where explicitly superseded by other copyright notices)
    @@ -781,8 +781,8 @@
     -#
     -# END BPS TAGGED BLOCK }}}
     -
    +-package RT::CachedGroupMember;
     -use RT::CachedGroupMember ();
    --package RT::CachedGroupMember;
     -
     -use strict;
     -use warnings;
    @@ -844,7 +844,7 @@
     -#
     -# COPYRIGHT:
     -#
    --# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
    +-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
     -#                                          <sales at bestpractical.com>
     -#
     -# (Except where explicitly superseded by other copyright notices)
    @@ -888,8 +888,8 @@
     -#
     -# END BPS TAGGED BLOCK }}}
     -
    +-package RT::CustomField;
     -use RT::CustomField ();
    --package RT::CustomField;
     -
     -use strict;
     -use warnings;
    @@ -940,7 +940,7 @@
     -#
     -# COPYRIGHT:
     -#
    --# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
    +-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
     -#                                          <sales at bestpractical.com>
     -#
     -# (Except where explicitly superseded by other copyright notices)
    @@ -984,8 +984,8 @@
     -#
     -# END BPS TAGGED BLOCK }}}
     -
    +-package RT::Group;
     -use RT::Group ();
    --package RT::Group;
     -
     -use strict;
     -use warnings;
    @@ -1086,7 +1086,7 @@
     -#
     -# COPYRIGHT:
     -#
    --# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
    +-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
     -#                                          <sales at bestpractical.com>
     -#
     -# (Except where explicitly superseded by other copyright notices)
    @@ -1130,8 +1130,8 @@
     -#
     -# END BPS TAGGED BLOCK }}}
     -
    +-package RT::GroupMember;
     -use RT::GroupMember ();
    --package RT::GroupMember;
     -
     -use strict;
     -use warnings;
    @@ -1224,7 +1224,7 @@
     -#
     -# COPYRIGHT:
     -#
    --# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
    +-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
     -#                                          <sales at bestpractical.com>
     -#
     -# (Except where explicitly superseded by other copyright notices)
    @@ -1268,8 +1268,8 @@
     -#
     -# END BPS TAGGED BLOCK }}}
     -
    +-package RT::Link;
     -use RT::Link ();
    --package RT::Link;
     -
     -use strict;
     -use warnings;
    @@ -1351,7 +1351,7 @@
     -#
     -# COPYRIGHT:
     -#
    --# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
    +-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
     -#                                          <sales at bestpractical.com>
     -#
     -# (Except where explicitly superseded by other copyright notices)
    @@ -1395,8 +1395,8 @@
     -#
     -# END BPS TAGGED BLOCK }}}
     -
    +-package RT::Principal;
     -use RT::Principal ();
    --package RT::Principal;
     -
     -use strict;
     -use warnings;
    @@ -1462,7 +1462,7 @@
     -#
     -# COPYRIGHT:
     -#
    --# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
    +-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
     -#                                          <sales at bestpractical.com>
     -#
     -# (Except where explicitly superseded by other copyright notices)
    @@ -1506,8 +1506,8 @@
     -#
     -# END BPS TAGGED BLOCK }}}
     -
    +-package RT::Queue;
     -use RT::Queue ();
    --package RT::Queue;
     -
     -use strict;
     -use warnings;
    @@ -1575,7 +1575,7 @@
     -#
     -# COPYRIGHT:
     -#
    --# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
    +-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
     -#                                          <sales at bestpractical.com>
     -#
     -# (Except where explicitly superseded by other copyright notices)
    @@ -1619,8 +1619,8 @@
     -#
     -# END BPS TAGGED BLOCK }}}
     -
    +-package RT::Scrip;
     -use RT::Scrip ();
    --package RT::Scrip;
     -
     -use strict;
     -use warnings;
    @@ -1666,7 +1666,7 @@
     -#
     -# COPYRIGHT:
     -#
    --# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
    +-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
     -#                                          <sales at bestpractical.com>
     -#
     -# (Except where explicitly superseded by other copyright notices)
    @@ -1710,8 +1710,8 @@
     -#
     -# END BPS TAGGED BLOCK }}}
     -
    +-package RT::ScripAction;
     -use RT::ScripAction ();
    --package RT::ScripAction;
     -
     -use strict;
     -use warnings;
    @@ -1756,7 +1756,7 @@
     -#
     -# COPYRIGHT:
     -#
    --# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
    +-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
     -#                                          <sales at bestpractical.com>
     -#
     -# (Except where explicitly superseded by other copyright notices)
    @@ -1800,8 +1800,8 @@
     -#
     -# END BPS TAGGED BLOCK }}}
     -
    +-package RT::ScripCondition;
     -use RT::ScripCondition ();
    --package RT::ScripCondition;
     -
     -use strict;
     -use warnings;
    @@ -1846,7 +1846,7 @@
     -#
     -# COPYRIGHT:
     -#
    --# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
    +-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
     -#                                          <sales at bestpractical.com>
     -#
     -# (Except where explicitly superseded by other copyright notices)
    @@ -1890,8 +1890,8 @@
     -#
     -# END BPS TAGGED BLOCK }}}
     -
    +-package RT::Template;
     -use RT::Template ();
    --package RT::Template;
     -
     -use strict;
     -use warnings;
    @@ -1936,7 +1936,7 @@
     -#
     -# COPYRIGHT:
     -#
    --# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
    +-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
     -#                                          <sales at bestpractical.com>
     -#
     -# (Except where explicitly superseded by other copyright notices)
    @@ -1980,8 +1980,8 @@
     -#
     -# END BPS TAGGED BLOCK }}}
     -
    +-package RT::Ticket;
     -use RT::Ticket ();
    --package RT::Ticket;
     -
     -use strict;
     -use warnings;
    @@ -2037,7 +2037,7 @@
     -#
     -# COPYRIGHT:
     -#
    --# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
    +-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
     -#                                          <sales at bestpractical.com>
     -#
     -# (Except where explicitly superseded by other copyright notices)
    @@ -2081,8 +2081,8 @@
     -#
     -# END BPS TAGGED BLOCK }}}
     -
    +-package RT::Transaction;
     -use RT::Transaction ();
    --package RT::Transaction;
     -
     -use strict;
     -use warnings;
    @@ -2125,7 +2125,7 @@
     -#
     -# COPYRIGHT:
     -#
    --# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
    +-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
     -#                                          <sales at bestpractical.com>
     -#
     -# (Except where explicitly superseded by other copyright notices)
    @@ -2169,8 +2169,8 @@
     -#
     -# END BPS TAGGED BLOCK }}}
     -
    +-package RT::User;
     -use RT::User ();
    --package RT::User;
     -
     -use strict;
     -use warnings;



More information about the rt-commit mailing list