share: allow more than one level of directories to be created
authorMatt Harbison <matt_harbison@yahoo.com>
Sat, 18 Aug 2018 01:07:43 -0400
changeset 39186 e8deaa77c1b6
parent 39185 143efea71c2a
child 39187 2f89a7defe62
share: allow more than one level of directories to be created
mercurial/hg.py
tests/test-share.t
--- a/mercurial/hg.py	Sat Aug 18 00:51:26 2018 -0400
+++ b/mercurial/hg.py	Sat Aug 18 01:07:43 2018 -0400
@@ -266,7 +266,7 @@
         raise error.Abort(_('destination already exists'))
 
     if not destwvfs.isdir():
-        destwvfs.mkdir()
+        destwvfs.makedirs()
     destvfs.makedir()
 
     requirements = ''
--- a/tests/test-share.t	Sat Aug 18 00:51:26 2018 -0400
+++ b/tests/test-share.t	Sat Aug 18 01:07:43 2018 -0400
@@ -298,15 +298,15 @@
 
 test behavior when sharing a shared repo
 
-  $ hg share -B repo3 repo5
+  $ hg share -B repo3 missingdir/repo5
   updating working directory
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd repo5
+  $ cd missingdir/repo5
   $ hg book
      bm1                       3:b87954705719
      bm3                       4:62f4ded848e4
      bm4                       5:92793bfc8cad
-  $ cd ..
+  $ cd ../..
 
 test what happens when an active bookmark is deleted