[PATCH 1 of 2] share: fix typo to drop 'shared' requirement on unshare
Yuya Nishihara
yuya at tcha.org
Thu Mar 2 15:35:46 UTC 2017
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1488467478 -32400
# Fri Mar 03 00:11:18 2017 +0900
# Node ID 8cdc39b46f210a702051b3a6d6f03e2112b41aba
# Parent 23080c03a604737b7d32cb789b7526bbec125e08
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.
diff --git a/hgext/share.py b/hgext/share.py
--- a/hgext/share.py
+++ b/hgext/share.py
@@ -116,7 +116,7 @@ def unshare(ui, repo):
sharefile = repo.join('sharedpath')
util.rename(sharefile, sharefile + '.old')
- repo.requirements.discard('sharedpath')
+ repo.requirements.discard('shared')
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
@@ -114,6 +114,8 @@ test unshare command
$ test -d .hg/store
$ test -f .hg/sharedpath
[1]
+ $ grep shared .hg/requires
+ [1]
$ hg unshare
abort: this is not a shared repo
[255]
More information about the Mercurial-devel
mailing list