<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -3,6 +3,7 @@
 import sys
 import re
 import os
+import os.path
 import shutil
 import unittest
 import gitshelve
@@ -15,6 +16,10 @@ except:
 
 class t_gitshelve(unittest.TestCase):
     def setUp(self):
+        if os.name == 'nt':
+            self.tmpdir = os.getenv('TEMP')
+        else:
+            self.tmpdir = '/tmp'
         try: gitshelve.git('branch', '-D', 'test')
         except: pass
 
@@ -175,35 +180,40 @@ Date:   .+
 &quot;&quot;&quot;, log))
 
     def testDetachedRepo(self):
-        shelf = gitshelve.open(repository = '/tmp/repo-test')
+        repotest = os.path.join(self.tmpdir, 'repo-test')
+        repotestclone = os.path.join(self.tmpdir, 'repo-test-clone')
+        shelf = gitshelve.open(repository = repotest)
         text = &quot;Hello, world!\n&quot;
         shelf['foo.txt'] = text
 
         try:
             shelf.sync()
 
-            gitshelve.git('clone', '/tmp/repo-test', '/tmp/repo-test-clone')
+            gitshelve.git('clone', repotest, repotestclone)
+
+            clonedfoo = os.path.join(repotestclone, 'foo.txt')
 
             try:
-                self.assert_(os.path.isfile('/tmp/repo-test-clone/foo.txt'))
+                self.assert_(os.path.isfile(clonedfoo))
 
-                data = open('/tmp/repo-test-clone/foo.txt')
+                data = open(clonedfoo)
                 try:
                     self.assertEqual(text, data.read())
                 finally:
                     data.close()
             finally:
-                if os.path.isdir('/tmp/repo-test-clone'):
-                    shutil.rmtree('/tmp/repo-test-clone')
+                if os.path.isdir(repotestclone):
+                    shutil.rmtree(repotestclone)
         finally:
             del shelf
-            if os.path.isdir('/tmp/repo-test'):
-                shutil.rmtree('/tmp/repo-test')
+            if os.path.isdir(repotest):
+                shutil.rmtree(repotest)
 
     def testBlobStore(self):
         &quot;&quot;&quot;Test use a gitshelve as a generic blob store.&quot;&quot;&quot;
         try:
-            shelf = gitshelve.open(repository = '/tmp/blobs', keep_history = False)
+            blobpath = os.path.join(self.tmpdir, 'blobs')
+            shelf = gitshelve.open(repository = blobpath, keep_history = False)
             text = &quot;This is just some sample text.\n&quot;
             hash = shelf.put(text)
 
@@ -224,7 +234,7 @@ Date:   .+
 &quot;&quot;&quot;, buf.getvalue())
             del shelf
 
-            shelf = gitshelve.open(repository = '/tmp/blobs', keep_history = False)
+            shelf = gitshelve.open(repository = blobpath, keep_history = False)
             buf = StringIO()
             shelf.dump_objects(buf)
             self.assertEqual(&quot;&quot;&quot;tree 6c6167149ccc5bf60892b65b84322c1943f5f7da: ac
@@ -234,8 +244,8 @@ Date:   .+
             self.assertEqual(text, shelf.get(hash))
             del shelf
         finally:
-            if os.path.isdir('/tmp/blobs'):
-                shutil.rmtree('/tmp/blobs')
+            if os.path.isdir(blobpath):
+                shutil.rmtree(blobpath)
 
 def suite():
     return unittest.TestLoader().loadTestsFromTestCase(t_gitshelve)</diff>
      <filename>t_gitshelve.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>57281f8b346cffd8f2574fe1f5c17fe1916afb80</id>
    </parent>
  </parents>
  <author>
    <name>Marek Baczynski</name>
    <email>imbaczek@gmail.com</email>
  </author>
  <url>http://github.com/jwiegley/git-issues/commit/0113999799caf0ba3b49986906de86e1b96a6893</url>
  <id>0113999799caf0ba3b49986906de86e1b96a6893</id>
  <committed-date>2009-02-02T06:14:25-08:00</committed-date>
  <authored-date>2009-02-02T06:14:25-08:00</authored-date>
  <message>use %TEMP% on windows instead of /tmp</message>
  <tree>febf31715154dd08bdcd262d298e4ffa310ce4b6</tree>
  <committer>
    <name>Marek Baczynski</name>
    <email>imbaczek@gmail.com</email>
  </committer>
</commit>
