hgext/convert/subversion.py
branchstable
changeset 12343 28642f7fc2cf
parent 11779 2b7a75ca6913
child 12770 614f0d8724ab
equal deleted inserted replaced
12342:70236d6fd844 12343:28642f7fc2cf
  1035     def _copyfile(self, source, dest):
  1035     def _copyfile(self, source, dest):
  1036         # SVN's copy command pukes if the destination file exists, but
  1036         # SVN's copy command pukes if the destination file exists, but
  1037         # our copyfile method expects to record a copy that has
  1037         # our copyfile method expects to record a copy that has
  1038         # already occurred.  Cross the semantic gap.
  1038         # already occurred.  Cross the semantic gap.
  1039         wdest = self.wjoin(dest)
  1039         wdest = self.wjoin(dest)
  1040         exists = os.path.exists(wdest)
  1040         exists = os.path.lexists(wdest)
  1041         if exists:
  1041         if exists:
  1042             fd, tempname = tempfile.mkstemp(
  1042             fd, tempname = tempfile.mkstemp(
  1043                 prefix='hg-copy-', dir=os.path.dirname(wdest))
  1043                 prefix='hg-copy-', dir=os.path.dirname(wdest))
  1044             os.close(fd)
  1044             os.close(fd)
  1045             os.unlink(tempname)
  1045             os.unlink(tempname)