diff --git a/doc/hg.1.txt b/doc/hg.1.txt --- a/doc/hg.1.txt +++ b/doc/hg.1.txt @@ -149,22 +149,8 @@ import [-p -b -q] :: aliases: patch -init [-u] [source]:: - Initialize a repository in the current directory. - - NOTE: The following use is deprecated, and will be removed soon; - use the "hg clone" command instead. - - If a source is specified, pull that source into the repository. - This source is added to .hg/hgrc as the default for future pulls - in this repository. - - If the specified source is on the same filesystem, the repository - will be copied via hardlinks. This is the fastest and most - space-efficient mode of operation. - - options: - -u, --update update the working directory to match the tip +init:: + Initialize a new repository in the current directory. log :: Print the revision history of the specified file. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -493,15 +493,13 @@ def import_(ui, repo, patch1, *patches, addremove(ui, repo, *files) repo.commit(files, text) -def init(ui, source=None, **opts): - """create a new repository or (deprecated, use clone) copy an existing one""" +def init(ui, source=None): + """create a new repository in the current directory""" if source: - ui.warn("this use of init is deprecated: use \"hg clone\" instead\n") - opts['no-update'] = not opts['update'] - clone(ui, source, None, **opts) - else: - repo = hg.repository(ui, ".", create=1) + ui.warn("no longer supported: use \"hg clone\" instead\n") + sys.exit(1) + repo = hg.repository(ui, ".", create=1) def log(ui, repo, f): """show the revision history of a single file""" @@ -753,8 +751,7 @@ table = { [('p', 'strip', 1, 'path strip'), ('b', 'base', "", 'base path')], "hg import [options] "), - "init": (init, [('u', 'update', None, 'update after init')], - 'hg init [options] [url]'), + "init": (init, [], 'hg init'), "log": (log, [], 'hg log '), "manifest": (manifest, [], 'hg manifest [rev]'), "parents": (parents, [], 'hg parents [node]'), diff --git a/tests/test-help.out b/tests/test-help.out --- a/tests/test-help.out +++ b/tests/test-help.out @@ -16,7 +16,7 @@ hg commands: history show the changelog history identify print information about the working copy import import an ordered set of patches - init create a new repository or (deprecated, use clone) copy an existing one + init create a new repository in the current directory log show the revision history of a single file manifest output the latest or given revision of the project manifest parents show the parents of the current working dir @@ -68,7 +68,7 @@ hg commands: history show the changelog history identify print information about the working copy import import an ordered set of patches - init create a new repository or (deprecated, use clone) copy an existing one + init create a new repository in the current directory log show the revision history of a single file manifest output the latest or given revision of the project manifest parents show the parents of the current working dir