Commit graph

9885 commits

Author SHA1 Message Date
Austin Seipp
643c41bc4a lib: allow exactly() to take interval ranges as an argument
It turns out that the use case I had for `exactly()` was slightly more
subtle, and I need range support. In particular, usage of `exactly()`
in expressions used by `revsets.log-graph-prioritize` can and will
cause `jj log` to fail if the assertion fails; in my case, a particular
expression I use should be equal to zero-or-one revisions.

This (ab)uses string literal syntax to parse out a range that is like
a subset of Rust's range syntax; in particular unbounded endpoints like
`x..` or `..=y` are not supported. Ideally the grammar would be expanded
to handle this case more smoothly.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-09-24 23:17:57 -05:00
Angel Ezquerra
df2c1ed474 config get: add support for displaying arrays and tables
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Up until now, trying to get a config value that was an array or a table would fail with an error indicating that only values that can be converted to a string can be displayed. This change fixes that issue by converting arrays and tables into TOML format.
2025-09-24 16:51:11 +00:00
Yuya Nishihara
120d492d4e git, op_store: migrate and import "refs/tags/*" as @git remote tags
The migration logic is basically the same as 717d0d3d6d "git: on
deserialize/import/export, copy refs/heads/* to remote named git." Now
git::import_refs() processes bookmarks and tags in the same way.
git::export_refs() is unchanged because we don't have any commands that would
move local tags internally.
2025-09-24 09:09:52 +00:00
Yuya Nishihara
a89680d34b op_store: add remote tags storage and basic accessors
Git-tracking tags will be stored there. I don't have a concrete plan for proper
remote tags support, but I think tags fetched/pushed internally can be recorded
as remote tags.
2025-09-24 09:09:52 +00:00
Yuya Nishihara
0dc1beba12 op_store: make local/remote refs helper generic over RemoteView fields 2025-09-24 09:09:52 +00:00
Yuya Nishihara
aac63636cb op_store: reorganize proto reflecting new RemoteView structure
I'm thinking of adding remote tags table to support tag mutation commands, so I
think it's time to update the storage format. RefTarget is serialized to a list
of alternate terms because we don't need to support legacy formats here.
2025-09-24 09:09:52 +00:00
Ilya Grigoriev
4e09ad9fc0 nextest: change the "SLOW" timeout in CI to 10s
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Previously, nextest marked tests slow in CI when they run for more
than 5 seconds. This makes it so that this happens after 10 seconds.

I did *not* change the timeout for when tests are actually *terminated*
for being too slow. It remains at 100s. It might make sense to increase
it (keeping the `terminate-after` multiplier at 10).

This is just adjusting to taste, but I find the number of SLOWs in
5074734234
distracting, and most of the slow tests on Windows last more than 10s
anyway.

We could also do this only on Windows if people prefer, but
I think doing it everywhere is simpler.
2025-09-24 04:58:36 +00:00
Ilya Grigoriev
d8e17d9956 nextest: mark tests that last >10s as "SLOW"
This makes it so that tests that last longer than 10s are marked as
"SLOW" in nextest UI. This does not terminate them. We already have this
enabled in CI, but it seems nice to enable for everybody.  On my
machine, `test_concurrent_read_write_commit` sometimes deadlocks, and
this helps see which test is troublesome.

I erred on the side of a higher timeout, following the principle that
it's more important that warnings are actionable than to miss some
warnings. If somebody is debugging slow tests, they'll know to lower the
value.

See the CI config or the next commit for what a config that also
terminates tests if they run too long looks like.
2025-09-24 04:58:36 +00:00
Stephen Jennings
ce7e185d0b docs: Add guide for configuring multiple remotes
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
A common question is how to set up Jujutsu to work with multiple
remotes. Sometimes people are not sure which bookmarks they should
track.
2025-09-23 23:31:09 +00:00
Ilya Grigoriev
09dea71a15 git-backend: test and make public change id reading from headers
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Having tests illustrates the behavior. Making this public de-duplicates
the code with ERSC. This also allows determining whether a change id
comes from the header or is synthetic.

This is just a nice-to-have for me, we will also duplicate the code
until this is merged (if that happens).
2025-09-23 03:47:15 +00:00
Angel Ezquerra
86bbe5a3cb mise: add build:cli-reference-review task
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
This lets you regenerate the cli-reference and review the changes.
2025-09-22 20:53:06 +00:00
Ilya Grigoriev
cefc0db81b git_subprocess: make sure we do not try to fetch submodules regardless of .gitconfig
This fixes the bug described below.

I have `submodule.recurse=true` set in my .gitconfig. When trying
to fetch repos with submodules (e.g. git/git), I got errors like these:

```console
$ jj git fetch
remote: Enumerating objects: 853, done.
remote: Total 853 (delta 448), reused 439 (delta 413), pack-reused 315 (from 2)
Error: Git process failed: External git program failed:
Could not access submodule 'sha1collisiondetection'
```

This error occured when fetching only, *not* when cloning. It occured
even when there wasn't anything to fetch.

I only tested repositories that never had submodules initialized or
fetched (which would have to be done with Git).
2025-09-22 20:50:50 +00:00
David Barsky
6980253e70 docs: file brian and david as paid contributors for ERSC 2025-09-22 20:28:28 +00:00
dependabot[bot]
6d374dbe71 cargo: bump the cargo-dependencies group with 6 updates
Bumps the cargo-dependencies group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.5.47` | `4.5.48` |
| [clap_complete](https://github.com/clap-rs/clap) | `4.5.57` | `4.5.58` |
| [indexmap](https://github.com/indexmap-rs/indexmap) | `2.11.1` | `2.11.4` |
| [proptest](https://github.com/proptest-rs/proptest) | `1.7.0` | `1.8.0` |
| [toml](https://github.com/toml-rs/toml) | `0.9.6` | `0.9.7` |
| [toml_edit](https://github.com/toml-rs/toml) | `0.23.5` | `0.23.6` |


Updates `clap` from 4.5.47 to 4.5.48
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.47...clap_complete-v4.5.48)

Updates `clap_complete` from 4.5.57 to 4.5.58
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.57...clap_complete-v4.5.58)

Updates `indexmap` from 2.11.1 to 2.11.4
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/main/RELEASES.md)
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.11.1...2.11.4)

Updates `proptest` from 1.7.0 to 1.8.0
- [Release notes](https://github.com/proptest-rs/proptest/releases)
- [Changelog](https://github.com/proptest-rs/proptest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/proptest-rs/proptest/compare/v1.7.0...v1.8.0)

Updates `toml` from 0.9.6 to 0.9.7
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.9.6...toml-v0.9.7)

Updates `toml_edit` from 0.23.5 to 0.23.6
- [Commits](https://github.com/toml-rs/toml/compare/v0.23.5...v0.23.6)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.5.48
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-dependencies
- dependency-name: clap_complete
  dependency-version: 4.5.58
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-dependencies
- dependency-name: indexmap
  dependency-version: 2.11.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-dependencies
- dependency-name: proptest
  dependency-version: 1.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo-dependencies
- dependency-name: toml
  dependency-version: 0.9.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-dependencies
- dependency-name: toml_edit
  dependency-version: 0.23.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-22 20:28:07 +00:00
Remo Senekowitsch
526005fd2b docs: add link to "Jujutsu for everyone" tutorial
Our own tutorial and the one by Steve Klabnik both require experience
with Git. Adding a link to "Jujutsu for everyone" will give newcomers
without that experience an appropriate starting point for learning
Jujutsu.
2025-09-22 16:49:30 +00:00
dependabot[bot]
b7f8d50523 github: bump the github-dependencies group with 2 updates
Bumps the github-dependencies group with 2 updates: [taiki-e/install-action](https://github.com/taiki-e/install-action) and [cachix/install-nix-action](https://github.com/cachix/install-nix-action).


Updates `taiki-e/install-action` from 2.61.5 to 2.62.1
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](849bd009f7...d6912b4777)

Updates `cachix/install-nix-action` from 31.6.1 to 31.6.2
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Changelog](https://github.com/cachix/install-nix-action/blob/master/RELEASE.md)
- [Commits](7be5dee142...a809471b5c)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.62.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-dependencies
- dependency-name: cachix/install-nix-action
  dependency-version: 31.6.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-22 16:47:21 +00:00
Matt Stark
b1ef4f688a cli util: Make jj util exec act more transparently.
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
If a subprocess exits with a nonzero status, we don't need to print out
the fact that it exited with a nonzero status.

I think it is fairly obvious that we should try to match the return code
of the inner process.

In a bit more contention is whether we should print out the error
message at all. I would argue that a command that fails almost always
prints to stderr anyway, and the whole point of `jj util exec` is that
it should go into your aliases and thus the fact that it's an "external"
command should be hidden from the user (see my example above).

```
$ jj upload  # "upload" is an alias using jj util exec
<presubmit failures>
Error: presubmits failed
external command exited with 5
<exits with exit status 1>
```
2025-09-22 02:17:46 +00:00
Yuya Nishihara
9a5e2ae02e op_store: remove stale TODO about renamed remote and view state
We aren't going to fix this problem by inserting another indirection, at least
to the view layer.
2025-09-22 00:08:45 +00:00
Martin von Zweigbergk
4f456ec824 merge: add a generic Diff<T> type, use in TreeDiffEntry
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
I think this helps readability a bit. I updated `TreeDiffEntry` and a
few related places. I think there are many other places where we could
use the new type.
2025-09-21 16:16:33 +00:00
Martin von Zweigbergk
452a1a454c cli_util: rename Diff to ContentDiff
I'm about to add a generic `Diff<T>` that's more similar to
`Merge<T>`, so I want to free up the name. It seems better to have
`Diff<T>` and `ContentDiff` than e.g. `GenericDiff<T>` and `Diff` or
having to use qualified imports.
2025-09-21 16:16:33 +00:00
Remo Senekowitsch
991e8b8b2c cli bookmark: warn on empty implicit target revision
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
2025-09-21 10:27:43 +00:00
Ilya Grigoriev
54b109e255 nightly clippy: avoid false positive
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
After updating nightly rust, this code generates a false positive
(below). AFAICT, the new code is only a little more consistent, but it
avoids the warning.

The warning is:

```
warning: unneeded cloning of iterator items
   --> cli/src/commands/bookmark/list.rs:251:19
    |
251 |           commits = bookmark_list_items
    |  ___________________^
252 | |             .iter()
253 | |             .filter_map(|item| item.primary.target().added_ids().next())
254 | |             .cloned()
...   |
258 | |                     .map(|commit| (commit_id, commit.store_commit().clone()))
259 | |             })
    | |______________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_iter_cloned
    = note: `#[warn(clippy::redundant_iter_cloned)]` on by default
help: try
    |
253 ~             .filter_map(|item| item.primary.target().added_ids().next())
254 +             .map(|commit_id| {
255 +                 store
256 +                     .get_commit(&commit_id)
257 +                     .map(|commit| (commit_id, commit.store_commit().clone()))
258 +             })
    |

```

Rust version (nightly) that generates this clippy warning:

```console
$ rustc -Vv
rustc 1.92.0-nightly (0be8e1608 2025-09-19)
binary: rustc
commit-hash: 0be8e16088894483a7012c5026c3247c14a0c3c2
commit-date: 2025-09-19
host: aarch64-apple-darwin
release: 1.92.0-nightly
LLVM version: 21.1.1
```

Simply removing the `.cloned()` as suggested by Clippy results in this
error:

```
error[E0277]: a value of type `std::collections::HashMap<jj_lib::backend::CommitId, std::sync::Arc<jj_lib::backend::Commit>>` cannot be built from an iterator over elements of type `(&jj_lib::backend::CommitId, std::sync::Arc<jj_lib::backend::Commit>)`
    --> cli/src/commands/bookmark/list.rs:259:14
     |
 259 |             .try_collect()?;
     |              ^^^^^^^^^^^ value of type `std::collections::HashMap<jj_lib::backend::CommitId, std::sync::Arc<jj_lib::backend::Commit>>` cannot be built from `std::iter::Iterator<Item=(&jj_lib::backend::CommitId, std::sync::Arc<jj_lib::backend::Commit>)>`
     |
     = help: the trait `FromIterator<(&jj_lib::backend::CommitId, std::sync::Arc<_>)>` is not implemented for `std::collections::HashMap<jj_lib::backend::CommitId, std::sync::Arc<jj_lib::backend::Commit>>`
             but trait `FromIterator<(jj_lib::backend::CommitId, std::sync::Arc<_>)>` is implemented for it
     = help: for that trait implementation, expected `jj_lib::backend::CommitId`, found `&jj_lib::backend::CommitId`
     = note: required for `Result<HashMap<CommitId, Arc<Commit>>, BackendError>` to implement `FromIterator<Result<(&CommitId, Arc<Commit>), BackendError>>`
note: required by a bound in `itertools::Itertools::try_collect`
    --> /Users/ilyagr/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/itertools-0.14.0/src/lib.rs:2381:23
     |
2378 |     fn try_collect<T, U, E>(self) -> Result<U, E>
     |        ----------- required by a bound in this associated function
...
2381 |         Result<U, E>: FromIterator<Result<T, E>>,
     |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Itertools::try_collect`
     = note: the full name for the type has been written to '/Users/ilyagr/dev/jj/target/debug/deps/jj_cli-442101cf9493e967.long-type-2991360816845051416.txt'
     = note: consider using `--verbose` to print the full type name to the console
```
2025-09-20 11:14:20 +00:00
Yuya Nishihara
a5b61b2cc3 templater: leverage trait upcasting in ListTemplate
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
2025-09-20 01:22:47 +00:00
Yuya Nishihara
1d80c19aea revset: leverage trait upcasting in InternalRevset 2025-09-20 01:22:47 +00:00
Yuya Nishihara
46d5555be4 cleanup: leverage trait upcasting, delete as_any*()
This patch also adds .downcast*() wrappers to prevent misuse of as &Any casting.
The compiler wouldn't help detect &Arc<T> as &Any, for example.

https://blog.rust-lang.org/2025/04/03/Rust-1.86.0/#trait-upcasting
2025-09-20 01:22:47 +00:00
Yuya Nishihara
8982af2a6b cli: pass typed reference to check_local_disk_wc()
This at least enables compile-time check for the working copy object.
2025-09-20 01:22:47 +00:00
Yuya Nishihara
bd2807fdbc store: downcast to implementation type by backend_impl()
It should be safer to restrict the type here.
2025-09-20 01:22:47 +00:00
Michael Pratt
fc5cdf027c doc: integrate Gerrit FAQ into Gerrit guide
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Provide a bit more detail about the JJ to Gerrit change mapping, advice
on handling splits and squashes, as well as the existing FAQ
configuration for adding Change-Id directly to change descriptions.
2025-09-19 13:53:41 +00:00
Yuya Nishihara
819065000e cleanup: use .as_chunks() instead of chunks_exact() 2025-09-19 09:41:32 +00:00
Yuya Nishihara
78c09fc9e4 ui: switch to std::io::pipe()
MSRV is now 1.88.
2025-09-19 09:41:32 +00:00
Yuya Nishihara
65d15d7ef6 cli: help: remove details from short description of "gerrit upload"
I also removed "If true," because --dry-run is a flag taking no value.
2025-09-19 09:41:26 +00:00
George Christou
1a0e868e5c template: add string replace method 2025-09-19 09:01:07 +00:00
Martin von Zweigbergk
0ea94d07f4 gerrit: fix a misplaced comment in test 2025-09-19 07:06:04 +00:00
Theo Buehler
47d912d166 docs: document gerrit.default-branch, fix gerrit.default-remote
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
The former wasn't mentioned in the doc comment, the latter with an
incorrect name, which I found confusing.
2025-09-19 01:56:58 +00:00
Austin Seipp
419bd51496 cargo: bump MSRV to 1.88
1.90 was just released, so this seems reasonable, and it finally lets us
use let-chains. This includes all the clippy fixups too, and some small
changes suggested by Ilya.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-09-19 01:03:21 +00:00
Matt Stark
1a4a74f7a0 gerrit: Fix bug where only the head commit would get a Change-Id 2025-09-19 00:45:03 +00:00
Yuya Nishihara
0dcf73e46b op_store: serialize proto without constructing empty slot
It's easier to detect missed assignments if all fields are listed explicitly.
2025-09-19 00:29:28 +00:00
Yuya Nishihara
e236180a22 op_store: flag legacy git_refs.commit_id field as deprecated 2025-09-19 00:29:28 +00:00
Austin Seipp
7ec5980f26 revset: add new exactly(x, n) expression
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
With `all:` having gone away, some users (including me) had been using it
to enforce an invariant: by omitting it, an expression was guaranteed to
yield exactly one result. For example, this is important when using tools
like `jj rebase -B/-A`

Instead, let's fix that case by building that functionality into the
revset language itself. The previous behavior can now be enforced via
the term `exactly(x, 1)`

In the future, `n` could also be a range.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-09-18 18:48:12 +00:00
Conner Petzold
208de3c00a docs: add changelog links
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
2025-09-17 20:44:47 +00:00
Daniel Luz
4fd2c446dd complete: ignore shell quotes when parsing command line
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
When completion functions are called in bash and zsh, quoted arguments
are passed exactly as they are typed, including shell quotes, and
clap_complete currently does not attempt to normalize this behavior.

For example, if the user types:

    jj diff -f 'trunk()' <TAB>

std::env::args() will be equivalent to:

    ["jj", "diff", "-f", "'trunk()'", ""]

To accurately capture the revset, the quotes need to be stripped.

This workaround handles the most common cases that work consistently
across shells, rather than going for maximum accuracy.
2025-09-17 02:00:43 +00:00
Daniele Sassoli
92f325ef23 docs: add working with gerrit section
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Currently there are instructions on how to setup jj to work with GitHub,
but not Gerrit, which seems to be very popular with the jj community.

Add a gerrit.md file to help users discover the jj gerrit subcommand.
2025-09-16 21:16:13 +00:00
Reuven Lazarus
b5f86417cb upload: ensure unique prefixes in gerrit_change_id 2025-09-16 19:36:01 +00:00
Reuven Lazarus
ff3cf64e78 templates: ensure unique prefixes in format_gerrit_change_id_trailer
Gerrit's web UI (like jj) recognizes unique ID prefixes, so a reference
like `I1234cdef` in a commit message or a review comment becomes a
hyperlink to the referenced change. Currently, every jj-produced change
begins with `I6a6a6964`, which makes that less useful. This moves the
fixed `6a6a6964` component to the end, so the prefix is unique.

Closes #7500.
2025-09-16 19:36:01 +00:00
Philip Metzger
6b4b2c7daf cli bookmark: un-deprecate default revset arguments
This is mostly a revert of dd73b5ab7d. It closes #5374, as feedback on
the issue has shown that many longtime and new users dislike it. Martin
himself also mentioned that he wants to walk back this deprecation.

Co-authored-by: Remo Senekowitsch <remo@buenzli.dev>
2025-09-16 17:11:38 +00:00
Martin von Zweigbergk
a9384e88ca gerrit: minor cleanups 2025-09-16 15:37:13 +00:00
Yuya Nishihara
e357281135 op_store: drop support for legacy remote bookmarks without tracking state
This code was added by 4af678848d "op_store: minimal change to load/store
tracking state of remote branches" (2023-10-16). It's unlikely that the head
operation was written by jj older than that. Remote refs in old views are now
mapped to State::New unconditionally, which should be okay for read-only
operations.
2025-09-16 15:07:34 +00:00
Yuya Nishihara
c344547fad op_store: add error propagation path to view_from_proto() 2025-09-16 15:07:34 +00:00
Austin Seipp
35ad063b85 cli: basic jj gerrit upload implementation
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
This implements the most basic workflow for submitting changes to Gerrit,
through a verb called 'upload'. This verb is chosen to match the gerrit
documentation (https://gerrit-documentation.storage.googleapis.com/Documentation/3.12.1/user-upload.html).

Given a list of revsets (specified by multiple `-r` options), this will parse
the footers of every commit, collect them, insert a `Change-Id` based off the jj change-id (if one doesn't already exist), and then push them into the given remote.
It will then abandon the transaction, thus ensuring that gerrit change-IDs do not appear in jj.

Because the argument is a revset, you may submit entire trees of changes at
once, including multiple trees of independent changes, e.g.

    jj gerrit upload -r foo:: -r baz::

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-09-16 02:15:09 +00:00
Yuya Nishihara
84c7f5d562 cli: diff: pass $width parameter to external diff tools
Closes #4161
2025-09-16 01:49:21 +00:00