Skip to content

Commit

Permalink
revset_graph: queue linear history per branch, emit at fork point
Browse files Browse the repository at this point in the history
This is similar to Mercurial's "topo" sorting, but merge handling seems
different. Mercurial's dagop.toposort() tracks [(roots, descendants)], and
merged ancestors are combined into a single tracking record. OTOH, ours tracks
{root: descendants}, and merged ancestors are split into separate tracking
records. I don't know which one will produce a better result, but I think
the latter is easier to implement.

Compared to Sapling's beautify_graph(), this is lazy, and can roughly preserve
the index (or chronological) order. I tried beautify_graph() with prioritizing
the @ commit, but the result seemed too aggressively reordered. Perhaps, for
merge-heavy history (or branchy history in reverse order), beautify_graph()
will produce significantly better result. For my wip branches (~30 branches,
a couple of commits per branch), this works pretty well.

Closes jj-vcs#242
  • Loading branch information
yuja committed Jul 19, 2023
1 parent 5d851fb commit 1662fef
Show file tree
Hide file tree
Showing 10 changed files with 647 additions and 39 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### New features

* `jj log` output is now topologically grouped.
[#242](https://github.com/martinvonz/jj/issues/242)

### Fixed bugs

## [0.8.0] - 2023-07-09
Expand Down
Loading

0 comments on commit 1662fef

Please sign in to comment.