Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9.2, 1.9.3, and 2.0

sync: use tempfile.mktemp() to generate unique bundle file names

Changeset 951a5052f162

Parent 9c6ac7db874c

by Steve Borho

Changes to one file · Browse files at 951a5052f162 Showing diff from parent 9c6ac7db874c Diff from another changeset...

 
8
9
10
 
11
12
13
 
600
601
602
603
604
605
 
606
607
608
 
8
9
10
11
12
13
14
 
601
602
603
 
 
 
604
605
606
607
@@ -8,6 +8,7 @@
   import os  import re +import tempfile  import urlparse    from PyQt4.QtCore import * @@ -600,9 +601,7 @@
  for badchar in (':', '*', '\\', '?', '#'):   bfile = bfile.replace(badchar, '')   bfile = bfile.replace('/', '_') - bfile = os.path.join(qtlib.gettempdir(), bfile) + '.hg' - if os.path.exists(bfile): - os.unlink(bfile) + bfile = tempfile.mktemp('.hg', bfile+'_', qtlib.gettempdir())   self.finishfunc = finished   cmdline = ['--repository', self.repo.root, 'incoming',   '--bundle', bfile]