dependabot[bot]
67258d52e7
cargo: bump the cargo-dependencies group with 3 updates
...
Bumps the cargo-dependencies group with 3 updates: [bytes](https://github.com/tokio-rs/bytes ), [clap_complete](https://github.com/clap-rs/clap ) and [chrono](https://github.com/chronotope/chrono ).
Updates `bytes` from 1.4.0 to 1.5.0
- [Release notes](https://github.com/tokio-rs/bytes/releases )
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md )
- [Commits](https://github.com/tokio-rs/bytes/compare/v1.4.0...v1.5.0 )
Updates `clap_complete` from 4.4.0 to 4.4.1
- [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.4.0...clap_complete-v4.4.1 )
Updates `chrono` from 0.4.29 to 0.4.30
- [Release notes](https://github.com/chronotope/chrono/releases )
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md )
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.29...v0.4.30 )
---
updated-dependencies:
- dependency-name: bytes
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-dependencies
- dependency-name: clap_complete
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: chrono
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-09-07 15:44:04 +00:00
Vamsi Avula
ddb6e1b954
cli: label working copies when writing commit summaries
2023-09-07 12:43:58 +05:30
Yuya Nishihara
c4769e0b7c
revset: translate symbol rules in error message
...
Since we have overloaded operator symbols, we need to deduplicate them
upfront. Legacy and compat operators are also removed from the suggestion.
It's a bit ugly to mutate the error struct before calling Error::renamed_rule(),
but I think it's still better than reimplementing message formatting function.
2023-09-07 15:29:39 +09:00
Martin von Zweigbergk
a422fd7f67
cargo: add version number to jj-lib
dependency
...
This is required for `cargo publish`. It seems better to have it
tracked than to do add it whenever we publish.
2023-09-06 17:20:31 -07:00
Ilya Grigoriev
2911f414bd
docs: remove v0.7.0 shell completion instructions
...
Now that v0.9.0 is released, it seems appropriate.
2023-09-06 15:35:01 -07:00
Martin von Zweigbergk
d047512115
docs: prefer new revset operator ::
over deprecated :
...
Now that we're very close to a release, it should be fine to use the
new syntax in our documentation. This effecttively backs out
37436f7344
.
2023-09-06 13:09:14 -07:00
Martin von Zweigbergk
bafd1b568e
changelog: more orphan entries under headings
2023-09-06 11:32:48 -07:00
Martin von Zweigbergk
c7d1932546
release: release version 0.9.0
...
Thanks to everyone who's contributed!
2023-09-06 10:57:57 -07:00
Ilya Grigoriev
18bcc87794
docs: make co-located repos more prominent, more details
...
At this point, they are stable enough that I think we should
advertise them and encourage their use. This also explains
some caveats.
2023-09-06 09:15:27 -07:00
Ilya Grigoriev
be8be2e55a
docs: More info about syncing jj
repo with rsync
...
This will be used for context in the next commit
Includes a mention of
https://github.com/martinvonz/jj/issues/2193 .
2023-09-06 09:15:27 -07:00
Martin von Zweigbergk
7c8f66ab0c
cli: make jj abandon
print commit info as it was before the command
...
As we discussed in #1928 , it seems better to print information about
abandoned commits in the context of the pre-abandon state. For
example, that means that we'll include any branches that pointed to
the now-abandoned commits.
2023-09-05 21:51:32 -07:00
Yuya Nishihara
a868b2d9a5
revset: do not lookup unimported tags or remote branches by unqualified name
...
Since e7e49527ef
"git: ensure that remote branches never diverge", the last
known "refs/remotes" ref should be synced with the corresponding remote branch.
So we can always trust the branch@remote expression. We don't need "refs/tags"
lookup either since tags should have been imported by git::import_refs().
FWIW, I'm thinking of reorganizing view.git_refs() map as per-remote views.
It would be nice if we can get rid of revsets and template keywords exposing
low-level Git ref primitives.
2023-09-06 13:42:22 +09:00
Yuya Nishihara
4e6323c0a4
revset: add basic test for tag name resolution
2023-09-06 13:42:22 +09:00
Yuya Nishihara
8f4512b109
git: rename local variables in diff_refs_to_export()
...
old/new_branch sounds like a branch name, but it's a RefTarget. And
jj_known_refs_passing_filter may contain "new" ref names.
2023-09-06 08:17:49 +09:00
Yuya Nishihara
119cc88832
git: extract calculation step from export_some_refs()
...
export_some_refs() is big, let's split it to functions of reasonable size.
2023-09-06 08:17:49 +09:00
Yuya Nishihara
89f1d83a22
git: do not export new ref if racy process created one with the same name
...
Since we've checked the ref doesn't exist in this code path, I think it's
better to not overwrite the existing ref.
2023-09-06 08:17:49 +09:00
Yuya Nishihara
a4dd598e3e
git: extract helper that exports single updated ref
2023-09-06 08:17:49 +09:00
Yuya Nishihara
d1a08782c9
git: extract helper that exports single deleted ref
2023-09-06 08:17:49 +09:00
Yuya Nishihara
7282b517e8
git: remove stale TODO comment about FailedRefExportReason
2023-09-06 08:17:49 +09:00
Philip Metzger
f131dc9814
commands: Implement next
and prev
...
This is a naive implementation, which cannot deal with multiple children
or parents stemming from merges.
Note: I gave each command separate a separate argument struct
for extensibility.
Fixes #878
2023-09-05 23:13:39 +02:00
Philip Metzger
8dda7e21e0
revsets: Add descendants_at
and ancestors_at
...
They are needed for `next` and `prev`.
They behave symmetrically for parents and children.
2023-09-05 23:13:39 +02:00
dependabot[bot]
57f46a4bb7
cargo: bump the cargo-dependencies group with 1 update
...
Bumps the cargo-dependencies group with 1 update: [chrono](https://github.com/chronotope/chrono ).
- [Release notes](https://github.com/chronotope/chrono/releases )
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md )
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.28...v0.4.29 )
---
updated-dependencies:
- dependency-name: chrono
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 16:13:02 +00:00
Martin von Zweigbergk
2b9c9d22cf
cli: make it allowed to have a branch on the root commit again
...
Closes #1529 .
2023-09-04 20:08:11 -07:00
Martin von Zweigbergk
f198a1e5f9
git: skip branches on root commit on export
...
Git doesn't have a root commit, so we should skip branches pointing to
it on export, just like we do with conflicted branches (which Git also
doesn't support).
2023-09-04 20:08:11 -07:00
Martin von Zweigbergk
4ea6b4a75b
cli: make hint about foo
and foo/bar
branches more targeted
...
Many failure to export refs to Git are not about conflicts between a
branch named `foo` and a branch named `foo/bar`, so don't give that
hint in most cases.
2023-09-04 20:08:11 -07:00
Martin von Zweigbergk
ef550a9d6d
git: include reason for each failed ref export
2023-09-04 20:08:11 -07:00
Martin von Zweigbergk
f6c24fbcef
git: return refs that failed to export in sorted order
...
Before this patch, the order would depend on the reason we failed to
export a ref, because we would add to the `failed_branches` list in
several different places. What's worse, when the export failed because
the branch was conflicted or had an invalid name (from Git's
perspective), it was non-deterministic because we iterated over a
HashSet. This patch fixes that by sorting at the end.
Note that we still want the `branches_to_update` map to be a
`BTreeMap` so we update branches in deterministic order. Otherwise the
error when trying to export both branches `main` and `main/sub` will
become non-deterministic.
2023-09-04 20:08:11 -07:00
Yuya Nishihara
b0c8e9ef62
revset: add 0-ary "::" and ".." operators as short for "all()" and "~root()"
...
Suppose "x::y" is the operator that defaults to "root()::visible_heads()"
respectively, "::" is identical to "all()". Since we've just changed the
behavior of "..y", ".." is now "root()..visible_heads()" meaning "~root()".
2023-09-05 10:40:04 +09:00
Yuya Nishihara
6b2ad23f8f
revset: evaluate "..y" expression to "root()..y"
...
This seems useful since the root commit is often uninteresting. It's also
consistent with "x::y" in a way that the left operand defaults to "root()".
2023-09-05 10:40:04 +09:00
Yuya Nishihara
f2c1697362
revset: fix comment about "@" expression
2023-09-05 10:40:04 +09:00
dependabot[bot]
0fa6d132ab
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 [thiserror](https://github.com/dtolnay/thiserror ).
Updates `regex` from 1.9.4 to 1.9.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.9.4...1.9.5 )
Updates `thiserror` from 1.0.47 to 1.0.48
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.47...1.0.48 )
---
updated-dependencies:
- dependency-name: regex
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>
2023-09-04 13:39:27 -07:00
dependabot[bot]
d420ca06d0
github: bump the github-dependencies group with 1 update
...
Bumps the github-dependencies group with 1 update: [actions/checkout](https://github.com/actions/checkout ).
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v3...3df4ab11eba7bda6032a0b82a6bb43b11571feac )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: github-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 13:39:04 -07:00
Yuya Nishihara
e3c85d6ecc
revset: convert root symbol to function
...
The idea is that we can fully eliminate special symbols that would otherwise
shadow user branches, tags, or change ID prefixes.
Closes #2095
2023-09-04 10:36:30 +09:00
Yuya Nishihara
c08fab60da
docs: update description of @ revset expression, mention name@remote syntax
...
Since I'm going to remove the root symbol, it doesn't make sense to leave
@ in the priority list.
2023-09-04 10:36:30 +09:00
Yuya Nishihara
4394bf8de8
templater: add boolean literals
...
They are implemented as literal expressions so that user cannot override
them by false and true aliases.
2023-09-03 07:01:40 +09:00
Yuya Nishihara
08e66fb7d4
templater: fix span of method call expression
...
Spotted while experimenting with field expression. This span is unused,
so no test output changes.
2023-09-03 07:01:40 +09:00
Martin von Zweigbergk
e3825495e3
store: don't include cached objects in Debug
format
...
I was looking into some overly verbose logs and happened to notice
that `Store` uses the default derived, which presumably means it's
going to include all objects in its cached. Just including the
backend's debug string seems enough.
2023-09-01 16:49:23 -07:00
Martin von Zweigbergk
16c897d8b4
conflicts: leverage Merge::map()
in materialize_merge_result()
2023-09-01 16:23:39 -07:00
Yuya Nishihara
e36237426a
cli: elide path in snapshot progress in the same way
2023-09-02 08:21:33 +09:00
Yuya Nishihara
1c7d2b9a96
cli: make diff stat calculate path length based on unicode width
2023-09-02 08:21:33 +09:00
Yuya Nishihara
643b2d4974
cli: include both ascii and non-ascii file names in diff stat test
...
ASCII file names can be used as reference widths.
2023-09-02 08:21:33 +09:00
Yuya Nishihara
3d54df9806
cli: add helper to elide text from left
...
I don't think this implements unicode layout stuff thoroughly, but it can at
least handle Latin and unambiguous East-Asian characters.
2023-09-02 08:21:33 +09:00
Martin von Zweigbergk
b8f71a4b30
working_copy: in LockedWorkingCopy::drop()
, discard unsaved changes
...
In `LockedWorkingCopy::drop()`, we panic if the caller had not called
`finish()`. IIRC, the idea was both to find bugs where we forgot to
call `finish()` and to prevent continuing with a modified
`WorkingCopy` instance. I don't think the former has been a problem in
practice. It has been a problem in practice to call `discard()` to
avoid the panic, though. To address that, we can make the `Drop`
implementation discard the changes (forcing a reload of the state if
the working copy is accessed again).
2023-09-01 12:25:47 -07:00
Martin von Zweigbergk
f3a16eb964
cli: add hint when snapshot fails due to large file
...
I also converted the error from `InternalError` to `UserError`. So far
I've intented to use `InternalError` only to indicate bugs or corrupt
repos. I'm not sure that's a good idea, and we can revisit it later.
2023-09-01 12:25:47 -07:00
dependabot[bot]
c329cc0dc1
cargo: bump the cargo-dependencies group with 2 updates
...
Bumps the cargo-dependencies group with 2 updates: [clap](https://github.com/clap-rs/clap ) and [rustix](https://github.com/bytecodealliance/rustix ).
Updates `clap` from 4.4.1 to 4.4.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/v4.4.1...v4.4.2 )
Updates `rustix` from 0.38.10 to 0.38.11
- [Release notes](https://github.com/bytecodealliance/rustix/releases )
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.10...v0.38.11 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: rustix
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-09-01 16:08:12 +00:00
Martin von Zweigbergk
5ef0be73c1
merged_tree: allow building trees with variable-arity overrides
...
When restoring (`jj restore`) a 3-sided conflict from one tree into a
2-sided tree (or a resolved tree), we'll need to extend the size arity
of the target tree to that of the source tree. I had not considered
this case before. This patch relaxes the constraint in
`MergedTreeBuilder` to allow such cases. The additional trees are
based on empty trees with only the larger overrides in them.
2023-09-01 06:09:37 -07:00
Martin von Zweigbergk
d29c831ef9
merge: add a function for padding a Merge
to a given size
...
This will be useful for padding merge objects in `MergedTreeBuilder`
to the size of the widest override.
2023-09-01 06:09:37 -07:00
Ilya Grigoriev
772e2b8be6
GitHub release action: publish HTML docs in an archive
2023-08-31 20:44:08 -07:00
Ilya Grigoriev
bfe4240b67
GitHub release action: minor cleanup for consistency with next commit
2023-08-31 20:44:08 -07:00
Martin von Zweigbergk
b18c97aa12
cli: trim path in diff stat if it's long, to give room for stat
...
If the path is too long to fit on the screen, this patch makes it so
we elide the first part of it. It goes a bit further and trims it down
to ~70% of the screen, giving some room for the stat. This seems
somewhat similar to what Git does.
2023-08-31 16:26:43 -07:00