[PATCH 20 of 35] share: define norepo in command decorator

Gregory Szorc gregory.szorc at gmail.com
Mon May 5 00:51:25 CDT 2014


# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1399266191 25200
#      Sun May 04 22:03:11 2014 -0700
# Branch stable
# Node ID 2c0f9ae73936b5c894cb03e1a4469292cacf2fbb
# Parent  06022ecb8a3946de0a94eddee9d0e32115d1fd6e
share: define norepo in command decorator

diff --git a/hgext/share.py b/hgext/share.py
--- a/hgext/share.py
+++ b/hgext/share.py
@@ -9,17 +9,18 @@ from mercurial.i18n import _
 from mercurial import cmdutil, hg, commands, util
 
 cmdtable = {}
 command = cmdutil.command(cmdtable)
 testedwith = 'internal'
 
 @command('share',
     [('U', 'noupdate', None, _('do not create a working copy'))],
-    _('[-U] SOURCE [DEST]'))
+    _('[-U] SOURCE [DEST]'),
+    norepo=True)
 def share(ui, source, dest=None, noupdate=False):
     """create a new shared repository
 
     Initialize a new repository and working directory that shares its
     history with another repository.
 
     .. note::
 
@@ -61,10 +62,8 @@ def unshare(ui, repo):
         repo.requirements.discard('sharedpath')
         repo._writerequirements()
     finally:
         destlock and destlock.release()
         lock and lock.release()
 
     # update store, spath, sopener and sjoin of repo
     repo.unfiltered().__init__(repo.baseui, repo.root)
-
-commands.norepo += " share"


More information about the Mercurial-devel mailing list