Show More
@@ -654,11 +654,14 b' def clone(ui, source, dest=None, **opts)' | |||
|
654 | 654 | repo = hg.repository(ui, dest) |
|
655 | 655 | |
|
656 | 656 | else: |
|
657 | repo = hg.repository(ui, dest, create=1) | |
|
658 | 657 | rev = None |
|
659 | 658 | if opts['rev']: |
|
660 |
|
|
|
661 | repo.pull(other, heads = rev) | |
|
659 | if not other.local(): | |
|
660 | raise util.Abort("clone -r not supported yet for remote repositories.") | |
|
661 | else: | |
|
662 | revs = [other.lookup(rev) for rev in opts['rev']] | |
|
663 | repo = hg.repository(ui, dest, create=1) | |
|
664 | repo.pull(other, heads = revs) | |
|
662 | 665 | |
|
663 | 666 | f = repo.opener("hgrc", "w", text=True) |
|
664 | 667 | f.write("[paths]\n") |
@@ -1356,7 +1359,12 b' def pull(ui, repo, source="default", **o' | |||
|
1356 | 1359 | ui.setconfig("ui", "remotecmd", opts['remotecmd']) |
|
1357 | 1360 | |
|
1358 | 1361 | other = hg.repository(ui, source) |
|
1359 | r = repo.pull(other) | |
|
1362 | revs = None | |
|
1363 | if opts['rev'] and not other.local(): | |
|
1364 | raise util.Abort("pull -r doesn't work for remote repositories yet") | |
|
1365 | elif opts['rev']: | |
|
1366 | revs = [other.lookup(rev) for rev in opts['rev']] | |
|
1367 | r = repo.pull(other, heads=revs) | |
|
1360 | 1368 | if not r: |
|
1361 | 1369 | if opts['update']: |
|
1362 | 1370 | return update(ui, repo) |
@@ -1785,7 +1793,7 b' table = {' | |||
|
1785 | 1793 | (clone, |
|
1786 | 1794 | [('U', 'noupdate', None, 'skip update after cloning'), |
|
1787 | 1795 | ('e', 'ssh', "", 'ssh command'), |
|
1788 |
('r', 'rev', |
|
|
1796 | ('r', 'rev', [], 'a changeset you would like to have after cloning'), | |
|
1789 | 1797 | ('', 'pull', None, 'use pull protocol to copy metadata'), |
|
1790 | 1798 | ('', 'remotecmd', "", 'remote hg command')], |
|
1791 | 1799 | 'hg clone [OPTION]... SOURCE [DEST]'), |
@@ -1892,8 +1900,9 b' table = {' | |||
|
1892 | 1900 | (pull, |
|
1893 | 1901 | [('u', 'update', None, 'update working directory'), |
|
1894 | 1902 | ('e', 'ssh', "", 'ssh command'), |
|
1895 |
('', 'remotecmd', "", 'remote hg command') |
|
|
1896 | 'hg pull [-u] [-e FILE] [--remotecmd FILE] [SOURCE]'), | |
|
1903 | ('', 'remotecmd', "", 'remote hg command'), | |
|
1904 | ('r', 'rev', [], 'a specific revision you would like to pull')], | |
|
1905 | 'hg pull [-u] [-e FILE] [--remotecmd FILE] [-r rev]... [SOURCE]'), | |
|
1897 | 1906 | "^push": |
|
1898 | 1907 | (push, |
|
1899 | 1908 | [('f', 'force', None, 'force push'), |
General Comments 0
You need to be logged in to leave comments.
Login now