Yuya Nishihara
ef8038f60f
cli: config: leverage toml_edit::Value to serialize values
...
I use ValueKind::Ty(ref v) here because (*v).into() looked rather noisy.
Fixes #3374
2024-05-22 10:17:37 +09:00
Yuya Nishihara
d38c366a98
cli: config: use str.parse() to remove "use FromStr"
2024-05-22 10:17:37 +09:00
Yuya Nishihara
7b72e04206
cli: config: move helper functions to commands.config module
...
There are no external callers, so let's make them private.
2024-05-22 10:17:37 +09:00
Matt Stark
fa6f5e3880
Add the revsets mutable
and immutable
.
...
I add them as aliases, since a user may instead choose to define `immutable_heads()`, for example, as `heads(immutable())`, and the define `immutable()` instead.
2024-05-22 09:19:46 +10:00
Ilya Grigoriev
77cf968316
docs: replace redirects with copies of files
...
This means that <https://martinvonz.github.io/jj/latest/index.html > will
not longer redirect to
<https://martinvonz.github.io/jj/v0.18.0/index.html > (or similar) after
the next release, as requested by @jyn514 on Discord. Instead, it will
be a copy.
Originally, the plan was to use mike's symlink functionality and make
`latest` a symlink. See a comment inline for how that didn't work; we
could do that after changing how GitHub Pages are built.
Before the next `jj` release, and after this PR is merged, you can play
with this by going to <https://martinvonz.github.io/jj/main/ > which is
an alias for <https://martinvonz.github.io/jj/prerelease/ >.
Because of previous commits in this PR, the latest version will be
marked in the version selector as "latest", so hopefully this won't
confuse users.
Due to the parent commit, the "latest" URL will be considered canonical.
2024-05-21 16:19:04 -07:00
Ilya Grigoriev
864869abd5
docs: set canonical_version to latest
...
Currently, https://www.google.com/search?q=jj+revsets has problematic
results, one of the top links for me is
https://martinvonz.github.io/jj/v0.14.0/github/ (we are currently on
v0.17.1).
I hope this will help them all point to `latest` instead.
2024-05-21 16:19:04 -07:00
Ilya Grigoriev
ff810c6097
docs: show version alias in version selector
...
See https://github.com/martinvonz/jj/pull/3723 for a screenshot.
This will make it clearer to the users that the "latest" and "v0.??.?"
are the same even if the former does not redirect to the latter (but has
identical contents).
MkDocs material lists the *first* alias for each version, so I also
added a "nightly" alias for "prerelease". Otherwise, users would see the
"main" alias, and might get confused whether they should use "latest" or
"main" docs if they don't realize it's named after the "main" branch.
(Upon testing, it still shows "main" for now, but it should be possible
to fix this after this PR is merged by reordering the aliases directly
in `versions.json` on the gh-pages branch)
2024-05-21 16:19:04 -07:00
Ilya Grigoriev
54e04e4ac3
update mkdocs-material & poetry update
...
The new version supports showing labels in version selector.
2024-05-21 16:19:04 -07:00
Remo Senekowitsch
2a320b324c
github: add linux-aarch64 build
2024-05-21 13:49:06 -05:00
dploch
d31edd4ac5
changelog: fix typo and move 'reachable' announcement to correct section
2024-05-21 10:51:48 -05:00
dploch
a49da4ad01
revset: implement a 'reachable(src, domain)' expression
...
This revset correctly implements "reachability" from a set of source commits following both parent and child edges as far as they can go within a domain set. This type of 'bfs' query is currently impossible to express with existing revset functions.
2024-05-21 10:52:31 -04:00
dploch
5125eab505
union_find: implement a library for the Union-Find algorithm
2024-05-21 10:52:31 -04:00
Thomas Castiglione
13c8f32ceb
local_working_copy: fix some clippy lints that only show up on Windows
2024-05-21 14:37:17 +08:00
Thomas Castiglione
59d3a2c866
local_working_copy: when all sides of a conflict are executable, materialise the conflicted file as executable
...
Fixes #3579 and adds a testcase for an executable conflict treevalue.
2024-05-21 14:37:17 +08:00
dependabot[bot]
5041649cbb
---
...
updated-dependencies:
- dependency-name: requests
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-05-21 01:26:34 -05:00
Ilya Grigoriev
84007075d9
jj config list
: escape keys
...
Fixes #1322 . There may be more places where keys need escaping, I'm not
completely sure.
2024-05-20 22:39:56 -07:00
Ilya Grigoriev
1f7c4ec60a
conflicts: label closing delimeter with conflict number
...
This follows up on https://github.com/martinvonz/jj/pull/3459 and adds a
label to the closing delimeter of each conflict, e.g. "Conflict 1 of 3
ends".
I didn't initially put any label at the ending delimeter since the
starting delimeter is already marked with "Conflict 1 of 3". However,
I'm now realizing that when I resolve conflicts, I usually go from top
to bottom. The first thing I do is delete the starting conflict
delimeter. It is when I get to the *end* of the conflict that I wonder
whether there are any more conflicts left in the file.
2024-05-20 18:36:51 -07:00
dependabot[bot]
7812beb087
github: bump github/codeql-action in the github-dependencies group
...
Bumps the github-dependencies group with 1 update: [github/codeql-action](https://github.com/github/codeql-action ).
Updates `github/codeql-action` from 2.13.4 to 3.25.6
- [Release notes](https://github.com/github/codeql-action/releases )
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md )
- [Commits](cdcdbb5797...9fdb3e4972
)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: github-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-05-20 16:10:46 +00:00
dependabot[bot]
990c48a9bc
cargo: bump the cargo-dependencies group with 7 updates
...
Bumps the cargo-dependencies group with 7 updates:
| Package | From | To |
| --- | --- | --- |
| [anyhow](https://github.com/dtolnay/anyhow ) | `1.0.83` | `1.0.86` |
| [libc](https://github.com/rust-lang/libc ) | `0.2.153` | `0.2.155` |
| [proc-macro2](https://github.com/dtolnay/proc-macro2 ) | `1.0.82` | `1.0.83` |
| [prost](https://github.com/tokio-rs/prost ) | `0.12.4` | `0.12.6` |
| [prost-build](https://github.com/tokio-rs/prost ) | `0.12.4` | `0.12.6` |
| [syn](https://github.com/dtolnay/syn ) | `2.0.64` | `2.0.65` |
| [thiserror](https://github.com/dtolnay/thiserror ) | `1.0.60` | `1.0.61` |
Updates `anyhow` from 1.0.83 to 1.0.86
- [Release notes](https://github.com/dtolnay/anyhow/releases )
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.83...1.0.86 )
Updates `libc` from 0.2.153 to 0.2.155
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.153...0.2.155 )
Updates `proc-macro2` from 1.0.82 to 1.0.83
- [Release notes](https://github.com/dtolnay/proc-macro2/releases )
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.82...1.0.83 )
Updates `prost` from 0.12.4 to 0.12.6
- [Release notes](https://github.com/tokio-rs/prost/releases )
- [Commits](https://github.com/tokio-rs/prost/compare/v0.12.4...v0.12.6 )
Updates `prost-build` from 0.12.4 to 0.12.6
- [Release notes](https://github.com/tokio-rs/prost/releases )
- [Commits](https://github.com/tokio-rs/prost/compare/v0.12.4...v0.12.6 )
Updates `syn` from 2.0.64 to 2.0.65
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.64...2.0.65 )
Updates `thiserror` from 1.0.60 to 1.0.61
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.60...1.0.61 )
---
updated-dependencies:
- dependency-name: anyhow
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: libc
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: proc-macro2
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-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
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-05-20 15:54:47 +00:00
Remo Senekowitsch
c9375bf76f
docs: fix converting a repo into a co-located one
...
`jj st` doesn't add the file `.git/refs/heads/main` so the git repo is left
in an invalid state. `jj new @-` puts the git repo in a valid state.
2024-05-20 21:39:27 +09:00
Yuya Nishihara
c04fb7d33a
templater: migrate to generic dsl_util::AliasesMap type
2024-05-20 10:32:18 +09:00
Yuya Nishihara
2cbc4f9996
revset: extract generic dsl_util::AliasesMap<P> type
...
As I'm going to extract generic alias substitution helpers, there should be
a common map type.
2024-05-20 10:32:18 +09:00
Yuya Nishihara
6916fae853
revset, templater: extract trait that parses alias declaration
...
Revset/TempalteAliasesMap will be extracted as a generic map type over
P: AliasDeclarationParser.
2024-05-20 10:32:18 +09:00
Yuya Nishihara
467d73f1e6
revset: make .get_symbol/function() compatible with TemplateAliasesMap
...
These map types will be combined.
2024-05-20 10:32:18 +09:00
Yuya Nishihara
3db1f9fe5d
revset: extract aliases_map.function_names()
...
TemplateAliasesMap has a similar function for symbols, and I'm going to extract
a common aliases map type.
2024-05-20 10:32:18 +09:00
Yuya Nishihara
60c3f623ef
tests: use get_branch_output() helper thoroughly in test_git_*
2024-05-19 22:45:32 +09:00
Waleed Khan
6eefad9b67
docs: Add Log
header
...
There are six related settings that would be good to group in the table of contents.
2024-05-18 16:39:28 -07:00
Philip Metzger
bbb9ca10cd
lib: Add RevsetExpression::is_empty()
, which filters out empty commits.
...
This is a useful helper for programmatic revsets. Users were also migrated.
2024-05-19 00:20:05 +02:00
Yuya Nishihara
6d211c589c
templater: consolidate node.span handling in expand_node()
...
I'll probably rewrite expand_aliases() in visitor-like interface, and tree
traversal logic will be implemented on ExpressionKind. That's why I made
expand_node() destructure ExpressionNode first.
2024-05-18 09:53:52 +09:00
Yuya Nishihara
6b9e5f7cd7
templater: attach alias traces to function parameter
...
This consolidates the type of substitution results. Before, symbol substitution
can return inner ExpressionKind internally, but function-parameter substitution
couldn't.
2024-05-18 09:53:52 +09:00
Yuya Nishihara
47d372b71e
templater: attach alias traces to type errors
...
This should avoid regression caused by upcoming changes. An alias function
parameter will be wrapped with AliasExpanded, and type errors in it should
be reported with its alias expansion stack.
2024-05-18 09:53:52 +09:00
Yuya Nishihara
3e51e93265
fileset: box FunctionCallNode to make enum smaller
...
For the same reason as the previous commit.
2024-05-18 09:53:52 +09:00
Yuya Nishihara
e87b49ccc1
templater: move boxing to ExpressionKind variants to make the enum smaller
...
I'm trying to extract generic alias substitution functions, and some of them
will take ExpressionKind or Box<FunctionCallNode> by value, then return it or
substituted value of the same type. The cost of moving values wouldn't matter
in practice, but I think it's better to keep the value types small.
Now ExpressionKind is 4-word long.
2024-05-18 09:53:52 +09:00
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