comparison mercurial/commands.py @ 1281:84df9951532a

Add --pull option to clone.
author Bryan O'Sullivan <bos@serpentine.com>
date Tue, 20 Sep 2005 11:20:48 -0700
parents b0633406c07a
children 1546c2aa6b30
comparison
equal deleted inserted replaced
1279:8ab1c07d4e0b 1281:84df9951532a
627 source = ui.expandpath(source) 627 source = ui.expandpath(source)
628 abspath = source 628 abspath = source
629 other = hg.repository(ui, source) 629 other = hg.repository(ui, source)
630 630
631 copy = False 631 copy = False
632 if other.dev() != -1: 632 if not opts['pull'] and other.dev() != -1:
633 abspath = os.path.abspath(source) 633 abspath = os.path.abspath(source)
634 copy = True 634 copy = True
635 635
636 if copy: 636 if copy:
637 try: 637 try:
1780 'hg cat [OPTION]... FILE...'), 1780 'hg cat [OPTION]... FILE...'),
1781 "^clone": 1781 "^clone":
1782 (clone, 1782 (clone,
1783 [('U', 'noupdate', None, 'skip update after cloning'), 1783 [('U', 'noupdate', None, 'skip update after cloning'),
1784 ('e', 'ssh', "", 'ssh command'), 1784 ('e', 'ssh', "", 'ssh command'),
1785 ('', 'pull', None, 'use pull protocol to copy metadata'),
1785 ('', 'remotecmd', "", 'remote hg command')], 1786 ('', 'remotecmd', "", 'remote hg command')],
1786 'hg clone [OPTION]... SOURCE [DEST]'), 1787 'hg clone [OPTION]... SOURCE [DEST]'),
1787 "^commit|ci": 1788 "^commit|ci":
1788 (commit, 1789 (commit,
1789 [('A', 'addremove', None, 'run add/remove during commit'), 1790 [('A', 'addremove', None, 'run add/remove during commit'),