Show More
@@ -183,7 +183,6 b' def walkchangerevs(ui, repo, pats, opts)' | |||||
183 | fncache[rev] = matches |
|
183 | fncache[rev] = matches | |
184 | wanted[rev] = 1 |
|
184 | wanted[rev] = 1 | |
185 |
|
185 | |||
186 | def iterate(): |
|
|||
187 |
|
|
186 | class followfilter: | |
188 |
|
|
187 | def __init__(self, onlyfirst=False): | |
189 |
|
|
188 | self.startrev = -1 | |
@@ -220,12 +219,23 b' def walkchangerevs(ui, repo, pats, opts)' | |||||
220 |
|
219 | |||
221 |
|
|
220 | return False | |
222 |
|
221 | |||
|
222 | # it might be worthwhile to do this in the iterator if the rev range | |||
|
223 | # is descending and the prune args are all within that range | |||
|
224 | for rev in opts.get('prune'): | |||
|
225 | rev = repo.changelog.rev(repo.lookup(rev)) | |||
|
226 | ff = followfilter() | |||
|
227 | stop = min(revs[0], revs[-1]) | |||
|
228 | for x in range(rev, stop-1, -1): | |||
|
229 | if ff.match(x) and wanted.has_key(x): | |||
|
230 | del wanted[x] | |||
|
231 | ||||
|
232 | def iterate(): | |||
223 | if follow and not files: |
|
233 | if follow and not files: | |
224 | ff = followfilter(onlyfirst=opts.get('follow_first')) |
|
234 | ff = followfilter(onlyfirst=opts.get('follow_first')) | |
225 | def want(rev): |
|
235 | def want(rev): | |
226 |
if rev |
|
236 | if ff.match(rev) and rev in wanted: | |
|
237 | return True | |||
227 |
|
|
238 | return False | |
228 | return ff.match(rev) |
|
|||
229 | else: |
|
239 | else: | |
230 | def want(rev): |
|
240 | def want(rev): | |
231 | return rev in wanted |
|
241 | return rev in wanted | |
@@ -2966,6 +2976,7 b' table = {' | |||||
2966 | ('', 'style', '', _('display using template map file')), |
|
2976 | ('', 'style', '', _('display using template map file')), | |
2967 | ('m', 'only-merges', None, _('show only merges')), |
|
2977 | ('m', 'only-merges', None, _('show only merges')), | |
2968 | ('p', 'patch', None, _('show patch')), |
|
2978 | ('p', 'patch', None, _('show patch')), | |
|
2979 | ('P', 'prune', [], _('do not display revision or any of its ancestors')), | |||
2969 | ('', 'template', '', _('display with template')), |
|
2980 | ('', 'template', '', _('display with template')), | |
2970 | ('I', 'include', [], _('include names matching the given patterns')), |
|
2981 | ('I', 'include', [], _('include names matching the given patterns')), | |
2971 | ('X', 'exclude', [], _('exclude names matching the given patterns'))], |
|
2982 | ('X', 'exclude', [], _('exclude names matching the given patterns'))], |
@@ -63,3 +63,6 b" hg ci -Amb1.1 -d'1 0'" | |||||
63 |
|
63 | |||
64 | echo % log --follow-first |
|
64 | echo % log --follow-first | |
65 | hg log --follow-first |
|
65 | hg log --follow-first | |
|
66 | ||||
|
67 | echo % log -P 2 | |||
|
68 | hg log -P 2 |
@@ -149,3 +149,29 b' user: test' | |||||
149 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
149 | date: Thu Jan 01 00:00:01 1970 +0000 | |
150 | summary: base |
|
150 | summary: base | |
151 |
|
151 | |||
|
152 | % log -P 2 | |||
|
153 | changeset: 6:2404bbcab562 | |||
|
154 | tag: tip | |||
|
155 | user: test | |||
|
156 | date: Thu Jan 01 00:00:01 1970 +0000 | |||
|
157 | summary: b1.1 | |||
|
158 | ||||
|
159 | changeset: 5:302e9dd6890d | |||
|
160 | parent: 3:e62f78d544b4 | |||
|
161 | parent: 4:ddb82e70d1a1 | |||
|
162 | user: test | |||
|
163 | date: Thu Jan 01 00:00:01 1970 +0000 | |||
|
164 | summary: m12 | |||
|
165 | ||||
|
166 | changeset: 4:ddb82e70d1a1 | |||
|
167 | parent: 0:67e992f2c4f3 | |||
|
168 | user: test | |||
|
169 | date: Thu Jan 01 00:00:01 1970 +0000 | |||
|
170 | summary: b2 | |||
|
171 | ||||
|
172 | changeset: 3:e62f78d544b4 | |||
|
173 | parent: 1:3d5bf5654eda | |||
|
174 | user: test | |||
|
175 | date: Thu Jan 01 00:00:01 1970 +0000 | |||
|
176 | summary: b1 | |||
|
177 |
General Comments 0
You need to be logged in to leave comments.
Login now