diff mercurial/commands.py @ 496:6ce95a04999d

[PATCH] simplify init -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [PATCH] simplify init From: Bryan O'Sullivan <bos@serpentine.com> Remove source directory option from "hg init". manifest hash: 2ace7b16c962fb434340b937fbcd494f3098a85f -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCwQG/ywK+sNU5EO8RArbCAJ9DG45GepMI0Z9KWXqV8gmEbV1WfwCgotih LGAkD8iTfOLn7HIPVqt9FWY= =65uW -----END PGP SIGNATURE-----
author mpm@selenic.com
date Mon, 27 Jun 2005 23:52:31 -0800
parents e94cebc60d96
children 81c563a254be
line wrap: on
line diff
--- a/mercurial/commands.py	Mon Jun 27 22:29:44 2005 -0800
+++ b/mercurial/commands.py	Mon Jun 27 23:52:31 2005 -0800
@@ -493,15 +493,13 @@
             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 @@
                      [('p', 'strip', 1, 'path strip'),
                       ('b', 'base', "", 'base path')],
                      "hg import [options] <patches>"),
-    "init": (init, [('u', 'update', None, 'update after init')],
-             'hg init [options] [url]'),
+    "init": (init, [], 'hg init'),
     "log": (log, [], 'hg log <file>'),
     "manifest": (manifest, [], 'hg manifest [rev]'),
     "parents": (parents, [], 'hg parents [node]'),