mirror of
https://github.com/martinvonz/jj.git
synced 2024-09-11 13:56:29 +03:00
cli: rename obslog
to evolution-log
/evolog
It seems everyone agrees that `obslog` is not an intuitive name. There was some discussion about alternatives in #3592 and on #4146. The alternatives included `evolution`, `evolutionlog`, `evolog`, `rewritelog`, `revlog`, and `changelog`. It seemed like `evolution-log`/`evolog` was the most popular option. That also matches the command's current help text ("Show how a change has evolved over time").
This commit is contained in:
parent
085e17e1cc
commit
c25a9f67f2
@ -12,6 +12,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
### Deprecations
|
||||
|
||||
* `jj obslog` is now called `jj evolution-log`/`jj evolog`. `jj obslog` remains
|
||||
as an alias.
|
||||
|
||||
### New features
|
||||
|
||||
* The following diff formats now include information about copies and moves:
|
||||
|
@ -35,7 +35,7 @@ use crate::ui::Ui;
|
||||
///
|
||||
/// Name is derived from Merciual's obsolescence markers.
|
||||
#[derive(clap::Args, Clone, Debug)]
|
||||
pub(crate) struct ObslogArgs {
|
||||
pub(crate) struct EvologArgs {
|
||||
#[arg(long, short, default_value = "@")]
|
||||
revision: RevisionArg,
|
||||
/// Limit number of revisions to show
|
||||
@ -69,10 +69,10 @@ pub(crate) struct ObslogArgs {
|
||||
}
|
||||
|
||||
#[instrument(skip_all)]
|
||||
pub(crate) fn cmd_obslog(
|
||||
pub(crate) fn cmd_evolog(
|
||||
ui: &mut Ui,
|
||||
command: &CommandHelper,
|
||||
args: &ObslogArgs,
|
||||
args: &EvologArgs,
|
||||
) -> Result<(), CommandError> {
|
||||
let workspace_command = command.workspace_helper(ui)?;
|
||||
let repo = workspace_command.repo().as_ref();
|
@ -27,7 +27,7 @@ use crate::ui::Ui;
|
||||
///
|
||||
/// This excludes changes from other commits by temporarily rebasing `--from`
|
||||
/// onto `--to`'s parents. If you wish to compare the same change across
|
||||
/// versions, consider `jj obslog -p` instead.
|
||||
/// versions, consider `jj evolog -p` instead.
|
||||
#[derive(clap::Args, Clone, Debug)]
|
||||
#[command(group(ArgGroup::new("to_diff").args(&["from", "to"]).multiple(true).required(true)))]
|
||||
pub(crate) struct InterdiffArgs {
|
||||
|
@ -26,6 +26,7 @@ mod diff;
|
||||
mod diffedit;
|
||||
mod duplicate;
|
||||
mod edit;
|
||||
mod evolog;
|
||||
mod file;
|
||||
mod fix;
|
||||
mod git;
|
||||
@ -36,7 +37,6 @@ mod merge;
|
||||
mod r#move;
|
||||
mod new;
|
||||
mod next;
|
||||
mod obslog;
|
||||
mod operation;
|
||||
mod parallelize;
|
||||
mod prev;
|
||||
@ -91,6 +91,8 @@ enum Command {
|
||||
Diffedit(diffedit::DiffeditArgs),
|
||||
Duplicate(duplicate::DuplicateArgs),
|
||||
Edit(edit::EditArgs),
|
||||
#[command(alias = "obslog")]
|
||||
Evolog(evolog::EvologArgs),
|
||||
#[command(subcommand)]
|
||||
File(file::FileCommand),
|
||||
/// List files in a revision (DEPRECATED use `jj file list`)
|
||||
@ -117,7 +119,6 @@ enum Command {
|
||||
Move(r#move::MoveArgs),
|
||||
New(new::NewArgs),
|
||||
Next(next::NextArgs),
|
||||
Obslog(obslog::ObslogArgs),
|
||||
#[command(subcommand)]
|
||||
#[command(visible_alias = "op")]
|
||||
Operation(operation::OperationCommand),
|
||||
@ -196,7 +197,7 @@ pub fn run_command(ui: &mut Ui, command_helper: &CommandHelper) -> Result<(), Co
|
||||
Command::Move(args) => r#move::cmd_move(ui, command_helper, args),
|
||||
Command::New(args) => new::cmd_new(ui, command_helper, args),
|
||||
Command::Next(args) => next::cmd_next(ui, command_helper, args),
|
||||
Command::Obslog(args) => obslog::cmd_obslog(ui, command_helper, args),
|
||||
Command::Evolog(args) => evolog::cmd_evolog(ui, command_helper, args),
|
||||
Command::Operation(args) => operation::cmd_operation(ui, command_helper, args),
|
||||
Command::Parallelize(args) => parallelize::cmd_parallelize(ui, command_helper, args),
|
||||
Command::Prev(args) => prev::cmd_prev(ui, command_helper, args),
|
||||
|
@ -622,7 +622,7 @@ fn builtin_commit_methods<'repo>() -> CommitTemplateBuildMethodFnMap<'repo, Comm
|
||||
function.expect_no_arguments()?;
|
||||
let repo = language.repo;
|
||||
let out_property = self_property.map(|commit| {
|
||||
// The given commit could be hidden in e.g. obslog.
|
||||
// The given commit could be hidden in e.g. `jj evolog`.
|
||||
let maybe_entries = repo.resolve_change_id(commit.change_id());
|
||||
maybe_entries.map_or(0, |entries| entries.len()) > 1
|
||||
});
|
||||
|
@ -35,6 +35,7 @@ This document contains the help content for the `jj` command-line program.
|
||||
* [`jj diffedit`↴](#jj-diffedit)
|
||||
* [`jj duplicate`↴](#jj-duplicate)
|
||||
* [`jj edit`↴](#jj-edit)
|
||||
* [`jj evolog`↴](#jj-evolog)
|
||||
* [`jj file`↴](#jj-file)
|
||||
* [`jj file chmod`↴](#jj-file-chmod)
|
||||
* [`jj file list`↴](#jj-file-list)
|
||||
@ -58,7 +59,6 @@ This document contains the help content for the `jj` command-line program.
|
||||
* [`jj log`↴](#jj-log)
|
||||
* [`jj new`↴](#jj-new)
|
||||
* [`jj next`↴](#jj-next)
|
||||
* [`jj obslog`↴](#jj-obslog)
|
||||
* [`jj operation`↴](#jj-operation)
|
||||
* [`jj operation abandon`↴](#jj-operation-abandon)
|
||||
* [`jj operation diff`↴](#jj-operation-diff)
|
||||
@ -120,6 +120,7 @@ To get started, see the tutorial at https://github.com/martinvonz/jj/blob/main/d
|
||||
* `diffedit` — Touch up the content changes in a revision with a diff editor
|
||||
* `duplicate` — Create a new change with the same content as an existing one
|
||||
* `edit` — Sets the specified revision as the working-copy revision
|
||||
* `evolog` — Show how a change has evolved over time
|
||||
* `file` — File operations
|
||||
* `fix` — Update files with formatting fixes or other changes
|
||||
* `git` — Commands for working with Git remotes and the underlying Git repo
|
||||
@ -128,7 +129,6 @@ To get started, see the tutorial at https://github.com/martinvonz/jj/blob/main/d
|
||||
* `log` — Show revision history
|
||||
* `new` — Create a new, empty change and (by default) edit it in the working copy
|
||||
* `next` — Move the working-copy commit to the child revision
|
||||
* `obslog` — Show how a change has evolved over time
|
||||
* `operation` — Commands for working with the operation log
|
||||
* `parallelize` — Parallelize revisions by making them siblings
|
||||
* `prev` — Change the working copy revision relative to the parent revision
|
||||
@ -693,6 +693,44 @@ For more information, see https://martinvonz.github.io/jj/latest/FAQ#how-do-i-re
|
||||
|
||||
|
||||
|
||||
## `jj evolog`
|
||||
|
||||
Show how a change has evolved over time
|
||||
|
||||
Lists the previous commits which a change has pointed to. The current commit of a change evolves when the change is updated, rebased, etc.
|
||||
|
||||
Name is derived from Merciual's obsolescence markers.
|
||||
|
||||
**Usage:** `jj evolog [OPTIONS]`
|
||||
|
||||
###### **Options:**
|
||||
|
||||
* `-r`, `--revision <REVISION>`
|
||||
|
||||
Default value: `@`
|
||||
* `-n`, `--limit <LIMIT>` — Limit number of revisions to show
|
||||
* `--no-graph` — Don't show the graph, show a flat list of revisions
|
||||
* `-T`, `--template <TEMPLATE>` — Render each revision using the given template
|
||||
|
||||
For the syntax, see https://github.com/martinvonz/jj/blob/main/docs/templates.md
|
||||
* `-p`, `--patch` — Show patch compared to the previous version of this change
|
||||
|
||||
If the previous version has different parents, it will be temporarily rebased to the parents of the new version, so the diff is not contaminated by unrelated changes.
|
||||
* `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted
|
||||
* `--stat` — Show a histogram of the changes
|
||||
* `--types` — For each path, show only its type before and after
|
||||
|
||||
The diff is shown as two letters. The first letter indicates the type before and the second letter indicates the type after. '-' indicates that the path was not present, 'F' represents a regular file, `L' represents a symlink, 'C' represents a conflict, and 'G' represents a Git submodule.
|
||||
* `--name-only` — For each path, show only its path
|
||||
|
||||
Typically useful for shell commands like: `jj diff -r @- --name_only | xargs perl -pi -e's/OLD/NEW/g`
|
||||
* `--git` — Show a Git-format diff
|
||||
* `--color-words` — Show a word-level diff with changes indicated only by color
|
||||
* `--tool <TOOL>` — Generate diff by external command
|
||||
* `--context <CONTEXT>` — Number of lines of context to show
|
||||
|
||||
|
||||
|
||||
## `jj file`
|
||||
|
||||
File operations
|
||||
@ -1087,7 +1125,7 @@ If the given directory does not exist, it will be created. If no directory is gi
|
||||
|
||||
Compare the changes of two commits
|
||||
|
||||
This excludes changes from other commits by temporarily rebasing `--from` onto `--to`'s parents. If you wish to compare the same change across versions, consider `jj obslog -p` instead.
|
||||
This excludes changes from other commits by temporarily rebasing `--from` onto `--to`'s parents. If you wish to compare the same change across versions, consider `jj evolog -p` instead.
|
||||
|
||||
**Usage:** `jj interdiff [OPTIONS] <--from <FROM>|--to <TO>> [PATHS]...`
|
||||
|
||||
@ -1230,44 +1268,6 @@ implied.
|
||||
|
||||
|
||||
|
||||
## `jj obslog`
|
||||
|
||||
Show how a change has evolved over time
|
||||
|
||||
Lists the previous commits which a change has pointed to. The current commit of a change evolves when the change is updated, rebased, etc.
|
||||
|
||||
Name is derived from Merciual's obsolescence markers.
|
||||
|
||||
**Usage:** `jj obslog [OPTIONS]`
|
||||
|
||||
###### **Options:**
|
||||
|
||||
* `-r`, `--revision <REVISION>`
|
||||
|
||||
Default value: `@`
|
||||
* `-n`, `--limit <LIMIT>` — Limit number of revisions to show
|
||||
* `--no-graph` — Don't show the graph, show a flat list of revisions
|
||||
* `-T`, `--template <TEMPLATE>` — Render each revision using the given template
|
||||
|
||||
For the syntax, see https://github.com/martinvonz/jj/blob/main/docs/templates.md
|
||||
* `-p`, `--patch` — Show patch compared to the previous version of this change
|
||||
|
||||
If the previous version has different parents, it will be temporarily rebased to the parents of the new version, so the diff is not contaminated by unrelated changes.
|
||||
* `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted
|
||||
* `--stat` — Show a histogram of the changes
|
||||
* `--types` — For each path, show only its type before and after
|
||||
|
||||
The diff is shown as two letters. The first letter indicates the type before and the second letter indicates the type after. '-' indicates that the path was not present, 'F' represents a regular file, `L' represents a symlink, 'C' represents a conflict, and 'G' represents a Git submodule.
|
||||
* `--name-only` — For each path, show only its path
|
||||
|
||||
Typically useful for shell commands like: `jj diff -r @- --name_only | xargs perl -pi -e's/OLD/NEW/g`
|
||||
* `--git` — Show a Git-format diff
|
||||
* `--color-words` — Show a word-level diff with changes indicated only by color
|
||||
* `--tool <TOOL>` — Generate diff by external command
|
||||
* `--context <CONTEXT>` — Number of lines of context to show
|
||||
|
||||
|
||||
|
||||
## `jj operation`
|
||||
|
||||
Commands for working with the operation log
|
||||
|
@ -27,6 +27,7 @@ mod test_diff_command;
|
||||
mod test_diffedit_command;
|
||||
mod test_duplicate_command;
|
||||
mod test_edit_command;
|
||||
mod test_evolog_command;
|
||||
mod test_file_chmod_command;
|
||||
mod test_file_print_command;
|
||||
mod test_fix_command;
|
||||
@ -49,7 +50,6 @@ mod test_log_command;
|
||||
mod test_move_command;
|
||||
mod test_new_command;
|
||||
mod test_next_prev_commands;
|
||||
mod test_obslog_command;
|
||||
mod test_operations;
|
||||
mod test_parallelize_command;
|
||||
mod test_rebase_command;
|
||||
|
@ -431,7 +431,7 @@ fn test_log_builtin_templates_colored_debug() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_log_obslog_divergence() {
|
||||
fn test_log_evolog_divergence() {
|
||||
let test_env = TestEnvironment::default();
|
||||
test_env.jj_cmd_ok(test_env.env_root(), &["git", "init", "repo"]);
|
||||
let repo_path = test_env.env_root().join("repo");
|
||||
@ -473,8 +473,8 @@ fn test_log_obslog_divergence() {
|
||||
[1m[38;5;14m◆[0m [1m[38;5;5mz[0m[38;5;8mzzzzzzz[39m [38;5;2mroot()[39m [1m[38;5;4m0[0m[38;5;8m0000000[39m
|
||||
"###);
|
||||
|
||||
// Obslog and hidden divergent
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["obslog"]);
|
||||
// Evolog and hidden divergent
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["evolog"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
@ qpvuntsm?? test.user@example.com 2001-02-03 08:05:08 ff309c29
|
||||
│ description 1
|
||||
@ -484,8 +484,8 @@ fn test_log_obslog_divergence() {
|
||||
(empty) (no description set)
|
||||
"###);
|
||||
|
||||
// Colored obslog
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["obslog", "--color=always"]);
|
||||
// Colored evolog
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["evolog", "--color=always"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
[1m[38;5;2m@[0m [1m[4m[38;5;1mq[24mpvuntsm[38;5;9m??[39m [38;5;3mtest.user@example.com[39m [38;5;14m2001-02-03 08:05:08[39m [38;5;12mf[38;5;8mf309c29[39m[0m
|
||||
│ [1mdescription 1[0m
|
||||
|
@ -15,7 +15,7 @@
|
||||
use crate::common::{get_stdout_string, TestEnvironment};
|
||||
|
||||
#[test]
|
||||
fn test_obslog_with_or_without_diff() {
|
||||
fn test_evolog_with_or_without_diff() {
|
||||
let test_env = TestEnvironment::default();
|
||||
test_env.jj_cmd_ok(test_env.env_root(), &["git", "init", "repo"]);
|
||||
let repo_path = test_env.env_root().join("repo");
|
||||
@ -27,7 +27,7 @@ fn test_obslog_with_or_without_diff() {
|
||||
test_env.jj_cmd_ok(&repo_path, &["rebase", "-r", "@", "-d", "root()"]);
|
||||
std::fs::write(repo_path.join("file1"), "resolved\n").unwrap();
|
||||
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["obslog"]);
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["evolog"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
@ rlvkpnrz test.user@example.com 2001-02-03 08:05:10 66b42ad3
|
||||
│ my description
|
||||
@ -40,7 +40,7 @@ fn test_obslog_with_or_without_diff() {
|
||||
"###);
|
||||
|
||||
// Color
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["--color=always", "obslog"]);
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["--color=always", "evolog"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
[1m[38;5;2m@[0m [1m[38;5;13mr[38;5;8mlvkpnrz[39m [38;5;3mtest.user@example.com[39m [38;5;14m2001-02-03 08:05:10[39m [38;5;12m6[38;5;8m6b42ad3[39m[0m
|
||||
│ [1mmy description[0m
|
||||
@ -54,7 +54,7 @@ fn test_obslog_with_or_without_diff() {
|
||||
|
||||
// There should be no diff caused by the rebase because it was a pure rebase
|
||||
// (even even though it resulted in a conflict).
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["obslog", "-p"]);
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["evolog", "-p"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
@ rlvkpnrz test.user@example.com 2001-02-03 08:05:10 66b42ad3
|
||||
│ my description
|
||||
@ -80,7 +80,7 @@ fn test_obslog_with_or_without_diff() {
|
||||
"###);
|
||||
|
||||
// Test `--limit`
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["obslog", "--limit=2"]);
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["evolog", "--limit=2"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
@ rlvkpnrz test.user@example.com 2001-02-03 08:05:10 66b42ad3
|
||||
│ my description
|
||||
@ -89,7 +89,7 @@ fn test_obslog_with_or_without_diff() {
|
||||
"###);
|
||||
|
||||
// Test `--no-graph`
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["obslog", "--no-graph"]);
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["evolog", "--no-graph"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
rlvkpnrz test.user@example.com 2001-02-03 08:05:10 66b42ad3
|
||||
my description
|
||||
@ -102,7 +102,7 @@ fn test_obslog_with_or_without_diff() {
|
||||
"###);
|
||||
|
||||
// Test `--git` format, and that it implies `-p`
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["obslog", "--no-graph", "--git"]);
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["evolog", "--no-graph", "--git"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
rlvkpnrz test.user@example.com 2001-02-03 08:05:10 66b42ad3
|
||||
my description
|
||||
@ -143,7 +143,7 @@ fn test_obslog_with_or_without_diff() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_obslog_with_custom_symbols() {
|
||||
fn test_evolog_with_custom_symbols() {
|
||||
let test_env = TestEnvironment::default();
|
||||
test_env.jj_cmd_ok(test_env.env_root(), &["git", "init", "repo"]);
|
||||
let repo_path = test_env.env_root().join("repo");
|
||||
@ -157,7 +157,7 @@ fn test_obslog_with_custom_symbols() {
|
||||
|
||||
let toml = concat!("templates.log_node = 'if(current_working_copy, \"$\", \"┝\")'\n",);
|
||||
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["obslog", "--config-toml", toml]);
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["evolog", "--config-toml", toml]);
|
||||
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
$ rlvkpnrz test.user@example.com 2001-02-03 08:05:10 66b42ad3
|
||||
@ -172,7 +172,7 @@ fn test_obslog_with_custom_symbols() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_obslog_word_wrap() {
|
||||
fn test_evolog_word_wrap() {
|
||||
let test_env = TestEnvironment::default();
|
||||
test_env.jj_cmd_ok(test_env.env_root(), &["git", "init", "repo"]);
|
||||
let repo_path = test_env.env_root().join("repo");
|
||||
@ -193,13 +193,13 @@ fn test_obslog_word_wrap() {
|
||||
test_env.jj_cmd_ok(&repo_path, &["describe", "-m", "first"]);
|
||||
|
||||
// ui.log-word-wrap option applies to both graph/no-graph outputs
|
||||
insta::assert_snapshot!(render(&["obslog"], 40, false), @r###"
|
||||
insta::assert_snapshot!(render(&["evolog"], 40, false), @r###"
|
||||
@ qpvuntsm test.user@example.com 2001-02-03 08:05:08 fa15625b
|
||||
│ (empty) first
|
||||
○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:07 230dd059
|
||||
(empty) (no description set)
|
||||
"###);
|
||||
insta::assert_snapshot!(render(&["obslog"], 40, true), @r###"
|
||||
insta::assert_snapshot!(render(&["evolog"], 40, true), @r###"
|
||||
@ qpvuntsm test.user@example.com
|
||||
│ 2001-02-03 08:05:08 fa15625b
|
||||
│ (empty) first
|
||||
@ -207,13 +207,13 @@ fn test_obslog_word_wrap() {
|
||||
2001-02-03 08:05:07 230dd059
|
||||
(empty) (no description set)
|
||||
"###);
|
||||
insta::assert_snapshot!(render(&["obslog", "--no-graph"], 40, false), @r###"
|
||||
insta::assert_snapshot!(render(&["evolog", "--no-graph"], 40, false), @r###"
|
||||
qpvuntsm test.user@example.com 2001-02-03 08:05:08 fa15625b
|
||||
(empty) first
|
||||
qpvuntsm hidden test.user@example.com 2001-02-03 08:05:07 230dd059
|
||||
(empty) (no description set)
|
||||
"###);
|
||||
insta::assert_snapshot!(render(&["obslog", "--no-graph"], 40, true), @r###"
|
||||
insta::assert_snapshot!(render(&["evolog", "--no-graph"], 40, true), @r###"
|
||||
qpvuntsm test.user@example.com
|
||||
2001-02-03 08:05:08 fa15625b
|
||||
(empty) first
|
||||
@ -224,7 +224,7 @@ fn test_obslog_word_wrap() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_obslog_squash() {
|
||||
fn test_evolog_squash() {
|
||||
let test_env = TestEnvironment::default();
|
||||
test_env.jj_cmd_ok(test_env.env_root(), &["git", "init", "repo"]);
|
||||
let repo_path = test_env.env_root().join("repo");
|
||||
@ -263,7 +263,7 @@ fn test_obslog_squash() {
|
||||
);
|
||||
|
||||
let stdout =
|
||||
test_env.jj_cmd_success(&repo_path, &["obslog", "-p", "-r", "description('squash')"]);
|
||||
test_env.jj_cmd_success(&repo_path, &["evolog", "-p", "-r", "description('squash')"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
○ qpvuntsm test.user@example.com 2001-02-03 08:05:15 d49749bf
|
||||
├─┬─╮ squashed 3
|
||||
@ -320,12 +320,12 @@ fn test_obslog_squash() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_obslog_with_no_template() {
|
||||
fn test_evolog_with_no_template() {
|
||||
let test_env = TestEnvironment::default();
|
||||
test_env.jj_cmd_ok(test_env.env_root(), &["git", "init", "repo"]);
|
||||
let repo_path = test_env.env_root().join("repo");
|
||||
|
||||
let stderr = test_env.jj_cmd_cli_error(&repo_path, &["obslog", "-T"]);
|
||||
let stderr = test_env.jj_cmd_cli_error(&repo_path, &["evolog", "-T"]);
|
||||
insta::assert_snapshot!(stderr, @r###"
|
||||
error: a value is required for '--template <TEMPLATE>' but none was supplied
|
||||
|
@ -964,7 +964,7 @@ fn test_squash_from_multiple_partial_no_op() {
|
||||
let stdout = test_env.jj_cmd_success(
|
||||
&repo_path,
|
||||
&[
|
||||
"obslog",
|
||||
"evolog",
|
||||
"-T",
|
||||
r#"separate(" ", commit_id.short(), description)"#,
|
||||
],
|
||||
|
@ -702,7 +702,7 @@ fn test_workspaces_current_op_discarded_by_other() {
|
||||
secondary
|
||||
"###);
|
||||
|
||||
let (stdout, stderr) = test_env.jj_cmd_ok(&secondary_path, &["obslog"]);
|
||||
let (stdout, stderr) = test_env.jj_cmd_ok(&secondary_path, &["evolog"]);
|
||||
insta::assert_snapshot!(stderr, @"");
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
@ kmkuslsw test.user@example.com 2001-02-03 08:05:18 secondary@ b0b40043
|
||||
|
@ -50,15 +50,15 @@ parent-child relationships between commits you can see in `jj log`, this is
|
||||
simply not what they mean. What you can see in `jj log` is that after the
|
||||
working copy commit gets amended (after any edit), the commit ID changes.
|
||||
|
||||
You can see the actual history of working copy changes using `jj obslog`. This
|
||||
You can see the actual history of working copy changes using `jj evolog`. This
|
||||
will show the history of the commits that were previously the "working-copy
|
||||
commit", since the last time the change id of the working copy commit changed.
|
||||
The obsolete changes will be marked as "hidden". They are still accessible with
|
||||
any `jj` command (`jj diff`, for example), but you will need to use the commit
|
||||
id to refer to hidden commits.
|
||||
|
||||
You can also use `jj obslog -r` on revisions that were previously the
|
||||
working-copy revisions (or on any other revisions). Use `jj obslog -p` as an
|
||||
You can also use `jj evolog -r` on revisions that were previously the
|
||||
working-copy revisions (or on any other revisions). Use `jj evolog -p` as an
|
||||
easy way to see the evolution of the commit's contents.
|
||||
|
||||
### Can I prevent Jujutsu from recording my unfinished work? I'm not ready to commit it.
|
||||
@ -130,7 +130,7 @@ You'll then need to use `jj new --before` to create new commits and
|
||||
|
||||
### I accidentally changed files in the wrong commit, how do I move the recent changes into another commit?
|
||||
|
||||
Use `jj obslog -p` to see how your working-copy commit has evolved. Find the
|
||||
Use `jj evolog -p` to see how your working-copy commit has evolved. Find the
|
||||
commit you want to restore the contents to. Let's say the current commit (with
|
||||
the changes intended for a new commit) are in commit X and the state you wanted
|
||||
is in commit Y. Note the commit id (normally in blue at the end of the line in
|
||||
|
@ -297,7 +297,7 @@ op_log_node = 'if(current_operation, "@", "○")'
|
||||
|
||||
### Wrap log content
|
||||
|
||||
If enabled, `log`/`obslog`/`op log` content will be wrapped based on
|
||||
If enabled, `log`/`evolog`/`op log` content will be wrapped based on
|
||||
the terminal width.
|
||||
|
||||
```toml
|
||||
|
@ -14,7 +14,7 @@ object can be referenced as `self`.
|
||||
|
||||
### Commit keywords
|
||||
|
||||
In `jj log`/`jj obslog` templates, all 0-argument methods of [the `Commit`
|
||||
In `jj log`/`jj evolog` templates, all 0-argument methods of [the `Commit`
|
||||
type](#commit-type) are available as keywords. For example, `commit_id` is
|
||||
equivalent to `self.commit_id()`.
|
||||
|
||||
|
@ -123,9 +123,9 @@ typically depends on how done you are with the change; if the change is almost
|
||||
done, it makes sense to use `jj new` so you can easily review your adjustments
|
||||
with `jj diff` before running `jj squash`.
|
||||
|
||||
To view how a change has evolved over time, we can use `jj obslog` to see each
|
||||
recorded change for the current commit. This records changes to the working
|
||||
copy, message, squashes, rebases, etc.
|
||||
To view how a change has evolved over time, we can use `jj evolog` to see each
|
||||
recorded change for the current commit. This records changes to the working copy,
|
||||
message, squashes, rebases, etc.
|
||||
|
||||
## The log command and "revsets"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user