Show More
@@ -857,20 +857,17 b' def clone(' | |||
|
857 | 857 | |
|
858 | 858 | if copy: |
|
859 | 859 | srcrepo.hook(b'preoutgoing', throw=True, source=b'clone') |
|
860 | hgdir = os.path.realpath(os.path.join(dest, b".hg")) | |
|
861 | if not os.path.exists(dest): | |
|
862 | util.makedirs(dest) | |
|
863 | try: | |
|
864 | destpath = hgdir | |
|
865 | util.makedir(destpath, notindexed=True) | |
|
866 | except OSError as inst: | |
|
867 | if inst.errno == errno.EEXIST: | |
|
868 | cleandir = None | |
|
869 | raise error.Abort( | |
|
870 | _(b"destination '%s' already exists") % dest | |
|
871 | ) | |
|
872 | raise | |
|
873 | 860 | |
|
861 | destrootpath = urlutil.urllocalpath(dest) | |
|
862 | dest_reqs = localrepo.clone_requirements(ui, createopts, srcrepo) | |
|
863 | localrepo.createrepository( | |
|
864 | ui, | |
|
865 | destrootpath, | |
|
866 | requirements=dest_reqs, | |
|
867 | ) | |
|
868 | destrepo = localrepo.makelocalrepository(ui, destrootpath) | |
|
869 | ||
|
870 | destpath = destrepo.vfs.base | |
|
874 | 871 | destlock = copystore(ui, srcrepo, destpath) |
|
875 | 872 | # copy bookmarks over |
|
876 | 873 | srcbookmarks = srcrepo.vfs.join(b'bookmarks') |
General Comments 0
You need to be logged in to leave comments.
Login now