hgext/convert/darcs.py
changeset 38165 2ce60954b1b7
parent 36607 c6061cadb400
child 38312 79dd61a4554f
equal deleted inserted replaced
38164:aac4be30e250 38165:2ce60954b1b7
     8 
     8 
     9 import errno
     9 import errno
    10 import os
    10 import os
    11 import re
    11 import re
    12 import shutil
    12 import shutil
    13 import tempfile
    13 
    14 from mercurial.i18n import _
    14 from mercurial.i18n import _
    15 from mercurial import (
    15 from mercurial import (
    16     error,
    16     error,
       
    17     pycompat,
    17     util,
    18     util,
    18 )
    19 )
    19 from mercurial.utils import dateutil
    20 from mercurial.utils import dateutil
    20 from . import common
    21 from . import common
    21 NoRepo = common.NoRepo
    22 NoRepo = common.NoRepo
    74                                "please upgrade") % format)
    75                                "please upgrade") % format)
    75         else:
    76         else:
    76             self.ui.warn(_('failed to detect repository format!'))
    77             self.ui.warn(_('failed to detect repository format!'))
    77 
    78 
    78     def before(self):
    79     def before(self):
    79         self.tmppath = tempfile.mkdtemp(
    80         self.tmppath = pycompat.mkdtemp(
    80             prefix='convert-' + os.path.basename(self.path) + '-')
    81             prefix='convert-' + os.path.basename(self.path) + '-')
    81         output, status = self.run('init', repodir=self.tmppath)
    82         output, status = self.run('init', repodir=self.tmppath)
    82         self.checkexit(status)
    83         self.checkexit(status)
    83 
    84 
    84         tree = self.xml('changes', xml_output=True, summary=True,
    85         tree = self.xml('changes', xml_output=True, summary=True,