Show More
@@ -354,7 +354,7 b' def identify(ui, repo):' | |||
|
354 | 354 | |
|
355 | 355 | ui.write("%s\n" % ' '.join(output)) |
|
356 | 356 | |
|
357 | def init(ui, source=None): | |
|
357 | def init(ui, source=None, **opts): | |
|
358 | 358 | """create a new repository or copy an existing one""" |
|
359 | 359 | |
|
360 | 360 | if source: |
@@ -388,6 +388,9 b' def init(ui, source=None):' | |||
|
388 | 388 | f = repo.opener("hgrc", "w") |
|
389 | 389 | f.write("[paths]\n") |
|
390 | 390 | f.write("default = %s\n" % source) |
|
391 | ||
|
392 | if opts['update']: | |
|
393 | update(ui, repo) | |
|
391 | 394 | else: |
|
392 | 395 | repo = hg.repository(ui, ".", create=1) |
|
393 | 396 | |
@@ -630,7 +633,8 b' table = {' | |||
|
630 | 633 | "history": (history, [], 'hg history'), |
|
631 | 634 | "help": (help, [], 'hg help [command]'), |
|
632 | 635 | "identify|id": (identify, [], 'hg identify'), |
|
633 | "init": (init, [], 'hg init [url]'), | |
|
636 | "init": (init, [('u', 'update', None, 'update after init')], | |
|
637 | 'hg init [options] [url]'), | |
|
634 | 638 | "log": (log, [], 'hg log <file>'), |
|
635 | 639 | "manifest|dumpmanifest": (manifest, [], 'hg manifest [rev]'), |
|
636 | 640 | "parents": (parents, [], 'hg parents [node]'), |
General Comments 0
You need to be logged in to leave comments.
Login now