-
Notifications
You must be signed in to change notification settings - Fork 382
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
Conversation
`..` 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).
ceea1d8
to
984197b
Compare
There was a problem hiding this 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.)
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.
984197b
to
bfcd066
Compare
There was a problem hiding this 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.
* `::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 |
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
First of all, thank you, this is really nice! |
o root() | ||
``` | ||
|
||
**Operator** `x-` |
There was a problem hiding this comment.
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?
Checklist
If applicable:
CHANGELOG.md