comparison mercurial/commands.py @ 2165:d821918e3bee

Use better names (hg-{usage}-{random}.{suffix}) for temporary files.
author Thomas Arendsen Hein <thomas@intevation.de>
date Sun, 30 Apr 2006 21:11:22 +0200
parents 858df1f354c1
children f5c2c6e69fd7
comparison
equal deleted inserted replaced
2164:cbd458228a96 2165:d821918e3bee
301 if filename: 301 if filename:
302 if os.path.exists(filename): 302 if os.path.exists(filename):
303 raise util.Abort(_("file '%s' already exists"), filename) 303 raise util.Abort(_("file '%s' already exists"), filename)
304 fh = open(filename, "wb") 304 fh = open(filename, "wb")
305 else: 305 else:
306 fd, filename = tempfile.mkstemp(suffix=".hg", prefix="hg-bundle-") 306 fd, filename = tempfile.mkstemp(prefix="hg-bundle-", suffix=".hg")
307 fh = os.fdopen(fd, "wb") 307 fh = os.fdopen(fd, "wb")
308 cleanup = filename 308 cleanup = filename
309 309
310 if compress: 310 if compress:
311 fh.write("HG10") 311 fh.write("HG10")