merge with crew.
authorVadim Gelfer <vadim.gelfer@gmail.com>
Sun, 30 Apr 2006 16:30:57 -0700
changeset 2167 f5c2c6e69fd7
parent 2166 d0c02b4dce9a (current diff)
parent 2165 d821918e3bee (diff)
child 2172 eba364839c67
merge with crew.
mercurial/commands.py
mercurial/localrepo.py
--- a/hgext/gpg.py	Sun Apr 30 16:30:39 2006 -0700
+++ b/hgext/gpg.py	Sun Apr 30 16:30:57 2006 -0700
@@ -23,11 +23,11 @@
         """ returns of the good and bad signatures"""
         try:
             # create temporary files
-            fd, sigfile = tempfile.mkstemp(prefix="hggpgsig")
+            fd, sigfile = tempfile.mkstemp(prefix="hg-gpg-", suffix=".sig")
             fp = os.fdopen(fd, 'wb')
             fp.write(sig)
             fp.close()
-            fd, datafile = tempfile.mkstemp(prefix="hggpgdata")
+            fd, datafile = tempfile.mkstemp(prefix="hg-gpg-", suffix=".txt")
             fp = os.fdopen(fd, 'wb')
             fp.write(data)
             fp.close()
--- a/hgext/patchbomb.py	Sun Apr 30 16:30:39 2006 -0700
+++ b/hgext/patchbomb.py	Sun Apr 30 16:30:57 2006 -0700
@@ -62,7 +62,7 @@
 except ImportError: pass
 
 def diffstat(patch):
-    fd, name = tempfile.mkstemp()
+    fd, name = tempfile.mkstemp(prefix="hg-patchbomb-", suffix=".txt")
     try:
         p = popen2.Popen3('diffstat -p1 -w79 2>/dev/null > ' + name)
         try:
--- a/mercurial/appendfile.py	Sun Apr 30 16:30:39 2006 -0700
+++ b/mercurial/appendfile.py	Sun Apr 30 16:30:57 2006 -0700
@@ -38,7 +38,7 @@
             self.tmpname = tmpname
             self.tmpfp = open(self.tmpname, 'ab+')
         else:
-            fd, self.tmpname = tempfile.mkstemp()
+            fd, self.tmpname = tempfile.mkstemp(prefix="hg-appendfile-")
             self.tmpfp = os.fdopen(fd, 'ab+')
         self.realfp = fp
         self.offset = fp.tell()
--- a/mercurial/commands.py	Sun Apr 30 16:30:39 2006 -0700
+++ b/mercurial/commands.py	Sun Apr 30 16:30:57 2006 -0700
@@ -303,7 +303,7 @@
                 raise util.Abort(_("file '%s' already exists"), filename)
             fh = open(filename, "wb")
         else:
-            fd, filename = tempfile.mkstemp(suffix=".hg", prefix="hg-bundle-")
+            fd, filename = tempfile.mkstemp(prefix="hg-bundle-", suffix=".hg")
             fh = os.fdopen(fd, "wb")
         cleanup = filename
 
--- a/mercurial/localrepo.py	Sun Apr 30 16:30:39 2006 -0700
+++ b/mercurial/localrepo.py	Sun Apr 30 16:30:57 2006 -0700
@@ -1824,7 +1824,7 @@
 
         def temp(prefix, node):
             pre = "%s~%s." % (os.path.basename(fn), prefix)
-            (fd, name) = tempfile.mkstemp("", pre)
+            (fd, name) = tempfile.mkstemp(prefix=pre)
             f = os.fdopen(fd, "wb")
             self.wwrite(fn, fl.read(node), f)
             f.close()
--- a/mercurial/util.py	Sun Apr 30 16:30:39 2006 -0700
+++ b/mercurial/util.py	Sun Apr 30 16:30:57 2006 -0700
@@ -46,11 +46,11 @@
     the temporary files generated.'''
     inname, outname = None, None
     try:
-        infd, inname = tempfile.mkstemp(prefix='hgfin')
+        infd, inname = tempfile.mkstemp(prefix='hg-filter-in-')
         fp = os.fdopen(infd, 'wb')
         fp.write(s)
         fp.close()
-        outfd, outname = tempfile.mkstemp(prefix='hgfout')
+        outfd, outname = tempfile.mkstemp(prefix='hg-filter-out-')
         os.close(outfd)
         cmd = cmd.replace('INFILE', inname)
         cmd = cmd.replace('OUTFILE', outname)
@@ -464,7 +464,7 @@
 
     def mktempcopy(name):
         d, fn = os.path.split(name)
-        fd, temp = tempfile.mkstemp(prefix=fn, dir=d)
+        fd, temp = tempfile.mkstemp(prefix=".%s-" % fn, dir=d)
         fp = os.fdopen(fd, "wb")
         try:
             fp.write(file(name, "rb").read())