chiark / gitweb /
remove spurious debug; fixes
[topbloke.git] / Topbloke.pm
index ec929ff69bd5d61cb1ae2dd290e4b18d1cc39c19..5ea0ae73e178d5d1120e5f4f90279371e6621ad4 100644 (file)
@@ -11,8 +11,6 @@ use IPC::Open2;
 use File::Path qw(make_path remove_tree);
 use File::Basename;
 
-use Data::Dumper;
-
 BEGIN {
     use Exporter   ();
     our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
@@ -416,7 +414,6 @@ sub patch_matches_spec ($$) {
 
 sub foreach_patch ($$$$) {
     my ($spec, $deleted_ok, $want, $body) = @_;
-print STDERR Dumper(\@_);
     # runs $body->($patch, $parsedname, \%meta)
     # where $meta{<metadata filename>} is, for <metadata filename> in @$want:
     #              undefined if metadata file doesn't exist
@@ -442,16 +439,14 @@ print STDERR Dumper(\@_);
        my $parsedname;
        my $patch = substr($',19); #');
        my $wantix = 0;
-print STDERR Dumper(\@want);
        foreach my $wantent (@want) {
            my $file = $wantent;
            my $stripnl = ($file =~ s/_$//);
+           my $key = $file;
            my $inbase = ($file =~ s/^B_//);
 
            if ($file eq ' patch') {
-print STDERR "has spc patch\n";
                if ($spec) {
-print STDERR "hasspec\n";
                    $parsedname = parse_patch_name($patch);
                    if (!patch_matches_spec($parsedname, $spec)) {
                        debug("foreach_patch  mismatch");
@@ -462,12 +457,12 @@ print STDERR "hasspec\n";
            }
 
            my $objkey = (!$inbase ? "$objname" : 
-                         "refs/topbloke-bases/$patch").":.topbloke/$file";
+                         "$baserefs/$patch").":.topbloke/$file";
            my ($got, $data) = git_get_object($objkey);
            if ($got eq 'missing') {
-               $meta{$file} = undef;
+               $meta{$key} = undef;
            } elsif ($got eq 'blob') {
-               $meta{$file} = $data;
+               $meta{$key} = $data;
                if ($file eq 'deleted' && !$deleted_ok) {
                    debug("foreach_patch  Deleted");
                    return;