Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add examples to revset doc #3897

Merged
merged 2 commits into from
Jun 17, 2024
Merged

Add examples to revset doc #3897

merged 2 commits into from
Jun 17, 2024

Conversation

martinvonz
Copy link
Owner

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

docs/revsets.md Outdated Show resolved Hide resolved
docs/revsets.md Outdated Show resolved Hide resolved
`..` is shorthand for `root()..visible_head()`, for example. We don't
seem to explain that anywhere. I hope mentioning that will help
readers understand the relationship between the shorthands and the
full `x..y`, and also to see the correspondence between `..` and `::`
(in how their default left and right operands are the same).
@martinvonz martinvonz force-pushed the push-woyuynyulwyn branch 2 times, most recently from ceea1d8 to 984197b Compare June 17, 2024 01:40
Copy link
Collaborator

@yuja yuja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better, thanks.

(there might be other minor copy-paste errors, but lgtm.)

docs/revsets.md Outdated Show resolved Hide resolved
docs/revsets.md Outdated Show resolved Hide resolved
docs/revsets.md Outdated Show resolved Hide resolved
docs/revsets.md Outdated Show resolved Hide resolved
There's been a lot of questions about the subtle differences between
`..` and `::`. I hope these examples will help with that.

We should also add examples to the revset functions (e.g. `heads()` is
not obvious how it works), but that can come later.
Copy link
Owner Author

@martinvonz martinvonz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for finding all those mistakes.

docs/revsets.md Outdated Show resolved Hide resolved
docs/revsets.md Outdated Show resolved Hide resolved
docs/revsets.md Outdated Show resolved Hide resolved
docs/revsets.md Outdated Show resolved Hide resolved
@martinvonz martinvonz enabled auto-merge (rebase) June 17, 2024 02:22
@martinvonz martinvonz merged commit 4d08c2c into main Jun 17, 2024
17 checks passed
@martinvonz martinvonz deleted the push-woyuynyulwyn branch June 17, 2024 03:23
* `::x`: Ancestors of `x`, including the commits in `x` itself.
* `x::`: Descendants of `x`, including the commits in `x` itself. Shorthand for
`x::visible_heads()`.
* `x..`: Revisions that are not ancestors of `x`. Shorthand for
Copy link
Collaborator

@ilyagr ilyagr Jun 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add "Never includes revisions in x", or something to this effect.

Copy link
Collaborator

@ilyagr ilyagr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is merged, but I'll add some comments anyway for later reference.

@ilyagr
Copy link
Collaborator

ilyagr commented Jun 17, 2024

First of all, thank you, this is really nice!

o root()
```

**Operator** `x-`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should turn this into a table?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants