Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
authorJoey Hess <joey@kitenet.net>
Sun, 27 Jun 2010 17:50:02 +0000 (13:50 -0400)
committerJoey Hess <joey@kitenet.net>
Sun, 27 Jun 2010 17:50:02 +0000 (13:50 -0400)
.gitattributes [new file with mode: 0644]
IkiWiki/Plugin/hnb.pm
debian/changelog
t/bazaar.t
t/cvs.t
t/git.t
t/mercurial.t
t/svn.t

diff --git a/.gitattributes b/.gitattributes
new file mode 100644 (file)
index 0000000..5d42584
--- /dev/null
@@ -0,0 +1 @@
+debian/changelog merge=dpkg-mergechangelogs
index 32c9cf3ada5b1ed3ed65114177fbcade05d0eaf2..5157a6b93ce54c80ffac7330e50033cde57eddb4 100644 (file)
@@ -33,8 +33,8 @@ sub htmlize (@) {
        # hnb outputs version number etc. every time to STDOUT, so
        # using files makes it easier to seprarate.
 
-       my $tmpin  = mkstemp( "/tmp/ikiwiki-hnbin.XXXXXXXXXX"  );
-       my $tmpout = mkstemp( "/tmp/ikiwiki-hnbout.XXXXXXXXXX" );
+       my ($infh, $tmpin)  = mkstemp( "/tmp/ikiwiki-hnbin.XXXXXXXXXX"  );
+       my ($outfh, $tmpout) = mkstemp( "/tmp/ikiwiki-hnbout.XXXXXXXXXX" );
 
        open(TMP, '>', $tmpin) or die "Can't write to $tmpin: $!";
        print TMP $params{content};
index ae1d23479a0004a497f167fa88fc1ded1f46d811..15ae21a55c729179623c13b21d31e11464daef7e 100644 (file)
@@ -12,6 +12,8 @@ ikiwiki (3.20100624) UNRELEASED; urgency=low
   * Fixed some confusion and bugginess about whether
     rcs_getctime/rcs_getmtime were passed absolute or relative filenames.
     (Make it relative like everything else.)
+  * hnb: Fixed broken use of mkstemp that had caused dangling temp files,
+    and prevented actually rendering hnb files.
 
  -- Joey Hess <joeyh@debian.org>  Wed, 23 Jun 2010 15:30:04 -0400
 
index 3e54ec4dc8f57ee7601f572d090a5dd66f04a822..cd840fbe1b39d2d48340430da718e1e8788d5c79 100755 (executable)
@@ -6,11 +6,14 @@ BEGIN {
        $dir = "/tmp/ikiwiki-test-bzr.$$";
        my $bzr=`which bzr`;
        chomp $bzr;
-       if (! -x $bzr || ! mkdir($dir)) {
+       if (! -x $bzr) {
                eval q{
-                       use Test::More skip_all => "bzr not available or could not make test dir"
+                       use Test::More skip_all => "bzr not available"
                }
        }
+       if (! mkdir($dir)) {
+               die $@;
+       }
 }
 use Test::More tests => 17;
 
diff --git a/t/cvs.t b/t/cvs.t
index 96359ab6e2a6bb9773af99179cf567da8732b3b1..5ed377ed5e7234b369cc456d814e4ceefb51266c 100755 (executable)
--- a/t/cvs.t
+++ b/t/cvs.t
@@ -8,11 +8,14 @@ BEGIN {
        chomp $cvs;
        my $cvsps=`which cvsps`;
        chomp $cvsps;
-       if (! -x $cvs || ! -x $cvsps || ! mkdir($dir)) {
+       if (! -x $cvs || ! -x $cvsps) {
                eval q{
-                       use Test::More skip_all => "cvs or cvsps not available or could not make test dir"
+                       use Test::More skip_all => "cvs or cvsps not available"
                }
        }
+       if (! mkdir($dir)) {
+               die $@;
+       }
        foreach my $module ('File::ReadBackwards', 'File::MimeInfo') {
                eval qq{use $module};
                if ($@) {
diff --git a/t/git.t b/t/git.t
index ee778ebf0ab38050eabd52f8528c25d1fe392058..6d847dfb04d56808dab435a125bc6cbadcfd3af0 100755 (executable)
--- a/t/git.t
+++ b/t/git.t
@@ -7,11 +7,14 @@ BEGIN {
        $dir="/tmp/ikiwiki-test-git.$$";
        my $git=`which git`;
        chomp $git;
-       if (! -x $git || ! mkdir($dir)) {
+       if (! -x $git) {
                eval q{
-                       use Test::More skip_all => "git not available or could not make test dir"
+                       use Test::More skip_all => "git not available"
                }
        }
+       if (! mkdir($dir)) {
+               die $@;
+       }
 }
 use Test::More tests => 18;
 
index b64ea8e563a0a0f6a683fa095374712c194a2c38..4918fc76e9a0bb37adecc18ecbf47cc1eba1a795 100755 (executable)
@@ -6,11 +6,14 @@ BEGIN {
        $dir = "/tmp/ikiwiki-test-hg.$$";
        my $hg=`which hg`;
        chomp $hg;
-       if (! -x $hg || ! mkdir($dir)) {
+       if (! -x $hg) {
                eval q{
-                       use Test::More skip_all => "hg not available or could not make test dir"
+                       use Test::More skip_all => "hg not available"
                }
        }
+       if (! mkdir($dir)) {
+               die $@;
+       }
 }
 use Test::More tests => 11;
 
diff --git a/t/svn.t b/t/svn.t
index 82b71b5fc1a404fc81159b6585c47997e9a4eb10..cce8452a66107dfb89c301200c22035087bf77de 100755 (executable)
--- a/t/svn.t
+++ b/t/svn.t
@@ -8,11 +8,14 @@ BEGIN {
        chomp $svn;
        my $svnadmin=`which svnadmin`;
        chomp $svnadmin;
-       if (! -x $svn || ! -x $svnadmin || ! mkdir($dir)) {
+       if (! -x $svn || ! -x $svnadmin) {
                eval q{
-                       use Test::More skip_all => "svn not available or could not make test dir"
+                       use Test::More skip_all => "svn or svnadmin not available"
                }
        }
+       if (! mkdir($dir)) {
+               die $@;
+       }
 }
 use Test::More tests => 12;