From 21b69786d704f99837287cbcd39d02ab1072c300 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Tue, 1 Aug 2023 14:30:52 -0700 Subject: [PATCH] docs: revert to using revset operator `:` instead of `::` Since our latest release doesn't support `::`, we shouldn't tell the user to use it. This commit should be backed out we've released jj 0.9.0. --- docs/config.md | 4 ++-- docs/github.md | 2 +- docs/revsets.md | 26 +++++++++++++------------- docs/tutorial.md | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/config.md b/docs/config.md index 7efcc1a7f7..57294b2538 100644 --- a/docs/config.md +++ b/docs/config.md @@ -196,7 +196,7 @@ To get shorter prefixes for certain revisions, set `revsets.short-prefixes`: ```toml # Prioritize the current branch -revsets.short-prefixes = "(main..@)::" +revsets.short-prefixes = "(main..@):" ``` ### Relative timestamps @@ -259,7 +259,7 @@ You can define aliases for commands, including their arguments. For example: ```toml # `jj l` shows commits on the working-copy commit's (anonymous) branch # compared to the `main` branch -aliases.l = ["log", "-r", "(main..@):: | (main..@)-"] +aliases.l = ["log", "-r", "(main..@): | (main..@)-"] ``` ## Editor diff --git a/docs/github.md b/docs/github.md index c09107ffa6..5666be5169 100644 --- a/docs/github.md +++ b/docs/github.md @@ -148,7 +148,7 @@ remote Log all remote branches, which you authored or committed to `jj log -r 'remote_branches() & (committer(your@email.com) | author(your@email.com))'` Log all descendants of the current working copy, which aren't on a remote -`jj log -r '::@ & ~remote_branches()'` +`jj log -r ':@ & ~remote_branches()'` ## Merge conflicts diff --git a/docs/revsets.md b/docs/revsets.md index a796f90bb2..019c74a6bb 100644 --- a/docs/revsets.md +++ b/docs/revsets.md @@ -58,16 +58,16 @@ only symbols. * `~x`: Revisions that are not in `x`. * `x-`: Parents of `x`. * `x+`: Children of `x`. -* `::x`: Ancestors of `x`, including the commits in `x` itself. -* `x::`: Descendants of `x`, including the commits in `x` itself. -* `x::y`: Descendants of `x` that are also ancestors of `y`. Equivalent - to `x:: & ::y`. This is what `git log` calls `--ancestry-path x..y`. -* `:x`, `x:`, and `x:y`: Deprecated synonyms for `::x`, `x::`, and `x::y`. We - plan to delete them in jj 0.15+. +* `:x`: Ancestors of `x`, including the commits in `x` itself. +* `x:`: Descendants of `x`, including the commits in `x` itself. +* `x:y`: Descendants of `x` that are also ancestors of `y`. Equivalent + to `x: & :y`. This is what `git log` calls `--ancestry-path x..y`. +* `::x`, `x::`, and `x::y`: New versions of for `:x`, `x:`, and `x:y` to be + released in jj 0.9.0. We plan to delete the latter in jj 0.15+. * `x..y`: Ancestors of `y` that are not also ancestors of `x`. Equivalent to - `::y ~ ::x`. This is what `git log` calls `x..y` (i.e. the same as we call it). + `:y ~ :x`. This is what `git log` calls `x..y` (i.e. the same as we call it). * `..x`: Ancestors of `x`, including the commits in `x` itself. Equivalent to - `::x` and provided for consistency. + `:x` and provided for consistency. * `x..`: Revisions that are not ancestors of `x`. You can use parentheses to control evaluation order, such as `(x & y) | z` or @@ -80,9 +80,9 @@ revsets (expressions) as arguments. * `parents(x)`: Same as `x-`. * `children(x)`: Same as `x+`. -* `ancestors(x)`: Same as `::x`. -* `descendants(x)`: Same as `x::`. -* `connected(x)`: Same as `x::x`. Useful when `x` includes several commits. +* `ancestors(x)`: Same as `:x`. +* `descendants(x)`: Same as `x:`. +* `connected(x)`: Same as `x:x`. Useful when `x` includes several commits. * `all()`: All visible commits in the repo. * `none()`: No commits. This function is rarely useful; it is provided for completeness. @@ -171,7 +171,7 @@ jj log -r 'remote_branches(remote=origin)..' Show all ancestors of the working copy (almost like plain `git log`) ``` -jj log -r ::@ +jj log -r :@ ``` Show the initial commits in the repo (the ones Git calls "root commits"): @@ -191,7 +191,7 @@ those commits: ``` -jj log -r '(remote_branches()..@)::' +jj log -r '(remote_branches()..@):' ``` Show commits authored by "martinvonz" and containing the word "reset" in the diff --git a/docs/tutorial.md b/docs/tutorial.md index 143b9af26f..6d7b5ec97a 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -159,7 +159,7 @@ called the "root commit". It's the root commit of every repo. The `root` symbol in the revset matches it. There are also operators for getting the parents (`foo-`), children (`foo+`), -ancestors (`::foo`), descendants (`foo::`), DAG range (`foo::bar`, like +ancestors (`:foo`), descendants (`foo:`), DAG range (`foo:bar`, like `git log --ancestry-path`), range (`foo..bar`, same as Git's). There are also a few more functions, such as `heads()`, which filters out revisions in the input set if they're ancestors of other revisions in the set. @@ -345,7 +345,7 @@ $ jj new -m ABC; printf 'A\nB\nc\n' > file Working copy now at: 6f30cd1fb351 ABC $ jj new -m ABCD; printf 'A\nB\nC\nD\n' > file Working copy now at: a67491542e10 ABCD -$ jj log -r master::@ +$ jj log -r master:@ @ mrxqplykzpkw martinvonz@google.com 2023-02-12 19:38:21.000 -08:00 b98c607bf87f │ ABCD ◉ kwtuwqnmqyqp martinvonz@google.com 2023-02-12 19:38:12.000 -08:00 30aecc0871ea