Jujutsu v0.47.0

v0.47.0
Added 5
  • Timestamp.format() now accepts new directives and flags such as %N, %Q, %^a, and %5Y, and %#z no longer panics
  • jj resolve gained a built-in :editor merge tool that opens the conflicted file with conflict markers in the text editor and supports conflicts with more than two sides
  • The TreeEntry template type now has .removed_values() and .added_values() methods returning List<Option<TreeValue>>, and TreeValue exposes .object_id(), .file_type(), and .executable() methods
  • The WorkspaceRef template type now has a .current_workspace() method for identifying the current workspace
  • Shell completion now suggests tag names for jj tag track, jj tag untrack, jj tag list, jj git fetch --tag, and jj git push --tag
Changed 18
  • Templates now have a top-level revset(revset: Stringify) -> List<Commit> function for evaluating revsets during templating
  • In colocated workspaces, jj describe -r@, jj restore --into=@, and similar commands no longer reset the staging area, just as snapshotting does; jj new @- still resets it
  • In non-colocated workspaces, jj git fetch and push no longer update remote-tracking Git refs; use jj git export to export remote bookmarks to Git behavior changed · vendor-flagged, marked in the notes belowbehavior changed · inferred, marked in the notes below
  • In non-colocated workspaces, jj git import; jj undo; jj git import no longer re-imports external changes; run jj git export to reflect undone changes in Git behavior changed · vendor-flagged, marked in the notes below
  • Timestamp.format() now follows jiff's strftime syntax instead of chrono's, with most directives including the default format unchanged behavior changed · vendor-flagged, marked in the notes below
  • Timestamp.format() %c, %x, and %r directives produce different output; for example %x now formats as 2001 M07 8 rather than 07/08/01
Fixed 9
  • jj git push no longer validates commits that are already on the remote as a tag
  • jj git fetch no longer creates additional refs based on non-standard Git remote.<name>.fetch configuration
  • jj gerrit upload no longer rejects uploading empty merge commits
  • Operations created by jj workspace add are now attributed to the workspace the command was run in, so jj undo there undoes them
  • jj workspace add -r with an invalid revision no longer leaves a half-created workspace behind
  • Fixed tag deletion with jj git fetch --tag=NAME
Removed 1
  • Timestamp.format() no longer supports %v and %+ directives

11 changes to check, marked in the notes below

From Jujutsu

About

jj is a Git-compatible version control system that is both simple and powerful. See the installation instructions to get started.

Release highlights
  • Templates now have a top-level revset(revset: Stringify) -> List<Commit> function for evaluating revsets during templating.

  • In colocated workspaces, jj describe -r@, jj restore --into=@, etc. no longer reset the staging area, just as snapshotting doesn't. jj new @- still resets it.

Breaking changes
  • In non-colocated workspaces, jj git fetch and push no longer update remote-tracking Git refs. Use jj git export to export remote bookmarks to Git. behavior changed · vendor-flagged

  • In non-colocated workspaces, jj git import; jj undo; jj git import no longer re-imports external changes. Run jj git export to reflect undone changes in Git. jj git fetch; jj undo; jj git fetch continues to work as expected. behavior changed · vendor-flagged

  • Timestamp.format() now follows jiff's strftime syntax instead of chrono's. Most directives, including the default format, are unchanged, but: behavior changed · vendor-flagged

    • %v and %+ are no longer supported. Use %e-%b-%Y and %Y-%m-%dT%H:%M:%S%.3f%:z (which always includes milliseconds) instead. removed · vendor-flagged
    • %c, %x, and %r produce different output. For example, %x now formats as 2001 M07 8 rather than 07/08/01.
    • %f now prints only as many digits as needed rather than always 9. Use %9f or %N for the old behavior. Similarly, %.f no longer pads to 3, 6, or 9 digits, so it formats as .12 rather than .120.
    • %Z now prints a time zone abbreviation. Use %:z to get an offset.
    • %:::z now includes the minutes of an offset when they are non-zero.
    • New directives and flags such as %N, %Q, %^a, and %5Y are now accepted. %#z no longer panics.
    • json(timestamp) now prints a UTC time zone offset as +00:00 instead of Z. behavior changed · vendor-flagged
  • The bookmarks and tags list now include absent targets for conflicted bookmarks and tags. The .removed_targets() and .added_targets() template methods now return List<Option<Commit>>. signature changed · vendor-flagged

New features
  • jj git push with git.sign-on-push enabled now signs commits in a separate operation before the push, so commits stay signed if the push fails and a new push doesn't have to sign them again.

  • Diff hunk headers now include symbol context even for unsupported languages.

  • jj resolve gained a built-in :editor merge tool that opens the conflicted file with conflict markers in your text editor. Unlike the other merge tools, it supports conflicts with more than two sides.

  • jj config gc now also cleans up workspace configs whose paths no longer exist.

  • Commit.contained_in() now accepts a Stringify instead of a StringLiteral. This enables dynamic query building during templating.

  • Templates now have a top-level revset(revset: Stringify) -> List<Commit> function for evaluating revsets during templating.

  • The TreeEntry template type now has .removed_values() -> List<Option<TreeValue>> and .added_values() -> List<Option<TreeValue>> methods, and TreeValue now exposes .object_id(), .file_type(), and .executable() methods for inspecting each side of a (possibly conflicted) tree entry.

  • The WorkspaceRef template type now has a .current_workspace() -> Boolean method, which can be used to identify the current workspace. This is slightly different than self.target().current_working_copy() because multiple workspaces can point to the same commit.

  • jj next/jj prev now accept a change ID prefix when prompting for the target commit. The special q quit choice was removed; cancel with EOF. #9790 removed · inferred

  • jj converge now accepts a change ID prefix when prompting for the change to converge. The special q abort choice was removed; canceling with EOF now exits with an error (previously q aborted successfully). behavior changed · inferred

  • jj file search now detects binary files (any null byte in the first 8000 bytes) and emits Binary file matches: <path> instead of dumping raw bytes to stdout. Use --binary-as-text to force text treatment, or --skip-binary to skip binary files entirely. behavior changed · inferred

Fixed bugs
  • jj git push no longer validates (e.g. for empty descriptions) commits that are already on the remote as a tag.

  • jj git fetch no longer creates additional refs based on non-standard Git remote.<name>.fetch configuration. behavior changed · inferred

  • jj gerrit upload no longer rejects uploading empty merge commits.

  • The operations created by jj workspace add are now attributed to the workspace the command was run in, so jj undo there undoes them instead of refusing to undo an operation from another workspace.

  • jj workspace add -r with an invalid revision no longer leaves a half-created workspace behind.

  • Shell completion now suggests tag names for jj tag track, jj tag untrack, jj tag list, jj git fetch --tag, and jj git push --tag.

  • Fixed tag deletion with jj git fetch --tag=NAME.

  • jj workspace remove can now remove stale workspaces. #10276

  • Fixed issue with config-schema.json where Taplo (TOML parsing library) would flag any aliases defined as a table but without an explicit .enabled = true as "valid under more than one of the schemas". This affected downstream tools such as editor extensions showing errors in perfectly valid config files.

  • Fixed a race condition in colocated workspaces where concurrent jj git fetch and jj commands could import partially fetched refs, causing divergence. #7349

  • Fixed a race condition in colocated workspaces where changes to the Git index made by a concurrent Git process could get lost.

  • In colocated workspaces, Git export failures are no longer misidentified as external changes. Those changes are now re-exported on the next jj invocation. #10478

  • In colocated workspaces, jj describe -r@, jj restore --into=@, etc. no longer reset the staging area, just as snapshotting doesn't. jj new @- still resets it.

  • jj run now materializes conflicts using ui.conflict-marker-style instead of always using the snapshot style. #10390 behavior changed · inferred

  • The Git backend now leaves out the root commit as a parent of a merge commit instead of failing. This fixes abandoning a child of the root commit that is a parent of a merge commit, including when a Git import abandons it. #8076

  • On Unix, repository files under .jj are now created with default file permissions.

  • Racy jj config set invocations no longer corrupt the target file. The last save wins; changes from other concurrent invocations may be lost. #10350

  • Date patterns such as after:"2024-03-10 03:30" are now resolved with the correct UTC offset on days with a daylight savings transition. Previously, the offset from the start of the day was used, so times after were off by an hour. Likely a niche bug fix, but a bug fix nonetheless!

  • Deeply nested revset, fileset, and template expressions are now rejected instead of causing a crash. #10071

  • In graph output, an elided edge that passes through a merge or fork line is now drawn as elided (╷) before reaching the node, instead of looking like a direct edge. Consecutive unconnected nodes, such as in the jj op show graph, are now separated by a blank line so they don't look connected.

  • jj log no longer draws a commit as a merge with two elided edges to the same commit when there's a merge between them whose parents both lead to that commit.

  • The "Did you mean" hint for a mistyped bookmark, revision, or function no longer lists every similar name. It now shows the 5 most similar ones, most similar first, followed by e.g. or 20 others. #8017

Contributors

Thanks to the people who made this release happen!

  • Aaron Sood (@arsood)
  • abdoul-kader keita (@kkeita)
  • abgox (@abgox)
  • Alexey Sokolov (@alexey-arista)
  • ase (@adamse)
  • Brice Figureau (@masterzen)
  • Bryan O'Sullivan (@bos)
  • Byron (@Byron)
  • Caleb White (@calebdw)
  • David Barsky (@davidbarsky)
  • David Rieber (@drieber)
  • Eyüp Can Akman (@eyupcanakman)
  • Greg Falcon (@vslashg)
  • JamBalaya56562 (@JamBalaya56562)
  • Jonas Natten (@jnatten)
  • Joseph Lou (@josephlou5)
  • Josh McKinney (@joshka)
  • Kevin Liao (@kevincliao)
  • Martin von Zweigbergk (@martinvonz)
  • Marukome0743 (@Marukome0743)
  • Matt Stark (@matts1)
  • Nitzan Raz (@BackSlasher)
  • Philip Metzger (@PhilipMetzger)
  • Rebecca Turner (@9999years)
  • Sami Hiltunen (@SamiHiltunen)
  • Shardul Natu (@kiranani)
  • Siva Mahadevan (@svmhdvn)
  • xuanchangfeng (@xuanchangfeng)
  • Yuya Nishihara (@yuja)
View original

Upgraded? How did it go?

Discussion