Show More
@@ -250,7 +250,8 b' def graphlog(ui, repo, path=None, **opts' | |||||
250 | if path: # could be reset in canonpath |
|
250 | if path: # could be reset in canonpath | |
251 | revdag = graphmod.filerevs(repo, path, start, stop, limit) |
|
251 | revdag = graphmod.filerevs(repo, path, start, stop, limit) | |
252 | else: |
|
252 | else: | |
253 | stop = max(stop, start - limit + 1) |
|
253 | if limit is not None: | |
|
254 | stop = max(stop, start - limit + 1) | |||
254 | revdag = graphmod.revisions(repo, start, stop) |
|
255 | revdag = graphmod.revisions(repo, start, stop) | |
255 |
|
256 | |||
256 | displayer = show_changeset(ui, repo, opts, buffered=True) |
|
257 | displayer = show_changeset(ui, repo, opts, buffered=True) | |
@@ -260,7 +261,7 b' def graphlog(ui, repo, path=None, **opts' | |||||
260 | def graphrevs(repo, nodes, opts): |
|
261 | def graphrevs(repo, nodes, opts): | |
261 | limit = cmdutil.loglimit(opts) |
|
262 | limit = cmdutil.loglimit(opts) | |
262 | nodes.reverse() |
|
263 | nodes.reverse() | |
263 |
if limit |
|
264 | if limit is not None: | |
264 | nodes = nodes[:limit] |
|
265 | nodes = nodes[:limit] | |
265 | return graphmod.nodes(repo, nodes) |
|
266 | return graphmod.nodes(repo, nodes) | |
266 |
|
267 |
@@ -95,7 +95,7 b' def loglimit(opts):' | |||||
95 | raise util.Abort(_('limit must be a positive integer')) |
|
95 | raise util.Abort(_('limit must be a positive integer')) | |
96 | if limit <= 0: raise util.Abort(_('limit must be positive')) |
|
96 | if limit <= 0: raise util.Abort(_('limit must be positive')) | |
97 | else: |
|
97 | else: | |
98 |
limit = |
|
98 | limit = None | |
99 | return limit |
|
99 | return limit | |
100 |
|
100 | |||
101 | def remoteui(src, opts): |
|
101 | def remoteui(src, opts): |
@@ -1924,7 +1924,7 b' def incoming(ui, repo, source="default",' | |||||
1924 | displayer = cmdutil.show_changeset(ui, other, opts) |
|
1924 | displayer = cmdutil.show_changeset(ui, other, opts) | |
1925 | count = 0 |
|
1925 | count = 0 | |
1926 | for n in o: |
|
1926 | for n in o: | |
1927 | if count >= limit: |
|
1927 | if limit is not None and count >= limit: | |
1928 | break |
|
1928 | break | |
1929 | parents = [p for p in other.changelog.parents(n) if p != nullid] |
|
1929 | parents = [p for p in other.changelog.parents(n) if p != nullid] | |
1930 | if opts.get('no_merges') and len(parents) == 2: |
|
1930 | if opts.get('no_merges') and len(parents) == 2: | |
@@ -2179,7 +2179,7 b' def outgoing(ui, repo, dest=None, **opts' | |||||
2179 | displayer = cmdutil.show_changeset(ui, repo, opts) |
|
2179 | displayer = cmdutil.show_changeset(ui, repo, opts) | |
2180 | count = 0 |
|
2180 | count = 0 | |
2181 | for n in o: |
|
2181 | for n in o: | |
2182 | if count >= limit: |
|
2182 | if limit is not None and count >= limit: | |
2183 | break |
|
2183 | break | |
2184 | parents = [p for p in repo.changelog.parents(n) if p != nullid] |
|
2184 | parents = [p for p in repo.changelog.parents(n) if p != nullid] | |
2185 | if opts.get('no_merges') and len(parents) == 2: |
|
2185 | if opts.get('no_merges') and len(parents) == 2: |
@@ -17,7 +17,6 b' context of the graph returned. Type is a' | |||||
17 | Data depends on type. |
|
17 | Data depends on type. | |
18 | """ |
|
18 | """ | |
19 |
|
19 | |||
20 | import sys |
|
|||
21 | from mercurial.node import nullrev |
|
20 | from mercurial.node import nullrev | |
22 |
|
21 | |||
23 | CHANGESET = 'C' |
|
22 | CHANGESET = 'C' | |
@@ -37,7 +36,7 b' def revisions(repo, start, stop):' | |||||
37 | yield (cur, CHANGESET, ctx, sorted(parents)) |
|
36 | yield (cur, CHANGESET, ctx, sorted(parents)) | |
38 | cur -= 1 |
|
37 | cur -= 1 | |
39 |
|
38 | |||
40 |
def filerevs(repo, path, start, stop, limit= |
|
39 | def filerevs(repo, path, start, stop, limit=None): | |
41 | """file cset DAG generator yielding (id, CHANGESET, ctx, [parentids]) tuples |
|
40 | """file cset DAG generator yielding (id, CHANGESET, ctx, [parentids]) tuples | |
42 |
|
41 | |||
43 | This generator function walks through the revision history of a single |
|
42 | This generator function walks through the revision history of a single |
General Comments 0
You need to be logged in to leave comments.
Login now