211 # finding prune markers |
211 # finding prune markers |
212 for marker in successors.get(ctx.node(), ()): |
212 for marker in successors.get(ctx.node(), ()): |
213 if not marker[1]: |
213 if not marker[1]: |
214 yield ((), (marker,)) |
214 yield ((), (marker,)) |
215 |
215 |
|
216 def _fatemarkers(repo, ctx, filternonlocal): |
|
217 successors = repo.obsstore.successors |
|
218 if filternonlocal: |
|
219 r = obsutil.successorsandmarkers(repo, ctx) |
|
220 if r is None: |
|
221 r = [] |
|
222 for succset in sorted(r): |
|
223 if succset[b'markers']: |
|
224 yield (succset[b'successors'], succset[b'markers']) |
|
225 else: |
|
226 markers = successors.get(ctx.node(), ()) |
|
227 for marker in sorted(markers): |
|
228 yield (marker[1], [marker]) |
|
229 |
216 def _nodesandmarkers(repo, ctx, filternonlocal, origin): |
230 def _nodesandmarkers(repo, ctx, filternonlocal, origin): |
217 """ Return data for obslog and obsolescence-related template keywords. |
231 """ Return data for obslog and obsolescence-related template keywords. |
218 |
232 |
219 If `filternonlocal` is True, skip filtered nodes (but still gather |
233 If `filternonlocal` is True, skip filtered nodes (but still gather |
220 obsolescence markers), otherwise the result will contain nodes unknown |
234 obsolescence markers), otherwise the result will contain nodes unknown |
225 """ |
239 """ |
226 if origin: |
240 if origin: |
227 for (nodes, markers) in _originmarkers(repo, ctx, filternonlocal): |
241 for (nodes, markers) in _originmarkers(repo, ctx, filternonlocal): |
228 yield (nodes, markers) |
242 yield (nodes, markers) |
229 else: |
243 else: |
230 if filternonlocal: |
244 for (nodes, markers) in _fatemarkers(repo, ctx, filternonlocal): |
231 r = obsutil.successorsandmarkers(repo, ctx) |
245 yield (nodes, markers) |
232 if r is None: |
|
233 r = [] |
|
234 for succset in sorted(r): |
|
235 if succset[b'markers']: |
|
236 yield (succset[b'successors'], succset[b'markers']) |
|
237 else: |
|
238 markers = repo.obsstore.successors.get(ctx.node(), ()) |
|
239 for marker in sorted(markers): |
|
240 yield (marker[1], [marker]) |
|
241 |
246 |
242 class obsmarker_printer(logcmdutil.changesetprinter): |
247 class obsmarker_printer(logcmdutil.changesetprinter): |
243 """show (available) information about a node |
248 """show (available) information about a node |
244 |
249 |
245 We display the node, description (if available) and various information |
250 We display the node, description (if available) and various information |