Yuya Nishihara
556c7291c1
revset: migrate syntactic tests to AST-based
...
This will hopefully help remove PartialEq from RevsetExpression. Some assertions
are duplicated so that AST->RevsetExpression transformation is covered by tests.
2024-06-11 20:00:47 +09:00
Yuya Nishihara
538701429a
revset: backport parsing test helpers from templater and fileset
2024-06-11 20:00:47 +09:00
Yuya Nishihara
53fa95d73e
fileset, templater: in tests, make parse_normalized() unwrap result
...
It's unlikely that we'll use "normalized" result to compare Err variants.
2024-06-11 20:00:47 +09:00
Yuya Nishihara
e7e06b6f8c
fileset: use parse_into_kind() to test parse errors
...
parse_normalized() will be changed to unwrap the result.
2024-06-11 20:00:47 +09:00
Ilya Grigoriev
2d0b715ad0
docs: update windows docs to mention minus, update minus docs
...
Quick fix to #3850 .
2024-06-10 11:47:34 -07:00
dependabot[bot]
c71eb73047
cargo: bump the cargo-dependencies group with 3 updates
...
Bumps the cargo-dependencies group with 3 updates: [clap](https://github.com/clap-rs/clap ), [clap_complete](https://github.com/clap-rs/clap ) and [regex](https://github.com/rust-lang/regex ).
Updates `clap` from 4.5.6 to 4.5.7
- [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/v4.5.6...v4.5.7 )
Updates `clap_complete` from 4.5.4 to 4.5.5
- [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.4...clap_complete-v4.5.5 )
Updates `regex` from 1.10.4 to 1.10.5
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/1.10.4...1.10.5 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: clap_complete
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: regex
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-10 13:07:17 -05:00
Martin von Zweigbergk
78cbb513d1
fix: add support for fixing only some paths
2024-06-10 21:51:06 +09:00
Simon Wollwage
3cd1fe4753
Show paths of config files when configurations contain errors
...
This addresses issue #3317 , where as discussed we want to show the paths to
configuration files if they contain errors, to make it easier for the user to
locate them.
2024-06-10 10:14:36 +00:00
Martin von Zweigbergk
6a57fa969d
diff-editor: pass reference to store into apply_diff_builtin()
...
It's cheap to copy an `Arc` and it's simpler to pass just a reference.
2024-06-10 13:19:37 +09:00
Ilya Grigoriev
b8d0cf31b8
docs install_and_setup: move Arch Linux after From Source
...
I am not sure how to order the other entries, but "From Source" seems to
me like the most important one.
2024-06-09 10:15:16 -07:00
Ilya Grigoriev
5d57cf1977
docs: disable main
and nightly
aliases for prerelease
version
...
This is an alternative to https://github.com/martinvonz/jj/pull/3732 . I
think it's pretty important to show the "latest" alias. I don't know a
way to not show any alias for "prerelease" in the version selector
without deleting all of them.
I'll have to then separately delete the directories for the aliases on
the gh-pages branch, so that the URL does not resolve to outdated pages.
The downsides are: this will break https://martinvonz.github.io/jj/main/ ... and
(only recently created) https://martinvonz.github.io/jj/nightly/ ... links. We
won't have an always-on demo of how well aliases work for when and if we adjust
how aliases (including the all-important latest alias) work in the future.
However, expanding on #3732 (comment), mike is now randomly alternating between
"nightly" and "main" being the first alias of prerelease (it never promised that
the set of aliases would be ordered). So, the version selector keeps switching
in which version it shows. Previously, this only affected the prerelease docs,
but now it also affects https://martinvonz.github.io/jj/latest/ .
2024-06-08 23:21:00 -07:00
Martin von Zweigbergk
65a988e3d2
merged_tree: make tree builder attempt to resolve conflicts
...
As we discovered in the `jj fix` tests,
`MergedTreeBuilder::write_tree()` doesn't try to resolve conflicts,
not even trivial ones. This patch fixes that.
2024-06-08 20:29:30 +09:00
Martin von Zweigbergk
2e6a0f9e96
merged_tree: make resolve()
also simplify the result
...
This changes the documented behavior of `resolve()` since it was
previously documented to not change the arity unless all conflicts
were resolved.
I plan to use `resolve()` from `MergedTreeBuilder::write_tree()`.
2024-06-08 20:29:30 +09:00
Martin von Zweigbergk
776b2d981f
merged_tree: make resolve()
return a MergedTree
...
It seems like a method on `MergedTree` should return another
`MergedTree` when reasonable. I'm not sure why I made it return a
`Merge<Tree>` instead.
2024-06-08 20:29:30 +09:00
Martin von Zweigbergk
6ab9d7bdc7
merged_tree: make resolve()
on legacy tree an error
...
The current implementation of `resolve()` on legacy trees just
pretended any conflicts were regular files. It's better to error
out. The function is only used in tests so far.
2024-06-08 20:29:30 +09:00
Yuya Nishihara
660a917aaa
revset: remove deprecated "program" rule, rename "program_with_modifier"
2024-06-08 12:48:46 +09:00
Yuya Nishihara
eda7069aee
revset: represent program modifier as AST node
...
The goal is to remove special case from parsing functions and provide slightly
better error message. I don't know if we'd want to use "all:" in aliases, but
there are no strong reasons to disable it.
2024-06-08 12:48:46 +09:00
Yuya Nishihara
3c1f6d5b5d
revset: insert AST-level representation of program modifier
2024-06-08 12:48:46 +09:00
dependabot[bot]
c51591bb4d
cargo: bump the cargo-dependencies group with 3 updates
...
Bumps the cargo-dependencies group with 3 updates: [clap](https://github.com/clap-rs/clap ), [clap_complete](https://github.com/clap-rs/clap ) and [clap_complete_nushell](https://github.com/clap-rs/clap ).
Updates `clap` from 4.5.4 to 4.5.6
- [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.4...v4.5.6 )
Updates `clap_complete` from 4.5.2 to 4.5.4
- [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.2...clap_complete-v4.5.4 )
Updates `clap_complete_nushell` from 4.5.1 to 4.5.2
- [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_nushell-v4.5.1...clap_complete_nushell-v4.5.2 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: clap_complete
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: clap_complete_nushell
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-07 16:10:31 +00:00
Yuya Nishihara
d2efd89135
docs: clarify that revset parents and children can be empty
...
I just added "can be empty" since it seems obvious when it becomes empty if it
can be empty. AFAICT, the confusion in #3821 is whether or not "no parents"
falls back to root().
2024-06-07 11:27:37 +09:00
Yuya Nishihara
186f639dfb
docs: sort list of operators in order of binding strengths
...
We can add a separate precedence/associativity table, but I think the ordered
list is good enough. Nullary :: and .. have no binding, but inserted after the
infix versions for brevity.
2024-06-07 11:27:37 +09:00
dploch
539edad216
diff_util: don't panic for file hashes < 10 hex chars
2024-06-06 11:50:59 -04:00
Martin von Zweigbergk
9fb5307b78
changelog: sort names in 0.18 release notes
2024-06-06 19:46:55 +09:00
Théo Daron
db8f655fe5
changelog: fix @tdaron username
2024-06-06 10:30:08 +02:00
mlcui
f2da2074cc
changelog: Fix @mlcui-corp username
...
I have renamed myself from @mlcui-google to @mlcui-corp, but the
changelog still had the old username.
(That username is now taken by a squatter...)
2024-06-06 14:11:14 +10:00
Austin Seipp
33ac9bca6c
release: version 0.18.0
2024-06-05 18:09:20 -05:00
Michael Gattozzi
3bc361a8b9
cli: add --allow-empty-description flag to push
...
This commit adds an optional flag to be able to push commits with an
empty description to a remote git repo. While the default behavior is
ideal we might need to interact with a repo that has an empty commit
description in it. I ran into this issue a few weeks ago pushing commits
from an open source repo to an empty repo and had to go back to using
git for that push as I would not want to rewrite the history which was
many many years long just for that.
This flag allows users an escape hatch for pushing empty descriptions
for commits and they're sure that they want that behavior.
This commit adds the flag to the `git push` command and updates the docs
for the command. It also updates the original test to make sure that the
flag works as intended to reject the commit when not set and to allow
the commit when the flag is set.
Closes #2633
2024-06-05 14:58:36 -04:00
Benjamin Tan
a3c6a9b1b7
new: allow --insert-before
and --insert-after
simultaneously
2024-06-05 19:29:27 +08:00
Benjamin Tan
bbadc6f14f
new: extract out ensure_no_commit_loop
function
2024-06-05 19:29:27 +08:00
Benjamin Tan
256a51f835
new: convert --insert-before
and --insert-after
into proper options
2024-06-05 19:29:27 +08:00
Benjamin Tan
f74618f41d
new: refactor creation of new commit into common code path
2024-06-05 19:29:27 +08:00
Benjamin Tan
a45a505b66
new: avoid manual unwrap()
call
2024-06-05 19:29:27 +08:00
dependabot[bot]
ccf25a5d56
cargo: bump unicode-width in the cargo-dependencies group
...
Bumps the cargo-dependencies group with 1 update: [unicode-width](https://github.com/unicode-rs/unicode-width ).
Updates `unicode-width` from 0.1.12 to 0.1.13
- [Commits](https://github.com/unicode-rs/unicode-width/compare/v0.1.12...v0.1.13 )
---
updated-dependencies:
- dependency-name: unicode-width
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-05 10:41:30 +09:00
dependabot[bot]
9635f0a846
github: bump the github-dependencies group with 3 updates
...
Bumps the github-dependencies group with 3 updates: [DeterminateSystems/nix-installer-action](https://github.com/determinatesystems/nix-installer-action ), [DeterminateSystems/magic-nix-cache-action](https://github.com/determinatesystems/magic-nix-cache-action ) and [github/codeql-action](https://github.com/github/codeql-action ).
Updates `DeterminateSystems/nix-installer-action` from 11 to 12
- [Release notes](https://github.com/determinatesystems/nix-installer-action/releases )
- [Commits](8cdf194da9...7993355175
)
Updates `DeterminateSystems/magic-nix-cache-action` from 6 to 7
- [Release notes](https://github.com/determinatesystems/magic-nix-cache-action/releases )
- [Commits](87e8236f46...b46e247b89
)
Updates `github/codeql-action` from 3.25.7 to 3.25.8
- [Release notes](https://github.com/github/codeql-action/releases )
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md )
- [Commits](f079b84933...2e230e8fe0
)
---
updated-dependencies:
- dependency-name: DeterminateSystems/nix-installer-action
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: github-dependencies
- dependency-name: DeterminateSystems/magic-nix-cache-action
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: github-dependencies
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: github-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-05 10:41:03 +09:00
Yuya Nishihara
8745c01f98
revset: rename parse_expression_rule() to lower_expression()
...
As I said, revset has another symbol resolution stage. That's why this function
isn't called resolve_expression().
2024-06-05 10:39:32 +09:00
Yuya Nishihara
9f33d13dfd
revset: replace ParseState with &RevsetParseContext
...
There's no longer a mutable state to be tracked.
2024-06-05 10:39:32 +09:00
Yuya Nishihara
cbffa17bf0
revset: move primitive typed expression helpers to parser module
2024-06-05 10:39:32 +09:00
Yuya Nishihara
e383d41d22
revset: rename typed expression helpers
...
This is the naming convention we use in templater. These helper functions no
longer requires the passed node is a function argument.
2024-06-05 10:39:32 +09:00
Yuya Nishihara
b281bcd5cb
revset: inline invalid_arguments() constructor
...
There are only two callers, and this change might help if we want to extract
parse_function_call_node() to dsl_util.
2024-06-05 10:39:32 +09:00
Yuya Nishihara
14421ac126
revset: omit function name from type error messages
...
This simplifies the interface of helper functions. While revset doesn't have
top-level string pattern or integer literal, these parsing helpers could be
used to parse array subscript or n-th parent operator if any.
2024-06-05 10:39:32 +09:00
Yuya Nishihara
e9db051b84
cli: git: split loop that collects push directions and new targets
...
Just a minor code cleanup.
2024-06-05 10:39:17 +09:00
Danny Hooper
3050685ff3
cli: implement enough of jj fix
to run a single tool on all files
2024-06-04 14:28:21 -05:00
Danny Hooper
bbd9ba31df
lib: move command variable interpolation from merge tools to generic location
2024-06-04 14:28:21 -05:00
Danny Hooper
1ece76d128
cli: add a fake code formatter tool for testing
2024-06-04 14:28:21 -05:00
Martin von Zweigbergk
650eeb8935
cli: add jj fix
proof of concept
2024-06-04 14:28:21 -05:00
Yuya Nishihara
fcc0b86f0a
docs: fix another missing shell quoting around root()
...
We've turned the "root" symbol into a function before. That's probably why.
2024-06-04 21:19:16 +09:00
Matthew Davidson
88cb56d3dd
docs: Fix zsh-breaking logging example
2024-06-04 20:44:11 +09:00
Yuya Nishihara
3a4258916c
revset: inline parse_function_call_args()
...
The separate function looked rather verbose.
2024-06-04 09:56:21 +09:00
Yuya Nishihara
8a4abee87d
revset: insert named "function" rules
...
This patch copies function rule processing from templater and fileset. Since
function and identifier rules are quite different, it's better to not rely on
the subtle difference between identifier and function_name tokens.
2024-06-04 09:56:21 +09:00
Yuya Nishihara
127e4d3455
revset: flatten symbol rule
...
This makes it clear that the identifier node is special. For the other
constructs, we don't distinguish between bare symbol and quoted string.
2024-06-04 09:56:21 +09:00