Yuya Nishihara
4db068e7f7
templater: expose RefTarget methods through RefName type
...
I considered adding RefTarget template type, but some of the methods naturally
fit to RefName. For example, a conflicted branch name is decorated as "??", so
it makes sense to add branch.conflict() instead of branch.target().conflict().
I'm not pretty sure how many RefName methods we'll need to add to port the
current branch listing, but there will be .tracked(), .tracking_local_present(),
.ahead_by(), and .behind_by().
2024-05-03 15:16:52 +09:00
Yuya Nishihara
520b4db919
cli: colorize tag name in "tag list" output
...
"working_copy tag" wouldn't be needed, but is added for consistency.
2024-05-03 15:16:52 +09:00
Yuya Nishihara
1ce3e9fe44
cli: migrate "tag list" to template
...
I'm going to add more detailed output there. This is a step towards "branch
list" template. "tag list -T" wouldn't be that useful, but it shares primitives
with "branch list -T".
2024-05-03 15:16:52 +09:00
Yuya Nishihara
d1458b55d2
tests: simplify local repo setup in test_tag_list()
...
I'll update the test to include conflicted tag, which can't be easily set up
by fetching from remote.
2024-05-03 15:16:52 +09:00
Yuya Nishihara
8abcbd659a
templater: add RefName::local_only() constructor
...
It will be called from cmd_tag_list().
2024-05-03 15:16:52 +09:00
Yuya Nishihara
35e550e863
templater: store associated RefTarget in RefName struct
...
I'm going to add ref_name.target*() template methods so the commit templater
can be reused for branches/tags templates. RefTarget could be looked up by
(name, kind) pair, but it's simpler to store it in RefName.
2024-05-03 15:16:52 +09:00
Charles Crete
d9d60118a3
docs: update tutorial to include :builtin
diff editor instructions
2024-05-02 23:04:40 -04:00
dependabot[bot]
7083530727
cargo: bump serde in the cargo-dependencies group
...
Bumps the cargo-dependencies group with 1 update: [serde](https://github.com/serde-rs/serde ).
Updates `serde` from 1.0.199 to 1.0.200
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.199...v1.0.200 )
---
updated-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-02 15:31:35 -07:00
Martin von Zweigbergk
19563fee74
release: release version 0.17.0
...
Thanks to everyone who's contributed!
Unlike previous releases, I went through the changelog entries and
reorganized them a bit.
We didn't have anything under "Deprecations" this time, but I moved
the heading after "Breaking changes" for next release. I think
breaking changes are more important because deprecations are just
about giving a heads up before it actually breaks.
2024-05-01 10:10:01 -07:00
dependabot[bot]
28e3751250
cargo: bump the cargo-dependencies group with 2 updates
...
Bumps the cargo-dependencies group with 2 updates: [pest](https://github.com/pest-parser/pest ) and [pest_derive](https://github.com/pest-parser/pest ).
Updates `pest` from 2.7.9 to 2.7.10
- [Release notes](https://github.com/pest-parser/pest/releases )
- [Commits](https://github.com/pest-parser/pest/compare/v2.7.9...v2.7.10 )
Updates `pest_derive` from 2.7.9 to 2.7.10
- [Release notes](https://github.com/pest-parser/pest/releases )
- [Commits](https://github.com/pest-parser/pest/compare/v2.7.9...v2.7.10 )
---
updated-dependencies:
- dependency-name: pest
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: pest_derive
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-05-01 19:07:23 +02:00
Alexis (Poliorcetics) Bourget
52e494dcf2
cli: status: when current change has conflicts, display instructions to resolve them
2024-05-01 15:59:12 +02:00
Martin von Zweigbergk
0d1ff8a150
merged_tree: propagate errors from TreeEntriesIterator
...
We shouldn't panic if we fail to read a tree from the backend.
2024-05-01 06:10:08 -07:00
Martin von Zweigbergk
7093d5d359
squash: don't use unchanged source commit as predecessor
2024-04-30 20:03:57 -07:00
Martin von Zweigbergk
09b960538a
squash: don't rewrite commits that didn't change
...
Closes #3334
2024-04-30 20:03:57 -07:00
Martin von Zweigbergk
2bd2358d6a
squash: move updating of source commits out of diff-editing loop
...
This is just a little refactoring to prepare for using
`transform_descendants()`.
2024-04-30 20:03:57 -07:00
Martin von Zweigbergk
7319479df9
squash: decide to abandon source commit if entire diff was selected
...
Before this patch, we would abandon the source commit if it became
empty after applying the reverse diff. This changes that condition to
the equivalent condition of the selected tree being the source
commit's original tree. This will help us rewrite the code to use
`transform_descendants()`.
2024-04-30 20:03:57 -07:00
Martin von Zweigbergk
dbf2a98903
rewrite: add CommitRewriter::record_abandoned_commit()
...
We already have two uses for this function and I think we're soon
going to have more.
The function record the old commit as abandoned with the new parents,
which is typically what you want. We could record it as abandoned with
the old parents instead but then we'd have to do an extra iteration to
find the parents when rebasing any children. It would also be
confusing if
`rewriter.set_parents(new_parents).record_abandoned_commit()` didn't
respect the new parents.
2024-04-30 20:03:57 -07:00
Martin von Zweigbergk
8c2c319f77
squash: add more tests of no-op squashing
...
We didn't have any tests with `jj squash` with multiple source commits
and no matching paths.
2024-04-30 20:03:57 -07:00
Benjamin Tan
f1f84544fb
rebase: do not print out commit summaries of skipped commits
2024-05-01 01:35:25 +08:00
dependabot[bot]
b8e08d644c
cargo: bump libc from 0.2.153 to 0.2.154 in the cargo-dependencies group
...
Bumps the cargo-dependencies group with 1 update: [libc](https://github.com/rust-lang/libc ).
Updates `libc` from 0.2.153 to 0.2.154
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.153...0.2.154 )
---
updated-dependencies:
- dependency-name: libc
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 15:45:51 +00:00
Jonathan Lorimer
e54e83b0f5
docs: Add information about configuring delta pager
...
docs: Add information about configuring delta pager
docs: only mention pager, not diff
2024-04-29 10:22:05 -07:00
dependabot[bot]
af95c788af
cargo: bump the cargo-dependencies group with 2 updates
...
Bumps the cargo-dependencies group with 2 updates: [serde](https://github.com/serde-rs/serde ) and [unicode-width](https://github.com/unicode-rs/unicode-width ).
Updates `serde` from 1.0.198 to 1.0.199
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.198...v1.0.199 )
Updates `unicode-width` from 0.1.11 to 0.1.12
- [Commits](https://github.com/unicode-rs/unicode-width/compare/v0.1.11...v0.1.12 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-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-04-29 18:15:13 +02:00
Charles Crete
c8123e1555
docs: mention obslog in tutorial
2024-04-29 08:40:05 -07:00
Yuya Nishihara
6a208e7af7
doc: fix typo of contained_in() template method
2024-04-29 22:56:44 +09:00
Noah Mayr
dc693e7b8f
template: add contained_in method to commit object in templates
...
this allows to conditionally display or label elements depending on
whether the given commit is contained within the revset
2024-04-29 12:16:42 +02:00
Benjamin Tan
0e2e09a593
rebase: allow both --insert-after
and --insert-before
options to be used simultaneously
2024-04-29 14:19:09 +08:00
Benjamin Tan
f75461efc1
rebase: add --insert-after
and --insert-before
options for --revisions
2024-04-29 14:19:09 +08:00
Benjamin Tan
714bc0a9e6
rebase: add move_commits
function to perform rebasing
...
The `move_commits` function accepts a set of target commits to shift to
a new location given by `new_parents` and `new_children`. The roots of
the target set will be reparented onto `new_parents`. `new_children`
will then be reparented onto the heads of the target set.
The commits will be rebased in reverse topological order based on the
new set of parents of each commit, which avoids the need for multiple
sets of rebase operations.
2024-04-29 14:19:09 +08:00
Martin von Zweigbergk
492dd99ba5
squash: add test that immutable commits are respected for --from/--into
2024-04-28 13:06:37 -07:00
Martin von Zweigbergk
9503179ea4
tests: avoid a use of deprecated jj move
2024-04-28 11:12:51 -07:00
Benjamin Tan
6752402113
rebase: allow -r
to accept multiple revisions
2024-04-26 23:51:52 +08:00
dploch
586ab1f076
revset: add a SymbolResolverExtension trait to provide custom resolvers
2024-04-26 10:55:34 -04:00
dploch
0cef90f4f4
examples: simplify commit templater example with Default
2024-04-26 10:55:34 -04:00
dploch
bad9e9e3d7
revset: convert commit and change prefix resolvers into partial symbol resolvers
2024-04-26 10:55:34 -04:00
dploch
7bdf2b3945
revset: homogenize the logic of various symbol resolution steps into a common trait
2024-04-26 10:55:34 -04:00
dploch
cf78532bd8
revset: add two new error variants to support extensions
2024-04-26 10:55:34 -04:00
Martin von Zweigbergk
d13be927a8
cli: add global --ignore-immutable
...
Closes #3576
2024-04-26 06:13:15 -07:00
Yuya Nishihara
c267f55809
templates: remove implicit self dependency from description_placeholder alias
...
Spotted while experimenting with "jj tag list -T". The description_placeholder
alias could be changed to function taking a Commit object, but I feel it's odd.
Conceptually, the placeholder could also be used in "op log" templates.
2024-04-26 16:56:35 +09:00
Yuya Nishihara
dbc7ad2d8e
templates: extract common parts from commit_summary templates
...
If "branch"/"tag list" are migrate to templates, the added alias function
will be called from these templates.
2024-04-26 16:56:35 +09:00
Yuya Nishihara
2bd6983003
templates: reimplement builtin_change_id_with_hidden_and_divergent_info alias
...
This helps extract commit_summary template as an alias function.
2024-04-26 16:56:35 +09:00
Théo Daron
2f45a482a6
fixed usage of old "checkout" command in contributing docs
2024-04-25 09:11:52 -07:00
Yuya Nishihara
a63dbcc329
templater: include actual type name in error messages
2024-04-26 00:57:26 +09:00
Yuya Nishihara
5394f342ce
templater: add type_name() method to tagged property types
...
Suppose we add binary comparison operators, we'll probably need an easy way to
get (lhs, rhs) property types to produce a meaningful error message.
2024-04-26 00:57:26 +09:00
Yuya Nishihara
5b769c5c9e
fileset, revset, templater: add support for single-quoted raw string literals
...
Since fileset/revset/template expressions are specified as command-line
arguments, it's sometimes convenient to use single quotes instead of double
quotes. Various scripting languages parse single-quoted strings in various ways,
but I choose the TOML rule because it's simple and practically useful. TOML is
our config language, so copying the TOML syntax would be less surprising than
borrowing it from another language.
https://github.com/toml-lang/toml/issues/188
2024-04-25 11:14:33 +09:00
Yuya Nishihara
a74bf89df5
revset: reuse parse_symbol_rule_as_literal() to parse string symbol
...
For the same reason as the previous commit. Single-quoted string literal will
be handled there.
2024-04-25 11:14:33 +09:00
Yuya Nishihara
37bd966357
fileset: extract inner function that parses string-like literal
...
I'm going to add single-quoted string literal.
2024-04-25 11:14:33 +09:00
dependabot[bot]
ca02141ba9
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.3 to 4.1.4
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](1d96c772d1...0ad4b8fada
)
---
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-04-24 13:23:17 -05:00
Martin von Zweigbergk
3dad9d4a98
docs: make "Arch Linux" a subheading under "Linux"
...
I think this is how it was supposed to be. The "From Source" section
applies to non-Arch Linuxes too.
2024-04-24 09:22:51 -07:00
Rowan Walsh
16ffe9408c
Fixes grammar issues in docs
2024-04-24 09:12:37 -07:00
Rowan Walsh
f185a838d7
Fixes typo in 'jj git init' args
2024-04-24 09:12:37 -07:00