##// END OF EJS Templates
[PATCH] simplify init...
mpm@selenic.com -
r496:6ce95a04 default
parent child Browse files
Show More
@@ -149,22 +149,8 b' import [-p <n> -b <base> -q] <patches>::'
149
149
150 aliases: patch
150 aliases: patch
151
151
152 init [-u] [source]::
152 init::
153 Initialize a repository in the current directory.
153 Initialize a new repository in the current directory.
154
155 NOTE: The following use is deprecated, and will be removed soon;
156 use the "hg clone" command instead.
157
158 If a source is specified, pull that source into the repository.
159 This source is added to .hg/hgrc as the default for future pulls
160 in this repository.
161
162 If the specified source is on the same filesystem, the repository
163 will be copied via hardlinks. This is the fastest and most
164 space-efficient mode of operation.
165
166 options:
167 -u, --update update the working directory to match the tip
168
154
169 log <file>::
155 log <file>::
170 Print the revision history of the specified file.
156 Print the revision history of the specified file.
@@ -493,15 +493,13 b' def import_(ui, repo, patch1, *patches, '
493 addremove(ui, repo, *files)
493 addremove(ui, repo, *files)
494 repo.commit(files, text)
494 repo.commit(files, text)
495
495
496 def init(ui, source=None, **opts):
496 def init(ui, source=None):
497 """create a new repository or (deprecated, use clone) copy an existing one"""
497 """create a new repository in the current directory"""
498
498
499 if source:
499 if source:
500 ui.warn("this use of init is deprecated: use \"hg clone\" instead\n")
500 ui.warn("no longer supported: use \"hg clone\" instead\n")
501 opts['no-update'] = not opts['update']
501 sys.exit(1)
502 clone(ui, source, None, **opts)
502 repo = hg.repository(ui, ".", create=1)
503 else:
504 repo = hg.repository(ui, ".", create=1)
505
503
506 def log(ui, repo, f):
504 def log(ui, repo, f):
507 """show the revision history of a single file"""
505 """show the revision history of a single file"""
@@ -753,8 +751,7 b' table = {'
753 [('p', 'strip', 1, 'path strip'),
751 [('p', 'strip', 1, 'path strip'),
754 ('b', 'base', "", 'base path')],
752 ('b', 'base', "", 'base path')],
755 "hg import [options] <patches>"),
753 "hg import [options] <patches>"),
756 "init": (init, [('u', 'update', None, 'update after init')],
754 "init": (init, [], 'hg init'),
757 'hg init [options] [url]'),
758 "log": (log, [], 'hg log <file>'),
755 "log": (log, [], 'hg log <file>'),
759 "manifest": (manifest, [], 'hg manifest [rev]'),
756 "manifest": (manifest, [], 'hg manifest [rev]'),
760 "parents": (parents, [], 'hg parents [node]'),
757 "parents": (parents, [], 'hg parents [node]'),
@@ -16,7 +16,7 b' hg commands:'
16 history show the changelog history
16 history show the changelog history
17 identify print information about the working copy
17 identify print information about the working copy
18 import import an ordered set of patches
18 import import an ordered set of patches
19 init create a new repository or (deprecated, use clone) copy an existing one
19 init create a new repository in the current directory
20 log show the revision history of a single file
20 log show the revision history of a single file
21 manifest output the latest or given revision of the project manifest
21 manifest output the latest or given revision of the project manifest
22 parents show the parents of the current working dir
22 parents show the parents of the current working dir
@@ -68,7 +68,7 b' hg commands:'
68 history show the changelog history
68 history show the changelog history
69 identify print information about the working copy
69 identify print information about the working copy
70 import import an ordered set of patches
70 import import an ordered set of patches
71 init create a new repository or (deprecated, use clone) copy an existing one
71 init create a new repository in the current directory
72 log show the revision history of a single file
72 log show the revision history of a single file
73 manifest output the latest or given revision of the project manifest
73 manifest output the latest or given revision of the project manifest
74 parents show the parents of the current working dir
74 parents show the parents of the current working dir
General Comments 0
You need to be logged in to leave comments. Login now