Yuya Nishihara
83ee6489d9
tests: add partial/multi-source squashes to obslog test
2024-08-07 10:51:23 +09:00
Yuya Nishihara
c99f502c31
tests: leverage "squash -m" in obslog test
2024-08-07 10:51:23 +09:00
Yuya Nishihara
92ba6d336d
cli: op diff: be more strict about multiple diff sources/destinations
...
As the doc comment states, this function only supports change of "a single
added and removed commit", "only a single added", or "single removed commit."
It doesn't make sense to show diffs from the parent commit ignoring multiple
removed commits for example.
2024-08-07 10:51:23 +09:00
Ilya Grigoriev
b42e94906d
jj run: describe it as a stub in the help text
2024-08-06 17:51:01 -07:00
Ilya Grigoriev
132dfd30e2
describe: warn user of limitations when describing multiple commits
...
I think it might be nice to have this in the upcoming release, but I'd
like to warn people that their changes will be lost if they aren't
careful, and to not rely on the syntax being fixed just yet.
2024-08-06 11:28:21 -07:00
Ilya Grigoriev
6d1cc7f803
describe multiple commits: instruct user where to put commit descriptions
...
This seems especially helpful if the descriptions start out empty.
2024-08-06 11:28:21 -07:00
dependabot[bot]
07e9339c6a
github: bump actions/upload-artifact in the github-dependencies group
...
Bumps the github-dependencies group with 1 update: [actions/upload-artifact](https://github.com/actions/upload-artifact ).
Updates `actions/upload-artifact` from 4.3.5 to 4.3.6
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](89ef406dd8...834a144ee9
)
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: github-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-06 11:27:57 -07:00
Ilya Grigoriev
b2123282e8
tutorial: link to Steve Klabnik's tutorial, mention jj log -r ::
...
I was thinking of updating the tutorial in #4168 , but conversations like [this
one on
Discord](https://discord.com/channels/968932220549103686/968932220549103689/1269803837070377076 )
suggest that many people aren't reading it anyway.
So, this is an attempt to quickly patch up the most relevant things before the
upcoming release.
2024-08-06 11:27:08 -07:00
dependabot[bot]
6fc0c7bdce
github: bump the github-dependencies group across 1 directory with 2 updates
...
Bumps the github-dependencies group with 2 updates in the / directory: [actions/upload-artifact](https://github.com/actions/upload-artifact ) and [EmbarkStudios/cargo-deny-action](https://github.com/embarkstudios/cargo-deny-action ).
Updates `actions/upload-artifact` from 4.3.4 to 4.3.5
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](0b2256b8c0...89ef406dd8
)
Updates `EmbarkStudios/cargo-deny-action` from 1.6.3 to 2.0.1
- [Release notes](https://github.com/embarkstudios/cargo-deny-action/releases )
- [Commits](3f4a782664...8371184bd1
)
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: github-dependencies
- dependency-name: EmbarkStudios/cargo-deny-action
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: github-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 23:12:24 -07:00
Ilya Grigoriev
dd67e4921d
github actions: upgrade cargo-deny-action
...
Stolen from Dependabot's https://github.com/martinvonz/jj/pull/4200/
2024-08-05 22:46:31 -07:00
Ilya Grigoriev
1dc0c7698d
cargo-deny: add MPL-2.0 to allowed licenses
...
For some reason, the current version of `cargo-deny-action` does not
require it, but the one in the next commit fails if the license is
not added.
2024-08-05 22:46:31 -07:00
Ilya Grigoriev
6e7a20edd7
cargo-deny: use the new default for deny.toml
...
This is needed because old keys are becoming unsupported in the next
version of the `cargo-deny` action.
This was obtained as follows:
- Run `cargo deny init`
- Modify (only) the `licenses.allow` field to match what we had before.
2024-08-05 22:46:31 -07:00
Martin von Zweigbergk
417f19d58a
docs: minor updates to description of branch conflicts
...
Closes #4220 .
2024-08-05 18:20:37 -07:00
Yuya Nishihara
d061c3782f
merged_tree: remove .diff_summary()
...
There are no non-test callers since 452fecb7c4
"cli: colorize diff summary
and sort by path."
2024-08-06 10:15:44 +09:00
Yuya Nishihara
d435a8a793
tests: compare trees without using .diff_summary()
...
I don't think modification types matter here. Testing paths should be good
enough.
2024-08-06 10:15:44 +09:00
Yuya Nishihara
0b1a6cd9e0
cli: allow any number of trailing dashes in "JJ: describe" line
...
Because a line without " -------" is allowed, it makes sense to strip other
variants like " --".
2024-08-06 10:15:32 +09:00
Yuya Nishihara
fb3e120092
cli: minor style cleanup in parse_bulk_edit_message()
2024-08-06 10:15:32 +09:00
Yuya Nishihara
f7b8a22c66
cli: remove redundant string concatenation from parse_bulk_edit_message()
2024-08-06 10:15:32 +09:00
dependabot[bot]
1d482c71b8
cargo: bump the cargo-dependencies group with 2 updates
...
Bumps the cargo-dependencies group with 2 updates: [dunce](https://gitlab.com/kornelski/dunce ) and [tempfile](https://github.com/Stebalien/tempfile ).
Updates `dunce` from 1.0.4 to 1.0.5
- [Commits](https://gitlab.com/kornelski/dunce/compare/v1.0.4...v1.0.5 )
Updates `tempfile` from 3.10.1 to 3.11.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.10.1...v3.11.0 )
---
updated-dependencies:
- dependency-name: dunce
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: tempfile
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 18:51:04 +02:00
Yuya Nishihara
f4dd856f9f
ui: do not write() to channel if builtin pager has terminated
2024-08-05 10:34:33 +09:00
Yuya Nishihara
ce2bc8d6b6
ui: include error sources in pager warning
...
An error in builtin pager can be nested.
2024-08-05 10:21:23 +09:00
Benjamin Tan
35b04f45dc
describe: allow updating the description of multiple commits
...
If multiple commits are provided, the description of each commit
will be combined into a single file for editing.
2024-08-05 02:06:40 +08:00
Ilya Grigoriev
37ccfd5acc
built-in pager: write a message to the user if pager failed to start
...
The message is printed at the end, any text sent to the pager before
then is lost. See
https://github.com/martinvonz/jj/pull/4197#discussion_r1701799135
for a discussion about why that seems OK.
2024-08-03 17:45:18 -07:00
Yuya Nishihara
9ec617534c
cli: merge op heads and snapshot working copy by "op log" by default
...
This partially reverts 543036c753
"cli: run 'op log' without loading repo or
merging concurrent ops." User can now get around the issue by --at-op=@
--ignore-working-copy.
2024-08-03 09:22:26 +09:00
Yuya Nishihara
5bfb3742e8
cli: migrate trivial uses of op_walk::resolve_op_for_load()
...
Now heads merging can be turned off by --at-op=@.
2024-08-03 09:22:26 +09:00
Yuya Nishihara
2008991749
cli: do not attempt to merge op heads if --at-op=@ is specified
...
The idea is that --at-op specifies a certain operation, so --at-op=@ can be
interpreted as the option to select _the_ known head operation. This helps
eliminate special cases from "op log" which doesn't snapshot nor merge
concurrent ops.
2024-08-03 09:22:26 +09:00
Yuya Nishihara
b290af8e29
op_walk: include operation ids in multiple match error
2024-08-03 09:22:26 +09:00
Yuya Nishihara
e9d744db32
tests: add crash recovery test from bad GC
...
The current "op abandon" and "op log" have workarounds to recover from this
situation. Let's make sure they work as expected.
2024-08-03 09:22:26 +09:00
Yuya Nishihara
cf053b7e09
ui: print :builtin pager suggestion as a hint
2024-08-03 09:14:29 +09:00
Yuya Nishihara
b503ecb071
ui: rewrite request_pager() to return early and use stdout instance
2024-08-03 09:14:29 +09:00
Yuya Nishihara
47a4406f4d
ui: extract finalize_pager() as UiOutput method
2024-08-03 09:14:29 +09:00
Fedor Sheremetyev
c43096ba96
docs: Fix example with Git conflicts markers
2024-08-02 10:36:38 -07:00
dependabot[bot]
32b76a2c0a
cargo: bump the cargo-dependencies group with 2 updates
...
Bumps the cargo-dependencies group with 2 updates: [regex](https://github.com/rust-lang/regex ) and [serde_json](https://github.com/serde-rs/json ).
Updates `regex` from 1.10.5 to 1.10.6
- [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.5...1.10.6 )
Updates `serde_json` from 1.0.121 to 1.0.122
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.121...v1.0.122 )
---
updated-dependencies:
- dependency-name: regex
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-02 18:05:14 +02:00
Martin von Zweigbergk
5b2259445e
FAQ: remove workaround for fixed bug ( #2476 )
2024-08-01 09:07:32 -07:00
Stephen Jennings
6c41b1bef8
revset: add author_date and committer_date revset functions
...
Author dates and committer dates can be filtered like so:
committer_date(before:"1 hour ago") # more than 1 hour ago
committer_date(after:"1 hour ago") # 1 hour ago or less
A date range can be created by combining revsets. For example, to see any
revisions committed yesterday:
committer_date(after:"yesterday") & committer_date(before:"today")
2024-08-01 09:04:07 -07:00
Stephen Jennings
ff9e739798
revset: create DatePattern type
...
Creates a DatePattern type that can be created by parsing a string in any
format supported by the chrono-english crate, including:
- 2024-03-25
- 2024-03-25T00:00:00
- 2024-03-25T00:00:00-08:00
- 2 weeks ago
- 5 minutes ago
- yesterday
- yesterday 5pm
- yesterday 10:30
- yesterday 15:30
- tomorrow
A `kind` can be specified to indicate whether the pattern should match dates at
or after (`after`) or strictly before (`before`) the given instant.
chrono-english supports US and UK dialects to disambiguate mm/dd/yy from
dd/mm/yy, but for now we default to US. This should probably be a config
setting.
2024-08-01 09:04:07 -07:00
dependabot[bot]
8b5ceee180
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 [indexmap](https://github.com/indexmap-rs/indexmap ).
Updates `clap` from 4.5.11 to 4.5.13
- [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.11...v4.5.13 )
Updates `clap_complete` from 4.5.11 to 4.5.12
- [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.11...clap_complete-v4.5.12 )
Updates `indexmap` from 2.2.6 to 2.3.0
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md )
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.2.6...2.3.0 )
---
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: indexmap
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 17:51:43 +02:00
Essien Ita Essien
7c4185cd41
Change conflict hint depending on state of working commit.
...
To avoid always printing the rebase instructions to fix a conflict
even when a child commit to fix the conflict already exists, implement
the following:
* If working commit has conflicts:
* Continue printing the same message we print today.
* If working commit has no conflicts:
* If any parent has conflicts, we print: "Conflict in parent is resolved in working copy".
Also explicitly not printing the "conflicting parent" here, since a merge commit
could have conflict in multiple parents.
* If no parent has any conflicts: exit quietly.
* Update unittests for conflict hinting update.
* Update CHANGELOG
2024-08-01 16:21:24 +01:00
Yuya Nishihara
d0f6f429e1
diff: add "diff" label globally by outer show_diff/patch() functions
...
It's not so important, but this removes duplicated "diff" labels from template
output. Perhaps, this also fixes "diff access-denied" label in file-by-file
external diffs.
The inner show_*() functions no longer add "diff" labels, but that's okay
because all CLI callers (except for the templater) use DiffRenderer.
2024-08-01 22:56:36 +09:00
Yuya Nishihara
07b0b0676d
tests: rerun commit.diff() template test with --color=debug
...
The added test shows the "diff" label is repeated because of auto-labeling of
templater. The original "--color=always" test is also kept to ensure that color
sequences are unchanged even if we remove one of the "diff" labels.
2024-08-01 22:56:36 +09:00
Yuya Nishihara
052f022479
formatter: make error type of with_label() callback generic
...
This will help eliminate push/pop_label() calls from show_diff_*().
2024-08-01 22:56:36 +09:00
Yuya Nishihara
f57a7e5eba
cli: move cmd_config_list() entry point next to Args struct
2024-08-01 09:54:12 +09:00
Yuya Nishihara
9168500341
cli: split commands/config.rs into sub modules
2024-08-01 09:54:12 +09:00
dploch
bfa1ce8936
workspace: make the constructor public
...
This allows constructing a workspace in a custom environment where the standard filesystem API cannot be used
2024-07-31 19:45:37 -04:00
dploch
5f7e3883e8
repo: define a public constructor for RepoLoader
...
This enables the creation of Repo objects in environments without standard filesystem support, by allowing the caller to load the store objects however they see fit. This confines interaction with the filesystem to the WorkingCopy abstractions.
2024-07-31 19:45:37 -04:00
Yuya Nishihara
dc2b5500ff
diff: specify available terminal width by caller, subtract graph width
...
The width parameter is mandatory so it wouldn't fall back to ui.term_width() by
mistake. The API is getting messy and we might want to extract some parameters
to separate struct.
Fixes #4158
2024-08-01 02:03:03 +09:00
Yuya Nishihara
1977748642
ui: fill in default term width globally and return as usize
...
I'm going to add more ui.term_width() callers, and it's unlikely we'll have to
set different defaults or error out.
2024-08-01 02:03:03 +09:00
Yuya Nishihara
b2b86825cb
cli: move cmd_workspace_update_stale() entry point next to Args struct
2024-07-31 10:21:34 +09:00
Yuya Nishihara
21e1ce4f50
cli: split commands/workspace.rs into sub modules
2024-07-31 10:21:34 +09:00
Yuya Nishihara
a39dd0f176
cli: duplicate cmd_workspace_root() to cmd_root()
...
Suppose cmd_root() will gain options to print other kind of root paths, it's
probably simpler to inline path handling there instead of turning cmd_root()
into a dispatcher function. If cmd_root() remains with the current form, maybe
we can add aliases.root = ["workspace", "root"] instead.
2024-07-31 10:21:34 +09:00