Skip to content

Conversation

yuja
Copy link
Contributor

@yuja yuja commented Jun 15, 2025

#6754 (recreated)

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added/updated tests to cover my changes

@yuja yuja requested a review from a team as a code owner June 15, 2025 00:21
@yuja yuja force-pushed the push-ypppmvzurwnz branch 6 times, most recently from fa7708b to 52d0bc7 Compare June 22, 2025 01:39
@yuja yuja force-pushed the push-ypppmvzurwnz branch from 52d0bc7 to ba57ed9 Compare June 24, 2025 15:06
yuja added 5 commits June 26, 2025 19:30
…se_lazy()

This will be the initial step of operation range iterator. I think it can also
be a building block of various filtered operation iterators (such as operations
filtered by bookmark changes.)

topo_order_reverse_chunked() returns Result<[T], E> instead of [Result<T, E>]
because the former was easier to implement. I'm not sure which one would be
generally useful, but I think the caller would do some post processing, so
getting [T] might be handy.
At merge point, ancestor operations are visited in order of the parents list, so
I don't think head_ops should be sorted either. walk_ancestors([op]) should be
identical to [op] + walk_ancestors(op.parents()).
There are a couple of hand-rolled implementations of roots..heads query, and I'm
going to add one more. It's wasteful to test these one by one.

The added iterator will have to scan roots::heads range eagerly instead of
::roots. I think this is good for typical use cases where roots are closer to
heads than the root().
This should produce better results at squash/split operations. Since "op diff"
targets can be flipped, this patch implements basic handling of reversed
predecessors graph. It should also work for sibling operations so long as there
are no multiple greatest common ancestors.

resolve_transitive_edges() takes additional "start" parameter. It might be
useful in order to omit transitive edges in evolution log. Since
walk_predecessors() usually tracks a single commit, it would be wasteful to
build a fully-resolved predecessors graph.
@yuja yuja force-pushed the push-ypppmvzurwnz branch from ba57ed9 to 19572c4 Compare June 26, 2025 10:30
Copy link
Member

@martinvonz martinvonz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about the delay! I have tried to avoid work on my vacation and this PR was somewhat complex.

@yuja yuja added this pull request to the merge queue Jun 27, 2025
Merged via the queue into jj-vcs:main with commit d5e3ee8 Jun 27, 2025
28 checks passed
@yuja yuja deleted the push-ypppmvzurwnz branch June 27, 2025 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants