Add support for Jujutsu.

Review Request #14336 — Created Feb. 7, 2025 and updated

Information

RBTools
master

Reviewers

Jujutsu is a new version control system which is rapidly gaining
momentum. It works with Git remotes (and wraps Git internally for object
storage, at least for now). This change adds an RBTools client for
Jujutsu.

Testing Done:
- Ran unit tests.
- Posted a variety of changes with various revision ranges.
- Posted changes that included binary files.
- Tested rbt stamp with both the head and non-head changes.
- Tested rbt land with both merge and squash modes, and --push.
- Tested rbt patch with a variety of changes, including both
per-commit and squash modes.
- Built docs and looked at the updated/added pages.

  • Ran unit tests.
  • Posted a variety of changes with various revision ranges.
  • Posted changes that included binary files.
  • Tested rbt stamp with both the head and non-head changes.
  • Tested rbt land with both merge and squash modes, and --push.
  • Tested rbt patch with a variety of changes, including both
    per-commit and squash modes.
  • Built docs and looked at the updated/added pages.
Summary ID
Add support for Jujutsu.
Jujutsu is a new version control system which is rapidly gaining momentum. It works with Git remotes (and wraps Git internally for object storage, at least for now). This change adds an RBTools client for Jujutsu. Testing Done: - Ran unit tests. - Posted a variety of changes with various revision ranges. - Posted changes that included binary files. - Tested `rbt stamp` with both the head and non-head changes. - Tested `rbt land` with both merge and squash modes, and `--push`. - Tested `rbt patch` with a variety of changes, including both per-commit and squash modes. - Built docs and looked at the updated/added pages.
7f1b92804e2c2d8950fa0c06c7436e9cb0bac4af
Description From Last Updated

maubinmaubin

too many blank lines (2) Column: 5 Error code: E303

reviewbotreviewbot

continuation line over-indented for visual indent Column: 30 Error code: E127

reviewbotreviewbot

continuation line over-indented for visual indent Column: 30 Error code: E127

reviewbotreviewbot

multiple spaces before operator Column: 13 Error code: E221

reviewbotreviewbot

line too long (89 > 79 characters) Column: 80 Error code: E501

reviewbotreviewbot

line too long (88 > 79 characters) Column: 80 Error code: E501

reviewbotreviewbot

line too long (86 > 79 characters) Column: 80 Error code: E501

reviewbotreviewbot

line too long (85 > 79 characters) Column: 80 Error code: E501

reviewbotreviewbot

whitespace after '{' Column: 36 Error code: E201

reviewbotreviewbot

whitespace before '}' Column: 62 Error code: E202

reviewbotreviewbot

whitespace before '}' Column: 62 Error code: E202

reviewbotreviewbot

whitespace after '{' Column: 36 Error code: E201

reviewbotreviewbot

whitespace after '{' Column: 36 Error code: E201

reviewbotreviewbot

whitespace before '}' Column: 45 Error code: E202

reviewbotreviewbot

whitespace after '{' Column: 36 Error code: E201

reviewbotreviewbot

whitespace before '}' Column: 45 Error code: E202

reviewbotreviewbot

line too long (80 > 79 characters) Column: 80 Error code: E501

reviewbotreviewbot

Would be good to say "You can create a personal configuration file (e.g. in :file:$HOME/.reviewboardrc) with the following ...) That …

maubinmaubin

Typo: thtrough

maubinmaubin

I think there's an extra : here?

maubinmaubin

This reads kinda weird, the "... working about branches ..." part. Might also benefit from splitting it up into two …

maubinmaubin

Does rbt land support the --push option with jujutsu? If so we should mention that here too.

maubinmaubin

I think its worth it to link to the per-user config page here https://www.reviewboard.org/docs/rbtools/latest/rbt/configuration/users/. You can use "personal configuration" as …

maubinmaubin

The type needs to be updated here as well (get rid of Optional)

maubinmaubin

This method doesn't seem to ever return None, we always return 1 if p is None.

maubinmaubin

You can consolidate this to return super()...

maubinmaubin

Missing the Raises section in the docstring.

maubinmaubin

Missing the Raises section in the docstring.

maubinmaubin

We should wrap this in a try/except and raise an SCMError if we encounter a RunProcessError, like we do with …

maubinmaubin

This docstring should have a Raises section for the possible rbtools.utils.process.RunProcessError

maubinmaubin

Add , optional

maubinmaubin

Missing a Raises section in the docstring.

maubinmaubin

Add , optional

maubinmaubin

This docstring should have a Raises section for the possible rbtools.utils.process.RunProcessError

maubinmaubin

Here too.

maubinmaubin

Here too. And its missing Args and Returns.

maubinmaubin

'sys.stdout' imported but unused Column: 1 Error code: F401

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

david
david
maubin
  1. Excited to try this out.

  2. Show all issues
    
      
  3. docs/rbtools/workflows/jujutsu.rst (Diff revision 2)
     
     
    Show all issues

    Would be good to say "You can create a personal configuration file (e.g. in :file:$HOME/.reviewboardrc) with the following ...)

    That helps if the reader is not familiar with our per-user config and they can easily find more info about it if needed. Especially for Windows users who don't have a home directory.

  4. docs/rbtools/workflows/jujutsu.rst (Diff revision 2)
     
     
    Show all issues

    Typo: thtrough

  5. docs/rbtools/workflows/jujutsu.rst (Diff revision 2)
     
     
    Show all issues

    I think there's an extra : here?

    1. In rst that indicates that the following indented stuff is a code block.

  6. docs/rbtools/workflows/jujutsu.rst (Diff revision 2)
     
     
     
    Show all issues

    This reads kinda weird, the "... working about branches ..." part.

    Might also benefit from splitting it up into two sentences: .. merge commits is ugly. When we're working ..."

  7. docs/rbtools/workflows/jujutsu.rst (Diff revision 2)
     
     
     
    Show all issues

    Does rbt land support the --push option with jujutsu? If so we should mention that here too.

    1. That is mentioned above in the "Land your change" section. For this example I think I'd like to keep each step separate.

  8. rbtools/clients/jujutsu.py (Diff revision 3)
     
     
     
     
     
    Show all issues

    This method doesn't seem to ever return None, we always return 1 if p is None.

  9. rbtools/clients/jujutsu.py (Diff revision 3)
     
     
     
     
    Show all issues

    You can consolidate this to return super()...

    1. Actually this whole thing can go away now. This did other stuff when I was busy trying to figure out how best to manage creation of commits/changes during the patch process.

  10. rbtools/clients/jujutsu.py (Diff revision 3)
     
     
    Show all issues

    Missing the Raises section in the docstring.

  11. rbtools/clients/jujutsu.py (Diff revision 3)
     
     
    Show all issues

    Missing the Raises section in the docstring.

  12. rbtools/clients/jujutsu.py (Diff revision 3)
     
     
     
     
     
     
     
     
    Show all issues

    We should wrap this in a try/except and raise an SCMError if we encounter a RunProcessError, like we do with the other methods that use run_process

  13. rbtools/clients/jujutsu.py (Diff revision 3)
     
     
    Show all issues

    This docstring should have a Raises section for the possible rbtools.utils.process.RunProcessError

  14. rbtools/clients/jujutsu.py (Diff revision 3)
     
     
    Show all issues

    Add , optional

  15. rbtools/clients/jujutsu.py (Diff revision 3)
     
     
    Show all issues

    Missing a Raises section in the docstring.

  16. rbtools/clients/jujutsu.py (Diff revision 3)
     
     
    Show all issues

    Add , optional

  17. rbtools/clients/jujutsu.py (Diff revision 3)
     
     
    Show all issues

    This docstring should have a Raises section for the possible rbtools.utils.process.RunProcessError

  18. rbtools/clients/jujutsu.py (Diff revision 3)
     
     
    Show all issues

    Here too.

  19. rbtools/clients/jujutsu.py (Diff revision 3)
     
     
    Show all issues

    Here too. And its missing Args and Returns.

  20. 
      
david
Review request changed
Commits:
Summary ID
Add support for Jujutsu.
Jujutsu is a new version control system which is rapidly gaining momentum. It works with Git remotes (and wraps Git internally for object storage, at least for now). This change adds an RBTools client for Jujutsu. Testing Done: - Ran unit tests. - Posted a variety of changes with various revision ranges. - Posted changes that included binary files. - Tested `rbt stamp` with both the head and non-head changes. - Tested `rbt land` with both merge and squash modes, and `--push`. - Tested `rbt patch` with a variety of changes, including both per-commit and squash modes. - Built docs and looked at the updated/added pages.
2df63bf280cd6605bacb43054215af3dc50eaec7
Add support for Jujutsu.
Jujutsu is a new version control system which is rapidly gaining momentum. It works with Git remotes (and wraps Git internally for object storage, at least for now). This change adds an RBTools client for Jujutsu. Testing Done: - Ran unit tests. - Posted a variety of changes with various revision ranges. - Posted changes that included binary files. - Tested `rbt stamp` with both the head and non-head changes. - Tested `rbt land` with both merge and squash modes, and `--push`. - Tested `rbt patch` with a variety of changes, including both per-commit and squash modes. - Built docs and looked at the updated/added pages.
358ff590b72b5bcea498924763a89d337819161f

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

david
maubin
  1. 
      
  2. docs/rbtools/workflows/jujutsu.rst (Diff revisions 3 - 5)
     
     
    Show all issues

    I think its worth it to link to the per-user config page here https://www.reviewboard.org/docs/rbtools/latest/rbt/configuration/users/. You can use "personal configuration" as the link text.

    1. I think that particular link might be confusing because the settings useful for TREES are actually "repository" settings, not the "user" settings (which are documented on https://www.reviewboard.org/docs/rbtools/latest/rbt/configuration/repositories/). Let me think on this for a bit.

  3. rbtools/clients/jujutsu.py (Diff revisions 3 - 5)
     
     
    Show all issues

    The type needs to be updated here as well (get rid of Optional)

  4. 
      
david
david
Review request changed
Change Summary:

Link to the new top-level reviewboardrc section for "personal configuration file"

Commits:
Summary ID
Add support for Jujutsu.
Jujutsu is a new version control system which is rapidly gaining momentum. It works with Git remotes (and wraps Git internally for object storage, at least for now). This change adds an RBTools client for Jujutsu. Testing Done: - Ran unit tests. - Posted a variety of changes with various revision ranges. - Posted changes that included binary files. - Tested `rbt stamp` with both the head and non-head changes. - Tested `rbt land` with both merge and squash modes, and `--push`. - Tested `rbt patch` with a variety of changes, including both per-commit and squash modes. - Built docs and looked at the updated/added pages.
ea1649b88370704f8921bff176c8cfac444dce7c
Add support for Jujutsu.
Jujutsu is a new version control system which is rapidly gaining momentum. It works with Git remotes (and wraps Git internally for object storage, at least for now). This change adds an RBTools client for Jujutsu. Testing Done: - Ran unit tests. - Posted a variety of changes with various revision ranges. - Posted changes that included binary files. - Tested `rbt stamp` with both the head and non-head changes. - Tested `rbt land` with both merge and squash modes, and `--push`. - Tested `rbt patch` with a variety of changes, including both per-commit and squash modes. - Built docs and looked at the updated/added pages.
7f1b92804e2c2d8950fa0c06c7436e9cb0bac4af

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
maubin
  1. Ship It!
  2.