~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/atomicfile.py

(Adrian Wilkins) Work around bug #304023,
        use a random temp name for AtomicFile.

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
        if _hostname is None:
56
56
            _hostname = osutils.get_host_name()
57
57
 
58
 
        self.tmpfilename = '%s.%d.%s.tmp' % (filename, _pid, _hostname)
 
58
        self.tmpfilename = '%s.%d.%s.%s.tmp' % (filename, _pid, _hostname,
 
59
                                                osutils.rand_chars(10))
59
60
 
60
61
        self.realfilename = filename
61
62