--- a/hgext/share.py Fri Mar 03 00:11:18 2017 +0900
+++ b/hgext/share.py Fri Mar 03 00:11:51 2017 +0900
@@ -117,6 +117,7 @@
util.rename(sharefile, sharefile + '.old')
repo.requirements.discard('shared')
+ repo.requirements.discard('relshared')
repo._writerequirements()
finally:
destlock and destlock.release()
--- a/tests/test-share.t Fri Mar 03 00:11:18 2017 +0900
+++ b/tests/test-share.t Fri Mar 03 00:11:51 2017 +0900
@@ -393,6 +393,21 @@
[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