Skip to content

Commit

Permalink
Item301: add missing manifest entries
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@942 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
SvenDowideit authored and SvenDowideit committed Nov 25, 2008
1 parent e7d431d commit ab1d99f
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 20 deletions.
5 changes: 3 additions & 2 deletions core/lib/Foswiki/Contrib/core/MANIFEST
Expand Up @@ -509,6 +509,7 @@ lib/Foswiki/I18N.pm 0444
lib/Foswiki/I18N/Extract.pm 0444
lib/Foswiki/I18N/Fallback.pm 0444
lib/Foswiki/If/Node.pm 0444
lib/Foswiki/If/OP_isempty.pm 0444
lib/Foswiki/If/OP_isweb.pm 0444
lib/Foswiki/If/OP_istopic.pm 0444
lib/Foswiki/If/OP_dollar.pm 0444
Expand Down Expand Up @@ -909,10 +910,8 @@ pub/System/DocumentGraphics/xsl.gif 0644
pub/System/DocumentGraphics/zip.gif 0644
pub/System/FileAttachment/Sample.txt 0644
pub/System/FileAttachment/Smile.gif 0644
pub/System/JavascriptFiles/twiki.js 0644
pub/System/JavascriptFiles/twiki.compressed.js 0644
pub/System/JavascriptFiles/twikiCSS.js 0644
pub/System/JavascriptFiles/twikilib.js 0644
pub/System/JavascriptFiles/twikiArray.js 0644
pub/System/JavascriptFiles/twikiEvent.js 0644
pub/System/JavascriptFiles/twikiForm.js 0644
Expand All @@ -923,6 +922,8 @@ pub/System/JavascriptFiles/twikiString.js 0644
pub/System/JavascriptFiles/twikiStringUnicodeChars.js 0644
pub/System/JavascriptFiles/twikiStyles.js 0644
pub/System/JavascriptFiles/twikiWindow.js 0644
pub/System/JavascriptFiles/foswiki.js 0644
pub/System/JavascriptFiles/foswikilib.js 0644
pub/System/JavascriptFiles/foswiki_edit.js 0644
pub/System/JavascriptFiles/foswiki_renamebase.js 0644
pub/System/JavascriptFiles/twikiuiToggle.js 0644
Expand Down
18 changes: 17 additions & 1 deletion core/lib/Foswiki/Store.pm
Expand Up @@ -87,7 +87,23 @@ sub finish {
sub _getHandler {
my ( $this, $web, $topic, $attachment ) = @_;

return $this->{IMPL}->new( $this->{session}, $web, $topic, $attachment );
my $handler = $this->{IMPL}->new( $this->{session}, $web, $topic, $attachment );
return $handler;

#CompatibilityHack
if ((defined($topic)) && (!$handler->storedDataExists())) {
if (!$attachment) {
#print STDERR "getHandler, trying TWiki.$topic\n";
my $tryhandler = $this->{IMPL}->new( $this->{session}, 'TWiki', $topic );
$handler = $tryhandler if ($tryhandler->storedDataExists());
} else {
my $tryhandler = $this->{IMPL}->new( $this->{session}, 'TWiki', $topic, $attachment);
#print STDERR "$handler->{file} wasn't there, trying $tryhandler->{file} \n";
$handler = $tryhandler if ($tryhandler->storedDataExists());
}
}

return $handler;
}

=pod
Expand Down
6 changes: 5 additions & 1 deletion core/lib/Foswiki/Store/RcsFile.pm
Expand Up @@ -398,7 +398,9 @@ if the main file revision is required.
=cut

sub getRevision {
my ($this) = @_;
my $this = shift;
ASSERT( defined($this->{file}) ) if DEBUG;

return readFile( $this, $this->{file} );
}

Expand All @@ -412,6 +414,8 @@ Establishes if there is stored data associated with this handler.

sub storedDataExists {
my $this = shift;
ASSERT( defined($this->{file}) ) if DEBUG;

return -e $this->{file};
}

Expand Down
1 change: 1 addition & 0 deletions core/lib/Foswiki/UI/View.pm
Expand Up @@ -461,6 +461,7 @@ sub viewfile {
unless ( $fileName
&& $session->{store}->attachmentExists( $webName, $topic, $fileName ) )
{
die "attachment? $webName, $topic, $fileName\n";
throw Foswiki::OopsException(
'attention',
def => 'no_such_attachment',
Expand Down
34 changes: 18 additions & 16 deletions core/tools/check_manifest.pl
Expand Up @@ -4,6 +4,24 @@
require Cwd;
use File::Find;


my $manifest = 'MANIFEST';
#unless (-f $manifest) {
# File::Find::find( sub { /^MANIFEST\z/ && ( $manifest = $File::Find::name )
# }, "$root/lib/TWiki" );
#}
die "No such MANIFEST $manifest" unless -e $manifest;

my %man;

open MAN, "< $manifest" or die "Can't open $manifest for reading: $!";
while( <MAN> ) {
next if /^!include/;
$man{$1} = 1 if /^(\S+)\s+\d+$/;
}
close MAN;


my @cwd = split(/[\/\\]/, Cwd::getcwd());
my $root;

Expand All @@ -28,22 +46,6 @@
END
print "The ",join(',', @skip)," directories are *not* scanned.\n";

my $manifest = 'lib/MANIFEST';
unless (-f $manifest) {
File::Find::find( sub { /^MANIFEST\z/ && ( $manifest = $File::Find::name )
}, "$root/lib/TWiki" );
}
die "No such MANIFEST $manifest" unless -e $manifest;

my %man;

open MAN, "< $manifest" or die "Can't open $manifest for reading: $!";
while( <MAN> ) {
next if /^!include/;
$man{$1} = 1 if /^(\S+)\s+\d+$/;
}
close MAN;

my @lost;
my $sk = join('|', @skip);
foreach my $dir( grep { -d "$root/$_" }
Expand Down

0 comments on commit ab1d99f

Please sign in to comment.