[Bps-public-commit] r9771 - in Mnemonic: . lib lib/Mnemonic/Stash
jesse at bestpractical.com
jesse at bestpractical.com
Fri Nov 30 15:13:14 EST 2007
Author: jesse
Date: Fri Nov 30 15:13:07 2007
New Revision: 9771
Modified:
Mnemonic/ (props changed)
Mnemonic/bin/mnemonic
Mnemonic/lib/Mnemonic.pm
Mnemonic/lib/Mnemonic/Stash/Checksum.pm
Log:
r72541 at pinglin: jesse | 2007-11-30 15:12:42 -0500
* last changes before abandonment
Modified: Mnemonic/bin/mnemonic
==============================================================================
--- Mnemonic/bin/mnemonic (original)
+++ Mnemonic/bin/mnemonic Fri Nov 30 15:13:07 2007
@@ -10,6 +10,7 @@
GetOptions(\%argv,
'restore=s',
+ 'set=s',
'list|ls=s',
'backup',
'index',
Modified: Mnemonic/lib/Mnemonic.pm
==============================================================================
--- Mnemonic/lib/Mnemonic.pm (original)
+++ Mnemonic/lib/Mnemonic.pm Fri Nov 30 15:13:07 2007
@@ -86,11 +86,23 @@
skip => undef,
dry_run => undef,
verbose => undef,
+ set => undef,
@_
);
+
+ my $set_config;
+ if ($args{'set'}) {
+ $set_config = $self->config->{'set'}->{$args{'set'}};
+
+ foreach my $key (qw(dry_run verbose skip path)){
+ $args{$key} = defined $set_config->{$key} ? $set_config->{$key} : $args{$key};
+ }
+ }
+
+
my $manifest = {};
my $seen_checksum = {};
- j$seen_checksum->{$_} = "prestored" for ( @{ $args{'stored_keys'} } );
+ $seen_checksum->{$_} = "prestored" for ( @{ $args{'stored_keys'} } );
my $on_match = sub {
my $checksum = $self->store_item(
manifest => $manifest,
@@ -276,11 +288,7 @@
}
}
elsif ( -d $filename ) {
- $manifest->{$filename} = {
- type => 'directory',
- statinfo => [ stat($filename) ],
- stored => '0'
- }
+ $manifest->{$filename} = { type => 'directory', statinfo => [ stat($filename) ], stored => '0' }
}
}
Modified: Mnemonic/lib/Mnemonic/Stash/Checksum.pm
==============================================================================
--- Mnemonic/lib/Mnemonic/Stash/Checksum.pm (original)
+++ Mnemonic/lib/Mnemonic/Stash/Checksum.pm Fri Nov 30 15:13:07 2007
@@ -13,8 +13,8 @@
column sha256 => type is 'text';
column path => type is 'text';
column object_type => type is 'text';
- column subkeys => type is 'text', filters are 'Jifty::DBI::Filter::Storable';
- column statinfo => type is 'text', filters are 'Jifty::DBI::Filter::Storable';
+ column subkeys => type is 'blob', filters are 'Jifty::DBI::Filter::Storable';
+ column statinfo => type is 'blob', filters are 'Jifty::DBI::Filter::Storable';
};
More information about the Bps-public-commit
mailing list