share: fix typo to drop 'shared' requirement on unshare
authorYuya Nishihara <yuya@tcha.org>
Fri, 03 Mar 2017 00:11:18 +0900
changeset 31221 ecbd378d9a7e
parent 31220 e1d035905b2e
child 31222 344121b30f32
share: fix typo to drop 'shared' requirement on unshare This must be a typo and it seems correct to drop the requirement since the repo is no longer a shared repository.
hgext/share.py
tests/test-share.t
--- a/hgext/share.py	Fri Mar 03 02:57:06 2017 +0900
+++ b/hgext/share.py	Fri Mar 03 00:11:18 2017 +0900
@@ -116,7 +116,7 @@
         sharefile = repo.join('sharedpath')
         util.rename(sharefile, sharefile + '.old')
 
-        repo.requirements.discard('sharedpath')
+        repo.requirements.discard('shared')
         repo._writerequirements()
     finally:
         destlock and destlock.release()
--- a/tests/test-share.t	Fri Mar 03 02:57:06 2017 +0900
+++ b/tests/test-share.t	Fri Mar 03 00:11:18 2017 +0900
@@ -114,6 +114,8 @@
   $ test -d .hg/store
   $ test -f .hg/sharedpath
   [1]
+  $ grep shared .hg/requires
+  [1]
   $ hg unshare
   abort: this is not a shared repo
   [255]