[Updated] D8772: localrepo: abort creating a shared repo if the source does not have store
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Sun Aug 2 19:56:45 UTC 2020
Closed by commit rHGdc283bc7e033: localrepo: abort creating a shared repo if the source does not have store (authored by pulkit).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8772?vs=22170&id=22222
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8772/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8772
AFFECTED FILES
mercurial/localrepo.py
tests/test-share.t
CHANGE DETAILS
diff --git a/tests/test-share.t b/tests/test-share.t
--- a/tests/test-share.t
+++ b/tests/test-share.t
@@ -252,3 +252,9 @@
$ killdaemons.py
+Test sharing a repository which was created with store requirement disable
+
+ $ hg init nostore --config format.usestore=false
+ $ hg share nostore sharednostore
+ abort: cannot create shared repository as source was created with 'format.usestore' config disabled
+ [255]
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -3334,6 +3334,14 @@
)
dropped.add(bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT)
+ if b'shared' in requirements or b'relshared' in requirements:
+ raise error.Abort(
+ _(
+ b"cannot create shared repository as source was created"
+ b" with 'format.usestore' config disabled"
+ )
+ )
+
return dropped
To: pulkit, #hg-reviewers, indygreg
Cc: martinvonz, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200802/f9580de8/attachment-0002.html>
More information about the Mercurial-patches
mailing list