Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hg.py @ 3037:3acb76f0124d
clone: simplifying dest repo creation
since creating a repo raises an exception if the repo already
exists, there's no need to try to create one.
add some test for repo creation when the destination exists
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sat, 02 Sep 2006 23:26:10 +0200 |
parents | 345bac2bc4ec |
children | bc3fe3b5b785 |
line wrap: on
line diff
--- a/mercurial/hg.py Sat Sep 02 23:14:35 2006 +0200 +++ b/mercurial/hg.py Sat Sep 02 23:26:10 2006 +0200 @@ -127,12 +127,7 @@ if self.dir_: self.rmtree(self.dir_, True) - dest_repo = None - try: - dest_repo = repository(ui, dest) - raise util.Abort(_("destination '%s' already exists." % dest)) - except RepoError: - dest_repo = repository(ui, dest, create=True) + dest_repo = repository(ui, dest, create=True) dest_path = None dir_cleanup = None