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.
aaa904778e5b707f3a6eb78c1e3c7aa80d03e6be
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 after '{' Column: 36 Error code: E201

reviewbotreviewbot

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

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

This is the only workflow guide that isn't organized into steps. It comes across more as general documentation for Jujutsu. …

chipx86chipx86

I feel like this initial comment isn't going to age well. Eventually it won't be new, or it'll have been …

chipx86chipx86

Two blank lines between content and reference definitions.

chipx86chipx86

Typo: "want ask" -> "want to ask".

chipx86chipx86

Almost commented that there's something missing here, until I read further. I think this means pxolvpnn from above? Can we …

chipx86chipx86

Given this logic, it seems we can avoid the second call if the first passes.

chipx86chipx86

We shouldn't re-type any of these. The parent owns the type.

chipx86chipx86

_local_path sorts after _has_multiple_remotes.

chipx86chipx86

Here and below, we aren't caching this result. Should we be? Otherwise repeated calls would repeat these checks.

chipx86chipx86

Are we guaranteed utf-8 from this file? Also, for consistency, context variable should be fp.

chipx86chipx86

Just in case, we might want to safeguard against a line with too many spaces crashing RBTools. Trust but verify.

chipx86chipx86

Missing a period. Might also be nice to include more context in this error.

chipx86chipx86

We're missing an explicit return None if this check fails.

chipx86chipx86

Can we briefly document what this is for?

chipx86chipx86

We should be asserting instead of casting. Removes an assumption and verifies.

chipx86chipx86

Can we pass as keyword-arguments?

chipx86chipx86

We should assert here too.

chipx86chipx86

Same as above.

chipx86chipx86

We have SCMClientCommitHistoryItem we can use. That also documents the keys.

chipx86chipx86

We can use the type here too.

chipx86chipx86

It'd be nice to end multi-line strings like this with the ) on the following line, matching multi-line lists and …

chipx86chipx86

Typo: entriely -> entirely

chipx86chipx86

Can we do: if not message: # comment message = 'No description set' entry['commit_message'] = message

chipx86chipx86

We should probably provide a message here. We have too many error messages from commands that are empty or confusing …

chipx86chipx86

Is this always true? I could see it if we were using a Jujutsu backend in RB, since any version …

chipx86chipx86

We should assert instead of cast.

chipx86chipx86

Same styling request as above re: multi-line strings. Same below.

chipx86chipx86

Here and elsewhere, the module path is now rbtools.diffs.patches.PatchAuthor.

chipx86chipx86

In the vast majority of cases (all the cases, I'm pretty sure), we use %s formatting within localized txt. We …

chipx86chipx86

We should document both the True and the False. Especially since in this case, it's always False. The comment has …

chipx86chipx86

Let's make this keyword-only. Too many diff-related functions have had to be changed in important ways over the years, and …

chipx86chipx86

These should take Sequence[str], since we're not modifying the lists. They're also documented as optional, but require a value.

chipx86chipx86

Description needs to be indented a level. Should also use :command: for the jj.

chipx86chipx86

Are we guaranteed utf-8 results?

chipx86chipx86

Just a suggestion. This could be simplified to: return (... or ... or self._get_remote_bookmark(tip))

chipx86chipx86

Description needs to be indented a level.

chipx86chipx86

Do we want to log any of this? What are the conditions in which it fails but we're okay with …

chipx86chipx86

Same question here.

chipx86chipx86

Same note as above re: multi-line strings.

chipx86chipx86

Description needs to be indented a level.

chipx86chipx86

This can use the standard run_process chain format.

chipx86chipx86

We may want to return a Sequence here, unless we want this to be mutable.

chipx86chipx86

Description needs to be indented a level.

chipx86chipx86

Same as above re: Sequence.

chipx86chipx86

Description needs to be indented a level.

chipx86chipx86

Description needs to be indented a level. Not going to flood the review with these, and I missed them above. …

chipx86chipx86

As above (earlier in the review), it'd be nice to provide some more explicit errors with context in the error …

chipx86chipx86

rb should be br. It may not matter so much anymore, but it used to in earlier versions of Python. …

chipx86chipx86

This is defined in the context, but used outside of it. Let's move it down to when we need it. …

chipx86chipx86

No need for the outer parens.

chipx86chipx86

We've always been explicit about the utf-8. I don't mind changing away from it, but we should decide if we're …

chipx86chipx86

Can this be one write?

chipx86chipx86

We should use "Git" and not "git" when referring to the SCM instead of the command.

chipx86chipx86

Same comment re: multi-line strings. Also let's list the SHA we're missing.

chipx86chipx86

No need for the parens.

chipx86chipx86

checks sorts before filesystem.

chipx86chipx86

We shouldn't redefine types in subclasses. This is owned by the parent.

chipx86chipx86

"Jujutsu"

chipx86chipx86

Can we make these keyword-only?

chipx86chipx86

Given the alignment, this reads pretty poorly, here and below. The pattern we use everywhere else is: message = ... …

chipx86chipx86
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
Diff:

Revision 4 (+7086 -24)

Show changes

docs/rbtools/index.rst
docs/rbtools/rbt/commands/post.rst
docs/rbtools/rbt/configuration/repositories.rst
docs/rbtools/workflows/index.rst
docs/rbtools/workflows/jujutsu.rst
rbtools/clients/jujutsu.py
rbtools/clients/base/registry.py
rbtools/clients/tests/test_jujutsu.py
1 more

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
maubin
  1. Ship It!
  2. 
      
chipx86
  1. 
      
  2. docs/rbtools/workflows/jujutsu.rst (Diff revision 7)
     
     
     
     
    Show all issues

    This is the only workflow guide that isn't organized into steps. It comes across more as general documentation for Jujutsu. While that's useful and can certainly fit into this guide, we should make sure this guide is Step-based.

    1. There's some general documentation but also steps. I'll make those labels clearer.

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

    I feel like this initial comment isn't going to age well. Eventually it won't be new, or it'll have been popular for a while, or it'll be defunct. Maybe describe the tool independent of recent history.

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

    Two blank lines between content and reference definitions.

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

    Typo: "want ask" -> "want to ask".

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

    Almost commented that there's something missing here, until I read further. I think this means pxolvpnn from above? Can we be explicit about this somehow? Coming from someone unfamiliar with Jujutsu, this was confusing.

    1. Yeah, it is. The actual console output from jj shows the revisions like "pxolvpnn" to indicate the minimum change ID you need to type. I'm still trying to figure out the best way to get custom highlighting in the samples to make that clearer.

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

    Given this logic, it seems we can avoid the second call if the first passes.

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

    We shouldn't re-type any of these. The parent owns the type.

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

    _local_path sorts after _has_multiple_remotes.

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

    Here and below, we aren't caching this result. Should we be? Otherwise repeated calls would repeat these checks.

    1. With the way commands initialize things, this will only get called once. Either we have a local path and can therefore use the jj repository (whether or not that ends up getting selected as the repository type), or we don't.

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

    Are we guaranteed utf-8 from this file?

    Also, for consistency, context variable should be fp.

    1. Given the implementation of jj I'm pretty sure it's utf-8, but it's stretching my rust knowledge.

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

    Just in case, we might want to safeguard against a line with too many spaces crashing RBTools. Trust but verify.

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

    Missing a period. Might also be nice to include more context in this error.

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

    We're missing an explicit return None if this check fails.

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

    Can we briefly document what this is for?

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

    We should be asserting instead of casting. Removes an assumption and verifies.

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

    Can we pass as keyword-arguments?

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

    We should assert here too.

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

    Same as above.

  20. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
    Show all issues

    We have SCMClientCommitHistoryItem we can use. That also documents the keys.

  21. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
    Show all issues

    We can use the type here too.

  22. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
     
     
     
     
     
    Show all issues

    It'd be nice to end multi-line strings like this with the ) on the following line, matching multi-line lists and dictionaries. Gives more room for text and minimizes syntactical changes when modifying text.

  23. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
    Show all issues

    Typo: entriely -> entirely

  24. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
     
     
     
     
    Show all issues

    Can we do:

    if not message:
        # comment
        message = 'No description set'
    
    entry['commit_message'] = message
    
  25. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
    Show all issues

    We should probably provide a message here. We have too many error messages from commands that are empty or confusing with little-to-no context today.

    Also, these should be passed a str(e), I think, instead of e.

    Same below.

  26. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
     
     
     
     
     
     
     
    Show all issues

    Is this always true? I could see it if we were using a Jujutsu backend in RB, since any version supporting that would support empty files, but if using new RBTools with older Review Board, this would be incorrect.

  27. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
    Show all issues

    We should assert instead of cast.

  28. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
     
    Show all issues

    Same styling request as above re: multi-line strings.

    Same below.

  29. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
    Show all issues

    Here and elsewhere, the module path is now rbtools.diffs.patches.PatchAuthor.

  30. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
    Show all issues

    In the vast majority of cases (all the cases, I'm pretty sure), we use %s formatting within localized txt. We should stay consistent. Here and below.

    1. I want to transition to using .format(), especially for when we have multiple things we're formatting in, but also as a general rule. I'll change these to use an explicit {output} to make that more clear.

  31. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
     
     
     
     
     
    Show all issues

    We should document both the True and the False. Especially since in this case, it's always False.

    The comment has some important information here, and at least some of it (or the implications) should live in the docs for the function.

  32. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
     
     
     
     
     
    Show all issues

    Let's make this keyword-only. Too many diff-related functions have had to be changed in important ways over the years, and positional arguments make that annoying.

  33. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
    Show all issues

    These should take Sequence[str], since we're not modifying the lists.

    They're also documented as optional, but require a value.

  34. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
    Show all issues

    Description needs to be indented a level.

    Should also use :command: for the jj.

  35. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
    Show all issues

    Are we guaranteed utf-8 results?

  36. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
     
     
     
     
     
    Show all issues

    Just a suggestion. This could be simplified to:

    return (... or
            ... or
            self._get_remote_bookmark(tip))
    
  37. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
    Show all issues

    Description needs to be indented a level.

  38. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
    Show all issues

    Do we want to log any of this? What are the conditions in which it fails but we're okay with it? Can we document that here?

    1. To be honest I don't know that these can fail, but I figured it was best to wrap them. I'll add some log statements.

  39. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
    Show all issues

    Same question here.

  40. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
     
    Show all issues

    Same note as above re: multi-line strings.

  41. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
    Show all issues

    Description needs to be indented a level.

  42. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
     
    Show all issues

    This can use the standard run_process chain format.

  43. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
    Show all issues

    We may want to return a Sequence here, unless we want this to be mutable.

  44. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
    Show all issues

    Description needs to be indented a level.

  45. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
    Show all issues

    Same as above re: Sequence.

  46. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
    Show all issues

    Description needs to be indented a level.

  47. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
    Show all issues

    Description needs to be indented a level.

    Not going to flood the review with these, and I missed them above. Can you go through all Raises blocks and check?

  48. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
    Show all issues

    As above (earlier in the review), it'd be nice to provide some more explicit errors with context in the error message, in case we get something useless here.

  49. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
    Show all issues

    rb should be br.

    It may not matter so much anymore, but it used to in earlier versions of Python. I remember hitting this all the time because I kept wanting to type rb. We should be consistent either way.

  50. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
    Show all issues

    This is defined in the context, but used outside of it. Let's move it down to when we need it.

    All of these should probably be moved out, really.

    1. I don't know what you mean it's used outside of the context? Everything in this function is inside the with ... as p

  51. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
    Show all issues

    No need for the outer parens.

  52. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
     
    Show all issues

    We've always been explicit about the utf-8. I don't mind changing away from it, but we should decide if we're doing that going forward for all new code. Might be worth a discussion in Slack to get on the same page.

    1. I guess I don't feel strongly either way. Seems a bit cleaner to just do it this way, but being explicit isn't a bad thing.

  53. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
    Show all issues

    Can this be one write?

    1. Could be, but I feel like this is easier to read.

  54. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
     
     
     
    Show all issues

    We should use "Git" and not "git" when referring to the SCM instead of the command.

  55. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
     
     
    Show all issues

    Same comment re: multi-line strings.

    Also let's list the SHA we're missing.

  56. rbtools/clients/jujutsu.py (Diff revision 7)
     
     
    Show all issues

    No need for the parens.

  57. rbtools/clients/tests/test_jujutsu.py (Diff revision 7)
     
     
     
     
    Show all issues

    checks sorts before filesystem.

  58. rbtools/clients/tests/test_jujutsu.py (Diff revision 7)
     
     
    Show all issues

    We shouldn't redefine types in subclasses. This is owned by the parent.

  59. rbtools/clients/tests/test_jujutsu.py (Diff revision 7)
     
     
     
     
    Show all issues

    "Jujutsu"

  60. rbtools/clients/tests/test_jujutsu.py (Diff revision 7)
     
     
     
     
     
     
     
     
    Show all issues

    Can we make these keyword-only?

  61. rbtools/clients/tests/test_jujutsu.py (Diff revision 7)
     
     
     
     
     
    Show all issues

    Given the alignment, this reads pretty poorly, here and below. The pattern we use everywhere else is:

    message = ...
    
    with self.assertRaisesMessage(exception, message):
        ...
    
  62. 
      
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.
7f1b92804e2c2d8950fa0c06c7436e9cb0bac4af
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.
aaa904778e5b707f3a6eb78c1e3c7aa80d03e6be
Diff:

Revision 8 (+7272 -24)

Show changes

pyproject.toml
docs/rbtools/index.rst
docs/rbtools/rbt/commands/post.rst
docs/rbtools/rbt/configuration/repositories.rst
docs/rbtools/workflows/index.rst
docs/rbtools/workflows/jujutsu.rst
rbtools/clients/git.py
rbtools/clients/jujutsu.py
3 more

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
Loading...