Show More
@@ -1561,6 +1561,7 b' def incoming(ui, repo, source="default",' | |||||
1561 |
|
1561 | |||
1562 | See pull for valid source format details. |
|
1562 | See pull for valid source format details. | |
1563 | """ |
|
1563 | """ | |
|
1564 | limit = cmdutil.loglimit(opts) | |||
1564 | source, revs, checkout = hg.parseurl(ui.expandpath(source), opts['rev']) |
|
1565 | source, revs, checkout = hg.parseurl(ui.expandpath(source), opts['rev']) | |
1565 | cmdutil.setremoteconfig(ui, opts) |
|
1566 | cmdutil.setremoteconfig(ui, opts) | |
1566 |
|
1567 | |||
@@ -1599,10 +1600,14 b' def incoming(ui, repo, source="default",' | |||||
1599 | if opts['newest_first']: |
|
1600 | if opts['newest_first']: | |
1600 | o.reverse() |
|
1601 | o.reverse() | |
1601 | displayer = cmdutil.show_changeset(ui, other, opts) |
|
1602 | displayer = cmdutil.show_changeset(ui, other, opts) | |
|
1603 | count = 0 | |||
1602 | for n in o: |
|
1604 | for n in o: | |
|
1605 | if count >= limit: | |||
|
1606 | break | |||
1603 | parents = [p for p in other.changelog.parents(n) if p != nullid] |
|
1607 | parents = [p for p in other.changelog.parents(n) if p != nullid] | |
1604 | if opts['no_merges'] and len(parents) == 2: |
|
1608 | if opts['no_merges'] and len(parents) == 2: | |
1605 | continue |
|
1609 | continue | |
|
1610 | count += 1 | |||
1606 | displayer.show(changenode=n) |
|
1611 | displayer.show(changenode=n) | |
1607 | finally: |
|
1612 | finally: | |
1608 | if hasattr(other, 'close'): |
|
1613 | if hasattr(other, 'close'): | |
@@ -1869,6 +1874,7 b' def outgoing(ui, repo, dest=None, **opts' | |||||
1869 |
|
1874 | |||
1870 | See pull for valid destination format details. |
|
1875 | See pull for valid destination format details. | |
1871 | """ |
|
1876 | """ | |
|
1877 | limit = cmdutil.loglimit(opts) | |||
1872 | dest, revs, checkout = hg.parseurl( |
|
1878 | dest, revs, checkout = hg.parseurl( | |
1873 | ui.expandpath(dest or 'default-push', dest or 'default'), opts['rev']) |
|
1879 | ui.expandpath(dest or 'default-push', dest or 'default'), opts['rev']) | |
1874 | cmdutil.setremoteconfig(ui, opts) |
|
1880 | cmdutil.setremoteconfig(ui, opts) | |
@@ -1885,10 +1891,14 b' def outgoing(ui, repo, dest=None, **opts' | |||||
1885 | if opts['newest_first']: |
|
1891 | if opts['newest_first']: | |
1886 | o.reverse() |
|
1892 | o.reverse() | |
1887 | displayer = cmdutil.show_changeset(ui, repo, opts) |
|
1893 | displayer = cmdutil.show_changeset(ui, repo, opts) | |
|
1894 | count = 0 | |||
1888 | for n in o: |
|
1895 | for n in o: | |
|
1896 | if count >= limit: | |||
|
1897 | break | |||
1889 | parents = [p for p in repo.changelog.parents(n) if p != nullid] |
|
1898 | parents = [p for p in repo.changelog.parents(n) if p != nullid] | |
1890 | if opts['no_merges'] and len(parents) == 2: |
|
1899 | if opts['no_merges'] and len(parents) == 2: | |
1891 | continue |
|
1900 | continue | |
|
1901 | count += 1 | |||
1892 | displayer.show(changenode=n) |
|
1902 | displayer.show(changenode=n) | |
1893 |
|
1903 | |||
1894 | def parents(ui, repo, file_=None, **opts): |
|
1904 | def parents(ui, repo, file_=None, **opts): | |
@@ -2975,6 +2985,7 b' table = {' | |||||
2975 | ('n', 'newest-first', None, _('show newest record first')), |
|
2985 | ('n', 'newest-first', None, _('show newest record first')), | |
2976 | ('', 'bundle', '', _('file to store the bundles into')), |
|
2986 | ('', 'bundle', '', _('file to store the bundles into')), | |
2977 | ('p', 'patch', None, _('show patch')), |
|
2987 | ('p', 'patch', None, _('show patch')), | |
|
2988 | ('l', 'limit', '', _('limit number of changes displayed')), | |||
2978 | ('r', 'rev', [], _('a specific revision up to which you would like to pull')), |
|
2989 | ('r', 'rev', [], _('a specific revision up to which you would like to pull')), | |
2979 | ('', 'template', '', _('display with template')), |
|
2990 | ('', 'template', '', _('display with template')), | |
2980 | ] + remoteopts, |
|
2991 | ] + remoteopts, | |
@@ -3032,6 +3043,7 b' table = {' | |||||
3032 | _('run even when remote repository is unrelated')), |
|
3043 | _('run even when remote repository is unrelated')), | |
3033 | ('p', 'patch', None, _('show patch')), |
|
3044 | ('p', 'patch', None, _('show patch')), | |
3034 | ('', 'style', '', _('display using template map file')), |
|
3045 | ('', 'style', '', _('display using template map file')), | |
|
3046 | ('l', 'limit', '', _('limit number of changes displayed')), | |||
3035 | ('r', 'rev', [], _('a specific revision you would like to push')), |
|
3047 | ('r', 'rev', [], _('a specific revision you would like to push')), | |
3036 | ('n', 'newest-first', None, _('show newest record first')), |
|
3048 | ('n', 'newest-first', None, _('show newest record first')), | |
3037 | ('', 'template', '', _('display with template')), |
|
3049 | ('', 'template', '', _('display with template')), |
@@ -19,6 +19,8 b' http_proxy= hg -R new incoming -r 4 http' | |||||
19 | # local incoming |
|
19 | # local incoming | |
20 | hg -R new incoming test |
|
20 | hg -R new incoming test | |
21 | hg -R new incoming -r 4 test |
|
21 | hg -R new incoming -r 4 test | |
|
22 | echo "% limit to 2 changesets" | |||
|
23 | hg -R new incoming -l 2 test | |||
22 |
|
24 | |||
23 | # test with --bundle |
|
25 | # test with --bundle | |
24 | http_proxy= hg -R new incoming --bundle test.hg http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,' |
|
26 | http_proxy= hg -R new incoming --bundle test.hg http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,' | |
@@ -44,5 +46,7 b' done' | |||||
44 | hg verify |
|
46 | hg verify | |
45 | cd .. |
|
47 | cd .. | |
46 | hg -R test-dev outgoing test |
|
48 | hg -R test-dev outgoing test | |
|
49 | echo "% limit to 3 changesets" | |||
|
50 | hg -R test-dev outgoing -l 3 test | |||
47 | http_proxy= hg -R test-dev outgoing http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,' |
|
51 | http_proxy= hg -R test-dev outgoing http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,' | |
48 | http_proxy= hg -R test-dev outgoing -r 11 http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,' |
|
52 | http_proxy= hg -R test-dev outgoing -r 11 http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,' |
@@ -151,6 +151,18 b' user: test' | |||||
151 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
151 | date: Mon Jan 12 13:46:40 1970 +0000 | |
152 | summary: 4 |
|
152 | summary: 4 | |
153 |
|
153 | |||
|
154 | % limit to 2 changesets | |||
|
155 | comparing with test | |||
|
156 | changeset: 0:9cb21d99fe27 | |||
|
157 | user: test | |||
|
158 | date: Mon Jan 12 13:46:40 1970 +0000 | |||
|
159 | summary: 0 | |||
|
160 | ||||
|
161 | changeset: 1:d717f5dfad6a | |||
|
162 | user: test | |||
|
163 | date: Mon Jan 12 13:46:40 1970 +0000 | |||
|
164 | summary: 1 | |||
|
165 | ||||
154 | comparing with http://localhost/ |
|
166 | comparing with http://localhost/ | |
155 | changeset: 0:9cb21d99fe27 |
|
167 | changeset: 0:9cb21d99fe27 | |
156 | user: test |
|
168 | user: test | |
@@ -301,6 +313,24 b' user: test' | |||||
301 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
313 | date: Mon Jan 12 13:46:40 1970 +0000 | |
302 | summary: 13 |
|
314 | summary: 13 | |
303 |
|
315 | |||
|
316 | % limit to 3 changesets | |||
|
317 | comparing with test | |||
|
318 | searching for changes | |||
|
319 | changeset: 9:3741c3ad1096 | |||
|
320 | user: test | |||
|
321 | date: Mon Jan 12 13:46:40 1970 +0000 | |||
|
322 | summary: 9 | |||
|
323 | ||||
|
324 | changeset: 10:de4143c8d9a5 | |||
|
325 | user: test | |||
|
326 | date: Mon Jan 12 13:46:40 1970 +0000 | |||
|
327 | summary: 10 | |||
|
328 | ||||
|
329 | changeset: 11:0e1c188b9a7a | |||
|
330 | user: test | |||
|
331 | date: Mon Jan 12 13:46:40 1970 +0000 | |||
|
332 | summary: 11 | |||
|
333 | ||||
304 | comparing with http://localhost/ |
|
334 | comparing with http://localhost/ | |
305 | searching for changes |
|
335 | searching for changes | |
306 | changeset: 9:3741c3ad1096 |
|
336 | changeset: 9:3741c3ad1096 |
General Comments 0
You need to be logged in to leave comments.
Login now