Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FR: Revset syntax to see all revisions with a change ID #8357

@scott2000

Description

@scott2000

Is your feature request related to a problem? Please describe.
Since the evolog can have branches and doesn't have to be linear, sometimes running jj evolog -r xyz isn't sufficient to see all commits with change ID xyz. For instance, sometimes I rewrite a commit xyz a few times, then I decide I don't like the changes I made, so I revert back to an old version from the evolog. But then later I decide I actually wanted to explore those changes further. However, since the evolog only shows predecessors, it's now difficult to find those changes.

Describe the solution you'd like
We could implement a revset like xyz/*, which returns all commits with change ID xyz (including hidden commits). This is a natural extension of the xyz/<N> syntax we implemented recently.

For instance, jj evolog -r 'xyz/*' might show this graph:

* xyz/0 - E (hidden)
|
* xyz/1 - D (hidden)
|
@ xyz - C
|
| * xyz/3 - B (hidden)
|/
*  xyz/4 - A (hidden)
|
~

Whereas a simple jj evolog -r xyz only would've shown:

@ xyz - C
|
* xyz/4 - A (hidden)
|
~

Describe alternatives you've considered
This could also be done with a new argument to the change_id() function, such as change_id(xyz, include_hidden=true).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions