[svk-commit] r2845 - branches/path-resolver/lib/SVK/Inspector

nobody at bestpractical.com nobody at bestpractical.com
Fri May 9 13:32:22 EDT 2008


Author: ruz
Date: Fri May  9 13:32:20 2008
New Revision: 2845

Modified:
   branches/path-resolver/lib/SVK/Inspector/Root.pm

Log:
* if file doesn't exist then file_md5_checksum may return undef then
  we should compare with md5 of the empty string


Modified: branches/path-resolver/lib/SVK/Inspector/Root.pm
==============================================================================
--- branches/path-resolver/lib/SVK/Inspector/Root.pm	(original)
+++ branches/path-resolver/lib/SVK/Inspector/Root.pm	Fri May  9 13:32:20 2008
@@ -79,7 +79,10 @@
 sub localmod {
     my ($self, $path, $checksum, $pool) = @_;
     $path = $self->_anchor_path($path);
-    my $md5 = $self->root->file_md5_checksum ($path, $pool);
+    my $md5 = $self->root->file_md5_checksum ($path, $pool)
+        # XXX: consider adding a constant string instead of code
+        || do { require Digest::MD5; Digest::MD5::md5_hex('') };
+
     return if $md5 eq $checksum;
     return [$self->root->file_contents ($path, $pool), undef, $md5];
 }


More information about the svk-commit mailing list