# HG changeset patch # User Yuya Nishihara # Date 2017-03-02 15:11:51 # Node ID 344121b30f32cf6422af139b6bc4509c1d1d4ad5 # Parent ecbd378d9a7e087de00c6df3532171317aa2a788 share: drop 'relshared' requirement as well diff --git a/hgext/share.py b/hgext/share.py --- a/hgext/share.py +++ b/hgext/share.py @@ -117,6 +117,7 @@ def unshare(ui, repo): util.rename(sharefile, sharefile + '.old') repo.requirements.discard('shared') + repo.requirements.discard('relshared') repo._writerequirements() finally: destlock and destlock.release() diff --git a/tests/test-share.t b/tests/test-share.t --- a/tests/test-share.t +++ b/tests/test-share.t @@ -393,6 +393,21 @@ renames and changes of PWD [255] $ hg -R thatdir/rel root $TESTTMP/thatdir/rel + +test unshare relshared repo + + $ cd thatdir/rel + $ hg unshare + $ test -d .hg/store + $ test -f .hg/sharedpath + [1] + $ grep shared .hg/requires + [1] + $ hg unshare + abort: this is not a shared repo + [255] + $ cd ../.. + $ rm -r thatdir Explicitly kill daemons to let the test exit on Windows