Commit graph

14 commits

Author SHA1 Message Date
Samuel Tardieu
46e2723464 style: inline variables into format strings 2024-10-04 22:29:13 +02:00
Martin von Zweigbergk
1aa2aec141 bookmarks: update some leftover uses of the word "branch" 2024-09-11 19:19:31 -07:00
Matt Kulukundis
8ead72e99f formatting only: switch to Item level import ganularity 2024-08-22 14:52:54 -04:00
Danny Hooper
8fe2274584 fake-formatter: add --uppercase and --append formatting behaviors
This allows tests to easily distinguish the effects of multiple formatters that
could be applied during a single `jj fix` command, which is helpful for testing
the feature for configuring multiple formatters on potentially overlapping
filesets.

Uppercase is a counterpart to lowercase. Append exposes the number of changes
and their order of execution in the file content, which provides a terse way of
writing test expectations.
2024-07-25 13:40:18 -05:00
Scott Taylor
b27ff28956 cli: skip formatting instructions if not required
`tx.format_commit_summary()` can be expensive because it needs to build
an IdPrefixContext now, so it's best to avoid formatting instruction
messages unless they are actually required.
2024-07-09 20:24:14 -05:00
Matt Kulukundis
aaa99e6dc7 diff: add a file-by-file variant for external diff tools 2024-07-03 20:09:17 -04:00
mlcui
3bca159b1a fake-editor: replace expectpath with dump-path
This allows us to assert the expected path in the test itself, rather
than in the fake editor.
2024-07-02 11:15:44 +10:00
Danny Hooper
1ece76d128 cli: add a fake code formatter tool for testing 2024-06-04 14:28:21 -05:00
Yuya Nishihara
8b32a8a916 revset: add support for file(kind:pattern) syntax
There are no more callers of parse_function_argument_to_string(), so it's
removed. This function was a thin wrapper of literal parser, and can be
easily reintroduced if needed.
2024-04-07 19:43:29 +09:00
Yuya Nishihara
50363419fb revset: substitute '~(::x)' to 'x..'
Suppose we have an alias 'immutable()' = '::immutable_heads()', user can
express (visible) mutable set as '~immutable()'. 'immutable_heads()..' can
terminate early, but a generic difference 'all() & ~immutable()' can't.
2024-03-17 14:50:48 +09:00
Yuya Nishihara
9207314173 revset: add substitution rule for "::x & ~(::y-)"
Suppose the generation value is usually small, it should be faster to do
bounded range look up first 'y-', then walk ancestors with the unwanted set
'y-..x'.
2024-03-17 14:50:48 +09:00
Yuya Nishihara
f21c078249 revset: ad-hoc optimization for range queries containing unwanted wanted heads
In my linux stable mirror, this makes the default log revset evaluation super
fast. immutable_heads(), if configured properly, includes many historical
branch heads which are also the visible heads.

revsets/immutable_heads()..
---------------------------
0     12.27     117.1±0.77m
3      1.00       9.5±0.08m
2024-02-22 23:26:29 +09:00
Ilya Grigoriev
e743ba78b0 fake_diff_editor: Allow specifying extra arguments to be ignored 2023-08-21 20:19:15 -07:00
Austin Seipp
48fa821e60 cli: move src/ directory to new cli/ directory
Summary: In preparation for unifying all workspace dependencies across all
crates, let's go ahead and move the jj-cli crate into its own new directory.
This will also be a nicer and more uniform layout as we add new `jj-*` crates.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Change-Id: Icf94e7ae5f290dc8e181215727b38ada
2023-08-04 19:00:42 -05:00