Merge with crew
authorMatt Mackall <mpm@selenic.com>
Thu, 20 Apr 2006 12:13:54 -0500
changeset 2106 b03de24ee2ec
parent 2105 21cf3fe64e27 (current diff)
parent 2104 f1085d34d20d (diff)
child 2107 7ff92c04f8e5
child 2110 25a8d116ab6a
Merge with crew
--- a/mercurial/appendfile.py
+++ b/mercurial/appendfile.py
@@ -131,14 +131,11 @@ class appendopener(object):
             fp = open(tmpname, 'rb')
             s = fp.read()
             fp.close()
+            os.unlink(tmpname)
             fp = self.realopener(name, 'a')
             fp.write(s)
             fp.close()
 
-    def __del__(self):
-        for tmpname in self.tmpnames.itervalues():
-            os.unlink(tmpname)
-
 # files for changelog and manifest are in different appendopeners, so
 # not mixed up together.
 
--- a/mercurial/hgweb.py
+++ b/mercurial/hgweb.py
@@ -419,7 +419,8 @@ class hgweb(object):
         mt = mimetypes.guess_type(f)[0]
         rawtext = text
         if util.binary(text):
-            text = "(binary:%s)" % (mt or 'data')
+            mt = mt or 'application/octet-stream'
+            text = "(binary:%s)" % mt
         mt = mt or 'text/plain'
 
         def lines():
new file mode 100755
--- /dev/null
+++ b/tests/test-committer
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+unset HGUSER
+EMAIL="My Name <myname@example.com>"
+export EMAIL
+
+hg init test
+cd test
+touch asdf
+hg add asdf
+hg commit -d '1000000 0' -m commit-1
+hg tip
new file mode 100644
--- /dev/null
+++ b/tests/test-committer.out
@@ -0,0 +1,6 @@
+changeset:   0:9426b370c206
+tag:         tip
+user:        My Name <myname@example.com>
+date:        Mon Jan 12 13:46:40 1970 +0000
+summary:     commit-1
+