##// END OF EJS Templates
localrepo: validate directories before creating any...
Gregory Szorc -
r39883:b504ff81 default
parent child Browse files
Show More
@@ -2798,13 +2798,14 b' def createrepository(ui, path, createopt'
2798 2798 requirements = newreporequirements(ui, createopts=createopts)
2799 2799
2800 2800 wdirvfs = vfsmod.vfs(path, expandpath=True, realpath=True)
2801 if not wdirvfs.exists():
2802 wdirvfs.makedirs()
2803 2801
2804 2802 hgvfs = vfsmod.vfs(wdirvfs.join(b'.hg'))
2805 2803 if hgvfs.exists():
2806 2804 raise error.RepoError(_('repository %s already exists') % path)
2807 2805
2806 if not wdirvfs.exists():
2807 wdirvfs.makedirs()
2808
2808 2809 hgvfs.makedir(notindexed=True)
2809 2810
2810 2811 if b'store' in requirements:
General Comments 0
You need to be logged in to leave comments. Login now