vc-jj 
- Description
- VC backend for the Jujutsu version control system
- Latest
- vc-jj-0.5.0.20260413.51427.tar (.sig), 2026-Apr-13, 970 KiB
- Maintainer
- Rudolf Schlatte <rudi@constantly.at>, Kristoffer Balintona <krisbalintona@gmail.com>
- Website
- https://codeberg.org/emacs-jj-vc/vc-jj.el
- Browse ELPA's repository
- CGit or Gitweb
- All Dependencies
- compat (.tar)
- Badge
To install this package from Emacs, use package-install or list-packages.
Full description
1. jj (Jujutsu) integration with Emacs vc.el and project.el
Support for Emacs built-in vc.el and project.el for the Jujutsu
version control system.
1.1. Installation
This package is distributed via GNU Elpa
(https://elpa.gnu.org/packages/vc-jj.html) and can be installed via
M-x package-install.
1.2. Usage
Vc-jj supports Emacs 28 and later. Most but not all of the VC and VC-related commands (vc.el, log-edit, log-view, and project.el) are currently supported. Supported commands include:
project-vc-dirvc-print-root-logvc-print-logvc-next-actionvc-diffvc-root-diffvc-rename-filevc-delete-filevc-revision-other-windowvc-clonevc-annotatelog-view-modify-change-comment
Additionally, vc-jj aims to provide Jujutsu-specific conveniences and
commands. For example, in Log View buffers, there are commands to
help users manipulate revision logs in a Jujutsu-friendly way,
directly within Log View buffers: vc-jj-log-view-bookmark-set,
vc-jj-log-view-abandon-change, vc-jj-log-view-edit-change and more.
To see all available commands call C-h a vc-jj RET. To see all
available customization options, call M-x customize-group vc-jj RET.
1.3. Jujutsu configuration
Emacs has built-in support for git-style diff and conflict markers, so
you might want to set the following options in your Jujutsu
configuration, for example via jj config edit --user or jj config edit --repo:
[ui] diff-formatter = ":git" conflict-marker-style = "git"
Jujutsu offers many configuration options. Vc-jj has not thoroughly tested its compatibility with these options, but it is expected that vc-jj work well even if the user configures many of them.
2. Jujutsu and Git
Jujutsu is a distributed version control system that is separated from the format in which files are stored on-disk. Currently, the only storage backend Jujutsu supports is Git, although other storage backends may be supported in the future.
Since version 0.34.0, Jujutsu repositories are "colocated" by default.
Earlier versions of Jujutsu may colocate a Git repository with
jj git clone --colocate REPOSITORY-URL. Colocated repositories are
ones that contain both a .jj and a .git directory in the
repository root, allowing users to use both Jujutsu and Git commands
in the same repository, without one getting in the way of the other.
(Although Git will complain about being in "detached HEAD" state.)
Because of this colocation, vc-jj can reuse some vc-git functionality
where appropriate, such as handling .gitignore files.
2.1. Jujutsu terminology and concepts
To those used to other version control systems, like Git, Jujutsu's version control model may be unfamiliar.
Below is an attempt at a brief description of Jujutsu-specific terminology and concepts.
In Jujutsu, there are both "commits" and "changes." In Git, the primary unit of history is the commit, which is immutable and identified by a commit hash. In Jujutsu, the primary unit is the change. A Jujutsu "commit" is the same as in Git: a snapshot in time of the repository. In Jujutsu, "revision" can be used interchangeably with "commit." A "change", on the other hand, is unique to Jujutsu: it can be thought of as a logical unit of work. A change is like the entire evolution of a commit as it changes over time. Each change has an underlying commit.
Every change has a corresponding change ID and every commit has a corresponding commit ID. Most jj commands accept both change IDs and commit IDs.
As the user modifies the repository, all changes are automatically recorded and all non-ignored files are automatically tracked. Consequently, unlike Git, there is no staging area or check-in operation. Instead, all modifications occur in the current change — the "working copy." As files are edited, added, and deleted, Jujutsu will take snapshots of the repository and automatically rewrite the underlying commit of the working copy, keeping the change intact but changing the corresponding underlying commit.
Because of the conceptual differences between Git and Jujutsu, commands that assume a stage/commit workflow behave differently or are no-ops when used via vc-jj.
In Git, git log shows a log of commits. In Jujutsu, jj log shows a
log of changes. History rewriting is a normal part of jj’s workflow.
Changes may be edited, split, or reordered while preserving their
identity via the change ID. Users will find that it is much more
natural to make changes in a repository by rewriting, playing with,
and modifying the change log.
Finally, in Jujutsu, there are bookmarks. Although each Git branch has a corresponding Jujutsu bookmark and vice versa (in colocated repositories), a bookmark is merely an alias, or named pointer, to a commit. Although bookmarks are pointers to commits, when a commit with a bookmark is rewritten, the bookmark automatically moves to the new commit, so bookmarks can effectively be treated as pointers to changes.
In contrast to Git, the working copy (current change) may be on a bookmark's commit, but it is not "attached" to it in the way a Git commit is attached to a branch: in Jujutsu, there is no currently checked out or active bookmark. As such, bookmarks do not automatically advance when new changes are created atop the commit they point to, unlike Git branches. Users familiar with Mercurial will find that Jujutsu bookmarks are more similar to Mercurial bookmarks than Git branches.
Users may read more about the concepts and terms used in Jujutsu here: https://docs.jj-vcs.dev/latest/. In particular, a glossary of all Jujutsu-specific terms can be found here: https://docs.jj-vcs.dev/latest/glossary/.
3. Contributing
We welcome bug reports and pull requests! vc-jj.el tries its best to
support Emacs 28.1 and above, but users may notice bugs related to
Emacs version incompatibilities. In such cases, please consider
submitting a bug report—we will try our best to address it.
Since vc-jj.el is distributed via GNU elpa, non-trivial code
contributions need to have the standard FSF copyright assignment in
place; feel free to contact us for details. Note that "trivial"
(below 15 lines or obvious) code suggestions in bug reports are fine.
3.1. Development
The code in file vc-jj.el is organized according to the structure set
out in the preamble of the file vc.el in the Emacs source tree.
Vc-jj uses Emacs's built-in Bug Reference mode (see (emacs) Bug
Reference) to buttonize references to this project's Codeberg issues
and PRs in Emacs-lisp mode buffers. References have the form
KEYWORD#NUMBER, where KEYWORD is one of bug, Bug, BUG, issue, Issue,
ISSUE, pull, Pull, PULL, pr, or PR. Issue keywords (bug, issue) link
to Codeberg issues, and PR keywords (pull, pr) link to Codeberg PRs.
To follow a button, place point on it and press C-c RET, or use M-x
bug-reference-push-button.
3.2. Testing
All tests are written in vc-jj-tests.el with the built-in ERT package
(Emacs Lisp Regression Testing). To run all the tests, open the
vc-jj-tests.el file in Emacs, evaluate the buffer by pressing C-c C-e,
then press M-x ert RET t RET. For more information on ERT, see the
ERT manual.
Alternatively, test coverage can be checked in the command line via
the Eldev tool, which isolates your personal Emacs configuration from
the Emacs instance used to run tests, helping distinguish between
project bugs and personal configuration problems. First, install the
Eldev executable as described in the Eldev manual. Then in a shell
whose current working directory is the project root, run eldev test to
run all tests or eldev test TEST1 TEST2 to run the tests named TEST1
and TEST2. Eldev also helps to easily run tests on other versions of
Emacs; see the corresponding manual section for how to do so.
Additionally, if installed, the coverage.el Emacs package can be used
alongside Eldev to highlight lines in the project files by color
according to whether they are covered by the existing tests. In a
shell, run eldev test --undercover simplecov,dontsend in the project
root directory, then open vc-jj.el in Emacs and enable the
coverage-mode minor mode. You should now see lines highlighted green
(covered) and red (not covered). See the associated Eldev manual
section for more information on integration with coverage.el.
4. Other Emacs packages for Jujutsu
The scope of the vc-jj.el project is to add jj support to the Emacs
built-in vc and project libraries. In case you look for a package
with more specialized Jujutsu support, here are some that might fit
the bill:
- 0WD0/majutsu
- “Majutsu provides a Magit-style interface for Jujutsu (jj), offering an efficient way to interact with JJ repositories from within Emacs.”
- bolivier/jj-mode.el
- “Jujutsu version control mode for Emacs inspired by Magit”
- bennyandresen/jujutsu.el
- “An Emacs interface for jujutsu, inspired by magit and humbly not attempting to match it in scope.”
- ~puercopop/jujutsushi
- “An Emacs UI to jujutsu”
- Xylenox/majjic
- “jjui + magit-section inspired jj ui for Emacs”
Old versions
| vc-jj-0.5.0.20260413.4807.tar.lz | 2026-Apr-13 | 782 KiB |
| vc-jj-0.5.0.20260407.140853.tar.lz | 2026-Apr-07 | 782 KiB |
| vc-jj-0.5.0.20260406.105717.tar.lz | 2026-Apr-06 | 779 KiB |
| vc-jj-0.5.0.20260324.165127.tar.lz | 2026-Mar-24 | 776 KiB |
| vc-jj-0.5.0.20260217.3734.tar.lz | 2026-Mar-02 | 775 KiB |
| vc-jj-0.5.0.20251221.141753.tar.lz | 2025-Dec-21 | 774 KiB |
| vc-jj-0.4.0.20251219.134548.tar.lz | 2025-Dec-19 | 774 KiB |
| vc-jj-0.3.0.20250902.153406.tar.lz | 2025-Sep-02 | 24.9 KiB |
| vc-jj-0.2.0.20250614.84603.tar.lz | 2025-Jun-14 | 22.2 KiB |
| vc-jj-0.1.0.20250323.115851.tar.lz | 2025-Mar-24 | 19.6 KiB |
News
1. Recent changes
1.1. Unreleased
1.1.1. Added
- Added support for
vc-log-search. - Added support for asynchronous
vc-diff. (Supported only on Emacs >=31, which has thevc-allow-async-diffuser option.) - Added support for asynchronous
vc-checkin, effectingvc-next-actionwhen making commits. (Supported only on Emacs >=31, which has thevc-async-checkinuser option.)
1.1.2. Changed
1.1.3. Removed
1.1.4. Fixed
- Fixed a bug where the contents of *vc-diff* were not erased prior to invocations of
vc-jj-diff. - The vc-dir buffer no longer lists entries for up-to-date and ignored files, as per the VC specification.
- Commands that rely on
vc-jj-revision-completion-table, such asvc-revision-other-window, are now drastically faster and do not error when there are divergent changes in the repository history.
1.2. 0.5 - 2025-12-21
1.2.1. Added
- Added support for
vc-region-history. Note that this requires the repository to be co-located since we callvc-git-region-history, but repositories are co-located by default since jujutsu 0.34. - Added
vc-jj-clone, making it possible to runvc-clone. - Define a new face:
vc-jj-log-view-commit. This is the face used for commit IDs in JJ Log View buffers. - Define a new face:
vc-jj-log-view-bookmark. This is the face used for bookmark names in JJ Log View buffers. - In the JJ Log View buffer:
- Fontify conflict indicators (
vc-conflict-state) - Fontify commit IDs (
vc-jj-log-view-commit) - Fontify bookmark names (
vc-jj-log-view-bookmark)
- Fontify conflict indicators (
- New user option:
vc-jj-root-log-format.vc-jj-root-log-formatcontrols the format and fontification of the Log View buffer created fromvc-print-root-log. - Added functionality for
vc-print-log(the "long" revision log format). - Support editing project files on a remote host using Tramp.
1.2.2. Changed
- Commands specific to vc-jj in the JJ Log View buffer have been renamed to have a "vc-jj-log-view-" prefix.
- Only abandon a change with
vc-jj-log-view-abandon-changeonce the user confirms their decision. - Bookmark operations in the JJ Log View buffer (e.g.,
vc-jj-log-view-bookmark-delete,vc-jj-log-view-abandon-change) no longer prompt to confirm reverting the parent buffer (vc-parent-buffer) whenauto-revert-modeis already enabled in that buffer. - In Emacs 30.1 and newer, reverting a JJ Log View buffer will, when possible, keep point on the same revision as before the revert. To undo this, add a function to
vc-jj-log-view-mode-hookthat removesvc-jj-log-view-restore-positionfrom the local value ofrevert-buffer-restore-functions.
1.2.3. Fixed
- Fixed
vc-jj-diffnot transforming filenames into jj fileset syntax. This fixes commands likevc-diffandlog-view-diffamong others. - Fixed a bug related to vc-jj's integration with project.el in cases where a git repo is located within a subdirectory of a jj repo. Previously, when inside the git repo, project.el would erroneously detect the jj repo to be current one (instead of the git repo, which is closer). Now, project.el correctly detects the closer git repo.
vc-jj-bookmark-deletenow properly recognizes the names of local bookmarks that are pushable to a remote.- Prevent the possibility of operating on the wrong revisions when in stale JJ Log View buffers (Log View buffers that are not up-to-date with the repository).
- Show the correct diff in log-edit buffers created by
log-view-modify-change-comment. - Fix
vc-diffin files whose revision has multiple parents.
1.3. 0.4 - 2025-09-03
1.3.1. Added
- Added
vc-jj-retrieve-tag, which makes it possible to use vc commands likevc-switch-branch, which are implemented on top ofvc-retrieve-tag. - Added
vc-jj-create-tag, which implements the vc.el create-tag method. This makes it possible to use vc commands likevc-create-branch, which callvc-create-tag.
… …