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

login
register
mail settings
Submitter Gregory Szorc
Date May 5, 2014, 5:51 a.m.
Message ID <2c0f9ae73936b5c894cb.1399269085@vm-ubuntu-main.gateway.sonic.net>
Download mbox | patch
Permalink /patch/4611/
State Accepted
Commit 5a4d1a6c605fc6f1790fcb901cfb303b85cd82eb
Headers show

Comments

Gregory Szorc - May 5, 2014, 5:51 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@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

Patch

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"