From patchwork Mon May 5 05:51:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [19,of,35] mq: define norepo in command decorator From: Gregory Szorc X-Patchwork-Id: 4610 Message-Id: <06022ecb8a3946de0a94.1399269084@vm-ubuntu-main.gateway.sonic.net> To: mercurial-devel@selenic.com Date: Sun, 04 May 2014 22:51:24 -0700 # HG changeset patch # User Gregory Szorc # Date 1399266254 25200 # Sun May 04 22:04:14 2014 -0700 # Branch stable # Node ID 06022ecb8a3946de0a94eddee9d0e32115d1fd6e # Parent aecdc36b9f715454721fe015b9cfd96d573bca79 mq: define norepo in command decorator diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -67,18 +67,16 @@ from mercurial.node import bin, hex, sho from mercurial.lock import release from mercurial import commands, cmdutil, hg, scmutil, util, revset from mercurial import extensions, error, phases from mercurial import patch as patchmod from mercurial import localrepo from mercurial import subrepo import os, re, errno, shutil -commands.norepo += " qclone" - seriesopts = [('s', 'summary', None, _('print first line of patch header'))] cmdtable = {} command = cmdutil.command(cmdtable) testedwith = 'internal' # force load strip extension formerly included in mq and import some utility try: @@ -2223,17 +2221,18 @@ def init(ui, repo, **opts): [('', 'pull', None, _('use pull protocol to copy metadata')), ('U', 'noupdate', None, _('do not update the new working directories')), ('', 'uncompressed', None, _('use uncompressed transfer (fast over LAN)')), ('p', 'patches', '', _('location of source patch repository'), _('REPO')), ] + commands.remoteopts, - _('hg qclone [OPTION]... SOURCE [DEST]')) + _('hg qclone [OPTION]... SOURCE [DEST]'), + norepo=True) def clone(ui, source, dest=None, **opts): '''clone main and patch repository at same time If source is local, destination will have no patches applied. If source is remote, this command can not check if patches are applied in source, so cannot guarantee that patches are not applied in destination. If you clone remote repository, be sure before that it has no patches applied.