[PATCH 3 of 7] share: allow more than one level of directories to be created
Matt Harbison
mharbison72 at gmail.com
Sat Aug 18 15:17:02 EDT 2018
# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1534568863 14400
# Sat Aug 18 01:07:43 2018 -0400
# Node ID 037f5c3894abad5e702cbfb182e8301565b5a173
# Parent 01dd6d301bf9e43bad389d777413ed06b2a36f49
share: allow more than one level of directories to be created
diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -266,7 +266,7 @@ def share(ui, source, dest=None, update=
raise error.Abort(_('destination already exists'))
if not destwvfs.isdir():
- destwvfs.mkdir()
+ util.makedirs(destwvfs.base)
destvfs.makedir()
requirements = ''
diff --git a/tests/test-share.t b/tests/test-share.t
--- a/tests/test-share.t
+++ b/tests/test-share.t
@@ -298,15 +298,15 @@ test pushing bookmarks works
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
More information about the Mercurial-devel
mailing list