[PATCH 3 of 5 requirements-tidy] share: use repo.removerequirement()
Gregory Szorc
gregory.szorc at gmail.com
Thu Oct 1 14:29:57 CDT 2015
# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1443725160 25200
# Thu Oct 01 11:46:00 2015 -0700
# Node ID 699e72d262bcef563d434f9f45c8cd39d9bac083
# Parent 8d51cc6b20a930f3c6fe0a2b7135eca696e2b8fc
share: use repo.removerequirement()
We have a new API. Use it.
diff --git a/hgext/share.py b/hgext/share.py
--- a/hgext/share.py
+++ b/hgext/share.py
@@ -96,11 +96,9 @@ def unshare(ui, repo):
destlock = hg.copystore(ui, repo, repo.path)
sharefile = repo.join('sharedpath')
util.rename(sharefile, sharefile + '.old')
-
- repo.requirements.discard('sharedpath')
- repo._writerequirements()
+ repo.removerequirement('sharedpath')
finally:
destlock and destlock.release()
lock and lock.release()
More information about the Mercurial-devel
mailing list