diff -r 8724de878268 -r 143efea71c2a mercurial/hg.py --- a/mercurial/hg.py Fri Aug 17 23:28:37 2018 -0400 +++ b/mercurial/hg.py Sat Aug 18 00:51:26 2018 -0400 @@ -634,7 +634,7 @@ srcrepo.hook('preoutgoing', throw=True, source='clone') hgdir = os.path.realpath(os.path.join(dest, ".hg")) if not os.path.exists(dest): - os.mkdir(dest) + util.makedirs(dest) else: # only clean up directories we create ourselves cleandir = hgdir