Fix Jujutsu remote bookmark detection with jj > 0.35

Review Request #14706 — Created Nov. 24, 2025 and submitted — Latest diff uploaded

Information

RBTools
master

Reviewers

Jujutsu now creates colocated repositories by default (repositories
which can be treated as either jj or git repos), and the
remote_bookmarks template method is now returning the git-tracking
bookmark in addition to the real remote ref name. This broke the remote
bookmark detection because we were now getting results as "main@origin
main@git" instead of just "main@origin", which didn't parse correctly
when passed in to other commands.

This change fixes this by updating the commands that fetch remote
bookmarks to filter out the "git" remote from the results. Things which
expect to fetch a single result will now also split lines and choose the
first result. In practice what was there before should be fine after the
filter change, but I'd rather be cautious.

Unit tests pass again.

Commits

Files