Skip to content

Commit

Permalink
doc: fix revset examples formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
samueltardieu committed Oct 2, 2024
1 parent f8e30fb commit 52f07a2
Showing 1 changed file with 88 additions and 88 deletions.
176 changes: 88 additions & 88 deletions docs/revsets.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,96 +78,96 @@ only symbols.
You can use parentheses to control evaluation order, such as `(x & y) | z` or
`x & (y | z)`.

??? examples
### Examples

Given this history:
```
D
|\
| o C
| |
o | B
|/
o A
|
o root()
```
Given this history:
```
D
|\
| o C
| |
o | B
|/
o A
|
o root()
```

**Operator** `x-`

* `D-` ⇒ `{C,B}`
* `B-` ⇒ `{A}`
* `A-` ⇒ `{root()}`
* `root()-` ⇒ `{}` (empty set)
* `none()-` ⇒ `{}` (empty set)
* `(D|A)-` ⇒ `{C,B,root()}`
* `(C|B)-` ⇒ `{A}`

**Operator** `x+`

* `D+` ⇒ `{}` (empty set)
* `B+` ⇒ `{D}`
* `A+` ⇒ `{B,C}`
* `root()+` ⇒ `{A}`
* `none()+` ⇒ `{}` (empty set)
* `(C|B)+` ⇒ `{D}`
* `(B|root())+` ⇒ `{D,A}`

**Operator** `x::`

* `D::` ⇒ `{D}`
* `B::` ⇒ `{D,B}`
* `A::` ⇒ `{D,C,B,A}`
* `root()::` ⇒ `{D,C,B,A,root()}`
* `none()::` ⇒ `{}` (empty set)
* `(C|B)::` ⇒ `{D,C,B}`

**Operator** `x..`

* `D..` ⇒ `{}` (empty set)
* `B..` ⇒ `{D,C}` (note that, unlike `B::`, this includes `C`)
* `A..` ⇒ `{D,C,B}`
* `root()..` ⇒ `{D,C,B,A}`
* `none()..` ⇒ `{D,C,B,A,root()}`
* `(C|B)..` ⇒ `{D}`

**Operator** `::x`

* `::D` ⇒ `{D,C,B,A,root()}`
* `::B` ⇒ `{B,A,root()}`
* `::A` ⇒ `{A,root()}`
* `::root()` ⇒ `{root()}`
* `::none()` ⇒ `{}` (empty set)
* `::(C|B)` ⇒ `{C,B,A,root()}`

**Operator** `..x`

* `..D` ⇒ `{D,C,B,A}`
* `..B` ⇒ `{B,A}`
* `..A` ⇒ `{A}`
* `..root()` ⇒ `{}` (empty set)
* `..none()` ⇒ `{}` (empty set)
* `..(C|B)` ⇒ `{C,B,A}`

**Operator** `x::y`

* `D::D` ⇒ `{D}`
* `B::D` ⇒ `{D,B}` (note that, unlike `B..D`, this includes `B` and excludes `C`)
* `A::D` ⇒ `{D,C,B,A}`
* `root()::D` ⇒ `{D,C,B,A,root()}`
* `none()::D` ⇒ `{}` (empty set)
* `D::B` ⇒ `{}` (empty set)
* `(C|B)::(C|B)` ⇒ `{C,B}`

**Operator** `x..y`

* `D..D` ⇒ `{}` (empty set)
* `B..D` ⇒ `{D,C}` (note that, unlike `B::D`, this includes `C` and excludes `B`)
* `A..D` ⇒ `{D,C,B}`
* `root()..D` ⇒ `{D,C,B,A}`
* `none()..D` ⇒ `{D,C,B,A,root()}`
* `D..B` ⇒ `{}` (empty set)
* `(C|B)..(C|B)` ⇒ `{}` (empty set)
**Operator** `x-`

* `D-``{C,B}`
* `B-``{A}`
* `A-``{root()}`
* `root()-``{}` (empty set)
* `none()-``{}` (empty set)
* `(D|A)-``{C,B,root()}`
* `(C|B)-``{A}`

**Operator** `x+`

* `D+``{}` (empty set)
* `B+``{D}`
* `A+``{B,C}`
* `root()+``{A}`
* `none()+``{}` (empty set)
* `(C|B)+``{D}`
* `(B|root())+``{D,A}`

**Operator** `x::`

* `D::``{D}`
* `B::``{D,B}`
* `A::``{D,C,B,A}`
* `root()::``{D,C,B,A,root()}`
* `none()::``{}` (empty set)
* `(C|B)::``{D,C,B}`

**Operator** `x..`

* `D..``{}` (empty set)
* `B..``{D,C}` (note that, unlike `B::`, this includes `C`)
* `A..``{D,C,B}`
* `root()..``{D,C,B,A}`
* `none()..``{D,C,B,A,root()}`
* `(C|B)..``{D}`

**Operator** `::x`

* `::D``{D,C,B,A,root()}`
* `::B``{B,A,root()}`
* `::A``{A,root()}`
* `::root()``{root()}`
* `::none()``{}` (empty set)
* `::(C|B)``{C,B,A,root()}`

**Operator** `..x`

* `..D``{D,C,B,A}`
* `..B``{B,A}`
* `..A``{A}`
* `..root()``{}` (empty set)
* `..none()``{}` (empty set)
* `..(C|B)``{C,B,A}`

**Operator** `x::y`

* `D::D``{D}`
* `B::D``{D,B}` (note that, unlike `B..D`, this includes `B` and excludes `C`)
* `A::D``{D,C,B,A}`
* `root()::D``{D,C,B,A,root()}`
* `none()::D``{}` (empty set)
* `D::B``{}` (empty set)
* `(C|B)::(C|B)``{C,B}`

**Operator** `x..y`

* `D..D``{}` (empty set)
* `B..D``{D,C}` (note that, unlike `B::D`, this includes `C` and excludes `B`)
* `A..D``{D,C,B}`
* `root()..D``{D,C,B,A}`
* `none()..D``{D,C,B,A,root()}`
* `D..B``{}` (empty set)
* `(C|B)..(C|B)``{}` (empty set)

## Functions

Expand Down

0 comments on commit 52f07a2

Please sign in to comment.