--- couchdb/design-couch.pl 2009/08/30 11:45:59 366 +++ couchdb/design-couch.pl 2009/08/30 11:56:31 367 @@ -43,12 +43,20 @@ #warn "# dir $dir"; } } + +sub svn { + my $path = shift; + return if $path =~ m{(_rev|.*\.(push|pull)\.js)$}; + system "svn add --parents $path"; +} + sub write_file { my ( $path, $content ) = @_; $path =~ s{^/+}{}; create_path $path; File::Slurp::write_file $path, $content; print "$path ", -s $path, " bytes created\n"; + svn $path; } sub write_attachment { @@ -57,6 +65,7 @@ create_path $file; $ua->mirror( "$url/$path", $file ); print "detached $file ", -s $file, " bytes\n"; + svn $file; }