mercurial/hg.py
changeset 21801 2ccd71bbd0f7
parent 21800 219af1521a6a
child 21802 ff27fad408c4
equal deleted inserted replaced
21800:219af1521a6a 21801:2ccd71bbd0f7
   173     sharedpath = srcrepo.sharedpath # if our source is already sharing
   173     sharedpath = srcrepo.sharedpath # if our source is already sharing
   174 
   174 
   175     root = os.path.realpath(dest)
   175     root = os.path.realpath(dest)
   176     roothg = os.path.join(root, '.hg')
   176     roothg = os.path.join(root, '.hg')
   177     destwvfs = scmutil.vfs(dest, realpath=True)
   177     destwvfs = scmutil.vfs(dest, realpath=True)
   178 
   178     destvfs = scmutil.vfs(os.path.join(destwvfs.base, '.hg'), realpath=True)
   179     if os.path.exists(roothg):
   179 
       
   180     if destvfs.lexists():
   180         raise util.Abort(_('destination already exists'))
   181         raise util.Abort(_('destination already exists'))
   181 
   182 
   182     if not destwvfs.isdir():
   183     if not destwvfs.isdir():
   183         destwvfs.mkdir()
   184         destwvfs.mkdir()
   184     util.makedir(roothg, notindexed=True)
   185     destvfs.makedir()
   185 
   186 
   186     requirements = ''
   187     requirements = ''
   187     try:
   188     try:
   188         requirements = srcrepo.opener.read('requires')
   189         requirements = srcrepo.opener.read('requires')
   189     except IOError, inst:
   190     except IOError, inst: