mercurial/hg.py
changeset 3034 3acb76f0124d
parent 2858 345bac2bc4ec
child 3069 bc3fe3b5b785
equal deleted inserted replaced
3033:adf7f3421c55 3034:3acb76f0124d
   125             self.dir_ = None
   125             self.dir_ = None
   126         def __del__(self):
   126         def __del__(self):
   127             if self.dir_:
   127             if self.dir_:
   128                 self.rmtree(self.dir_, True)
   128                 self.rmtree(self.dir_, True)
   129 
   129 
   130     dest_repo = None
   130     dest_repo = repository(ui, dest, create=True)
   131     try:
       
   132         dest_repo = repository(ui, dest)
       
   133         raise util.Abort(_("destination '%s' already exists." % dest))
       
   134     except RepoError:
       
   135         dest_repo = repository(ui, dest, create=True)
       
   136 
   131 
   137     dest_path = None
   132     dest_path = None
   138     dir_cleanup = None
   133     dir_cleanup = None
   139     if dest_repo.local():
   134     if dest_repo.local():
   140         dest_path = os.path.realpath(dest_repo.root)
   135         dest_path = os.path.realpath(dest_repo.root)