Martin von Zweigbergk
fe9daac483
tests: avoid deprecated jj init --git/--git-repo
...
I left the instances in `test_init_command.rs` alone since they're
about testing `jj init`.
2024-05-17 13:55:20 -07:00
dependabot[bot]
ef6cb06fde
cargo: bump the cargo-dependencies group with 2 updates
...
Bumps the cargo-dependencies group with 2 updates: [either](https://github.com/rayon-rs/either ) and [syn](https://github.com/dtolnay/syn ).
Updates `either` from 1.11.0 to 1.12.0
- [Commits](https://github.com/rayon-rs/either/compare/1.11.0...1.12.0 )
Updates `syn` from 2.0.63 to 2.0.64
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.63...2.0.64 )
---
updated-dependencies:
- dependency-name: either
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-dependencies
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-05-17 12:34:02 -07:00
dependabot[bot]
7457085829
github: bump actions/checkout in the github-dependencies group
...
Bumps the github-dependencies group with 1 update: [actions/checkout](https://github.com/actions/checkout ).
Updates `actions/checkout` from 4.1.5 to 4.1.6
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](44c2b7a8a4...a5ac7e51b4
)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: github-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-05-17 12:33:39 -07:00
jyn
0d3e949439
give a warning when trying to redefine a built-in command
...
previously, aliases to built-in commands were silently ignored. this matches git's behavior, but seems unhelpful, especially if the user doesn't know that a command with that name already exists.
give a warning rather than silently ignoring it.
2024-05-17 16:50:54 +01:00
Martin von Zweigbergk
8e0ac1d167
docs: conflicted branches have two "?" as suffix
...
Looks like we forgot to update this when we changed from one to two
question marks.
2024-05-17 07:00:15 -07:00
Théo Daron
0a48ac63cb
cli: make jj branch track show conflicts
2024-05-17 12:21:10 +02:00
Théo Daron
69d44375dc
cargo: downgrade libc to 0.2.153
2024-05-17 12:21:10 +02:00
Martin von Zweigbergk
c34f35fffe
cargo: downgrade off of yanked prost version
2024-05-16 14:22:00 -07:00
dependabot[bot]
b3dac82ee7
cargo: bump the cargo-dependencies group with 2 updates
...
Bumps the cargo-dependencies group with 2 updates: [prost](https://github.com/tokio-rs/prost ) and [prost-build](https://github.com/tokio-rs/prost ).
Updates `prost` from 0.12.4 to 0.12.5
- [Release notes](https://github.com/tokio-rs/prost/releases )
- [Commits](https://github.com/tokio-rs/prost/compare/v0.12.4...v0.12.5 )
Updates `prost-build` from 0.12.4 to 0.12.5
- [Release notes](https://github.com/tokio-rs/prost/releases )
- [Commits](https://github.com/tokio-rs/prost/compare/v0.12.4...v0.12.5 )
---
updated-dependencies:
- dependency-name: prost
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: prost-build
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-05-16 10:45:22 -05:00
Martin von Zweigbergk
66aced5dc8
merge_view: remove heads removed by other side also in Google repos
...
When I addded the workaround in 256988de65
, I missed the comment
just below explaining that heads removed by the other side were
already handled. Since that's not handled when using non-default
indexes now, we need to handle it in an `else` block.
2024-05-16 06:09:59 -07:00
dependabot[bot]
0a39cfdbe2
cargo: bump the cargo-dependencies group with 2 updates
...
Bumps the cargo-dependencies group with 2 updates: [insta](https://github.com/mitsuhiko/insta ) and [serde](https://github.com/serde-rs/serde ).
Updates `insta` from 1.38.0 to 1.39.0
- [Release notes](https://github.com/mitsuhiko/insta/releases )
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mitsuhiko/insta/compare/1.38.0...1.39.0 )
Updates `serde` from 1.0.201 to 1.0.202
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.201...v1.0.202 )
---
updated-dependencies:
- dependency-name: insta
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-dependencies
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-05-15 19:47:49 +02:00
Ilya Grigoriev
0d0f8af05d
docs CLI reference: explain that argument help is truncated
...
Perhaps this will help with issues like
https://github.com/martinvonz/jj/issues/3667
2024-05-15 09:45:40 -07:00
Ilya Grigoriev
c9b44f3828
docs: ask MkDocs to fail on links to non-existent sections
...
This also requires anchors to be lower-cased: https://github.com/mkdocs/mkdocs/issues/3703
2024-05-14 13:14:27 -07:00
Ilya Grigoriev
4907a384b9
docs: update dependency versions, poetry update
2024-05-14 13:14:27 -07:00
Yuya Nishihara
b9039c3c2d
cli: remove unneeded lifetime bound from check_rewritable()
2024-05-14 19:45:52 +09:00
Théo Daron
b1fca954cf
fix: changelog entry for PR #3600
2024-05-14 12:14:46 +02:00
Théo Daron
823041c795
cli: create new wc_commit when wc_commit become immuable
2024-05-14 08:53:11 +02:00
Yuya Nishihara
b0d17acb30
merge_tools: leverage Display for printing exit status
...
This should handle signal exits better. format_tool_aborted() is inlined
because it is more or less a string literal now.
2024-05-14 10:24:28 +09:00
Yuya Nishihara
c17a75624e
signing: remove redundant "exit status" from SSH backend error
...
Follows up 550f44b7c1
"gpg: drop redundant "exit status" from error message."
2024-05-14 10:24:28 +09:00
Yuya Nishihara
a61f91b8cf
templater: propagate error from commit.parents() method
2024-05-14 10:24:11 +09:00
Yuya Nishihara
1b6589a463
cli: add helper functions that set up diff renderer based on command args
...
Just for convenience. Even though WorkspaceCommandHelper is getting bloated,
I think it's okay to add thin wrapper functions there.
2024-05-14 09:36:13 +09:00
Yuya Nishihara
4d9c84a17e
diff_util: remove WorkspaceCommandHelper dependency from show functions
...
I've added a wrapper struct in order to get around too many arguments warning.
It captures &dyn Repo as CommitTemplateLanguage would do. OTOH, &Ui is passed
by argument because the caller might need &mut Ui after the renderer object was
configured.
2024-05-14 09:36:13 +09:00
Yuya Nishihara
7341bff2f4
diff_util: remove WorkspaceCommandHelper dependency from inner show functions
...
I've added a struct similar to RevsetWorkspaceContext. It can be a closure,
but we'll need to duplicate format_file_path() function anyway if we add
commit.diff() template.
2024-05-14 09:36:13 +09:00
Yuya Nishihara
b6d95c3504
cli: use high-level show_diff() function in cmd_status()
...
As I'm going to remove &WorkspaceCommandHelper from these functions, it will
be a bit more verbose to call low-level show_*() functions.
2024-05-14 09:36:13 +09:00
Yuya Nishihara
13f10f6957
diff_util: pass repo in to inner show functions by argument
...
I'm going to remove &WorkspaceCommandHelper dependency. This is the easy part.
2024-05-14 09:36:13 +09:00
Yuya Nishihara
6e7c9f15fd
diff_util: pass term_width() in to show_diff_stat() by argument
...
This patch removes ui dependency from show_diff_stat().
2024-05-14 09:36:13 +09:00
Yuya Nishihara
f614c96383
diff_util: remove CommandError dependency from show functions
...
Suppose we add commit.diff() template method, some of these show_*() functions
will be called from there. CommandError shouldn't appear in that layer.
2024-05-14 09:36:13 +09:00
dependabot[bot]
b1fc2cf7e9
cargo: bump syn from 2.0.61 to 2.0.63 in the cargo-dependencies group
...
Bumps the cargo-dependencies group with 1 update: [syn](https://github.com/dtolnay/syn ).
Updates `syn` from 2.0.61 to 2.0.63
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.61...2.0.63 )
---
updated-dependencies:
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-05-13 12:34:23 -05:00
Ilya Grigoriev
02b72e542d
docs: try upgrading mkdocs-material
again, upgrade MkDocs
...
https://github.com/squidfunk/mkdocs-material/issues/7160 is supposed to
be fixed now. I will double-check that the version switcher still works
after this commit. This only affects the version switcher from
"prerelease" to other versions.. The functionality is a bit brittle, so
it's hard to test locally before merging this.
We do want to upgrade, since this allows us (and seems to also require
us) to upgrade to MkDocs 1.6, which has a nice feature of disallowing
links to broken document section (beyond just checking for links to
non-existent files).
I carefully avoided unnecessary upgrades in this commit, but we
should also run `poetry update` shortly, once we check this
works properly. Also, the feature of MkDocs 1.6 I mentioned needs
enabling.
Finally, I plan to change version specifiers from Poetry's `^5.6.22`
syntax to more plain inequalities, since I keep forgetting what the
former syntax means. I started with this commit.
(I was surprised MkDocs was allowed to be upgraded to `1.6` with the
`^1.5.2` spec. I now suspect that what I previously thought it should
mean is expressed as `~1.5.2`, but inequalities are clearer).
2024-05-13 09:14:33 -07:00
Martin von Zweigbergk
550f44b7c1
gpg: drop redundant "exit status" from error message
...
Apparently we currently get things like "GPG failed with exit status
exit status: 2".
2024-05-13 08:30:00 -07:00
Martin von Zweigbergk
ee9d3271c1
cleanup: propagate errors from Commit::predecessors()
2024-05-13 07:39:14 -07:00
Martin von Zweigbergk
0a758e7024
cleanup: propagate errors from Commit::parents()
...
The function now returns an iterator over `Result`s, matching
`Operation::parents()`.
I updated callers to also propagate the error where it was trivial.
2024-05-13 07:39:14 -07:00
Martin von Zweigbergk
677081ef71
rebase: avoid an unnecessary lookup of parent commits
2024-05-13 07:39:14 -07:00
Martin von Zweigbergk
256988de65
repo: add a workaround for merging repo views with Google's index
...
We do a 3-way merge of repo views in a few different
scenarios. Perhaps the most obvious one is when merging concurrent
operations. Another case is when undoing an operation.
One step of the 3-way repo view merge is to find which added commits
are rewrites of which removed commits (by comparing change IDs). With
the high commit rate in the Google repo (combined with storing the
commits on a server), this step can get extremely slow.
This patch adds a hack to disable the slow step when using a
non-standard `Index` implementation. The Google index is the only
non-standard implementation I'm aware of, so I don't think this will
affect anyone else. The patch is also small enough that I don't think
it will cause much maintenance overhead for the project.
2024-05-12 08:59:44 -07:00
Yuya Nishihara
728e9e0772
cli: reuse ConfigLevelArgs for "config list --user/--repo"
...
This is a bit tricky, but we can reconfigure group attributes by using
mut_group().
https://docs.rs/clap/latest/clap/struct.Command.html#method.mut_group
2024-05-12 23:15:58 +09:00
Yuya Nishihara
717b42245c
cli: rename ConfigArgs to ConfigLevelArgs
2024-05-12 23:15:58 +09:00
Yuya Nishihara
95593598d5
cli: use command(flatten) instead of deprecated clap(..)
2024-05-12 23:15:58 +09:00
Yuya Nishihara
db75e19751
cli: insert tracing at editor/pager invocation
...
This should help debug Windows mess.
2024-05-12 23:06:14 +09:00
Yuya Nishihara
e3b3b5586f
ui: add per-type FormatterFactory constructors, inline selection
...
This should be better than passing (bool, bool, bool) arguments.
2024-05-12 09:21:18 +09:00
Yuya Nishihara
46246a7734
ui: inline debug_color() and use_color()
2024-05-12 09:21:18 +09:00
Yuya Nishihara
46226a4c44
ui: forward .color() to FormatterFactory
...
This helps eliminate use_color() function.
2024-05-12 09:21:18 +09:00
Yuya Nishihara
0423e3e1ee
ui: add helper function that sets up FormatterFactory
...
I'm going to split FormatterFactory::prepare() which takes 3 bool arguments,
and prepare() will be inlined there.
2024-05-12 09:21:18 +09:00
tinger
d0a29a831d
cli: add ui.color = "debug"
...
When using `ui.color = "debug"`, changes in the output style
additionally include delimiters << and >>, as well as all active labels
at this point separated by ::. The output is otherwise unformatted and
the delimiters and labels inherit the style of the content they apply
to.
2024-05-11 10:16:09 +02:00
Yuya Nishihara
de4ea5bc5a
revset: move basic argument helpers to separate module
...
parse_function_argument_to_file/string_pattern() functions aren't moved.
They are more like functions that transform parsed tree to intermediate
representation.
2024-05-11 16:50:14 +09:00
Yuya Nishihara
f82c946ebe
revset: move parsing functions to separate module
...
These functions will be reimplemented, and they will return a parsed tree
instead of RevsetExpression tree.
2024-05-11 16:50:14 +09:00
Yuya Nishihara
e6aa8906f7
revset: move alias types to separate module
...
Alias expansion is purely substitution of parsed tree, which should belong to
the first parsing stage.
2024-05-11 16:50:14 +09:00
Yuya Nishihara
68db9c142c
revset: extract parser types to separate module
...
I'm planning to rewrite the parser in a similar way to fileset/template parsing,
and the revset_parser module will host functions and types for the first stage.
I haven't started the rewrite, but it seems good to split the revset module
even if we reject the idea.
2024-05-11 16:50:14 +09:00
Yuya Nishihara
cfc18b0432
revset: make RevsetParser type private
...
It's unlikely that client codes and integration tests have to use the pest
API directly.
2024-05-11 16:50:14 +09:00
Yuya Nishihara
d6613304c9
cli: print deleted branch hints at end of "branch list" output
...
These hints shouldn't be interleaved in the template output. The new output
might look a little bit worse, but I don't think it's unacceptably bad.
2024-05-11 09:43:53 +09:00
Yuya Nishihara
2f3ac4e4d7
tests: snapshot both stdout and stderr in "branch list" tests
2024-05-11 09:43:53 +09:00