• 
      

    Add support for Jujutsu.

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

    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.

    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.
    397d4afcbb556d9cb7b814e216ff593683b3242f
    Description From Last Updated

    maubin maubin

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

    reviewbot reviewbot

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

    reviewbot reviewbot

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

    reviewbot reviewbot

    multiple spaces before operator Column: 13 Error code: E221

    reviewbot reviewbot

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

    reviewbot reviewbot

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

    reviewbot reviewbot

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

    reviewbot reviewbot

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

    reviewbot reviewbot

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

    reviewbot reviewbot

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

    reviewbot reviewbot

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

    reviewbot reviewbot

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

    reviewbot reviewbot

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

    reviewbot reviewbot

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

    reviewbot reviewbot

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

    reviewbot reviewbot

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

    reviewbot reviewbot

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

    reviewbot reviewbot

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

    maubin maubin

    Typo: thtrough

    maubin maubin

    I think there's an extra : here?

    maubin maubin

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

    maubin maubin

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

    maubin maubin

    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 …

    maubin maubin

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

    maubin maubin

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

    maubin maubin

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

    maubin maubin

    Missing the Raises section in the docstring.

    maubin maubin

    Missing the Raises section in the docstring.

    maubin maubin

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

    maubin maubin

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

    maubin maubin

    Add , optional

    maubin maubin

    Missing a Raises section in the docstring.

    maubin maubin

    Add , optional

    maubin maubin

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

    maubin maubin

    Here too.

    maubin maubin

    Here too. And its missing Args and Returns.

    maubin maubin

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

    reviewbot reviewbot

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

    chipx86 chipx86

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

    chipx86 chipx86

    Two blank lines between content and reference definitions.

    chipx86 chipx86

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

    chipx86 chipx86

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

    chipx86 chipx86

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

    chipx86 chipx86

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

    chipx86 chipx86

    _local_path sorts after _has_multiple_remotes.

    chipx86 chipx86

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

    chipx86 chipx86

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

    chipx86 chipx86

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

    chipx86 chipx86

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

    chipx86 chipx86

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

    chipx86 chipx86

    Do we want to capitalize Jujutsu here too?

    maubin maubin

    Can we briefly document what this is for?

    chipx86 chipx86

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

    chipx86 chipx86

    Can we pass as keyword-arguments?

    chipx86 chipx86

    We should assert here too.

    chipx86 chipx86

    Same as above.

    chipx86 chipx86

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

    chipx86 chipx86

    We can use the type here too.

    chipx86 chipx86

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

    chipx86 chipx86

    Typo: entriely -> entirely

    chipx86 chipx86

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

    chipx86 chipx86

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

    chipx86 chipx86

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

    chipx86 chipx86

    We should assert instead of cast.

    chipx86 chipx86

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

    chipx86 chipx86

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

    chipx86 chipx86

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

    chipx86 chipx86

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

    chipx86 chipx86

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

    chipx86 chipx86

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

    chipx86 chipx86

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

    chipx86 chipx86

    Are we guaranteed utf-8 results?

    chipx86 chipx86

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

    chipx86 chipx86

    Description needs to be indented a level.

    chipx86 chipx86

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

    chipx86 chipx86

    Same question here.

    chipx86 chipx86

    Same note as above re: multi-line strings.

    chipx86 chipx86

    Description needs to be indented a level.

    chipx86 chipx86

    This can use the standard run_process chain format.

    chipx86 chipx86

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

    chipx86 chipx86

    Description needs to be indented a level.

    chipx86 chipx86

    Same as above re: Sequence.

    chipx86 chipx86

    Description needs to be indented a level.

    chipx86 chipx86

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

    chipx86 chipx86

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

    chipx86 chipx86

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

    chipx86 chipx86

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

    chipx86 chipx86

    No need for the outer parens.

    chipx86 chipx86

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

    chipx86 chipx86

    Can this be one write?

    chipx86 chipx86

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

    chipx86 chipx86

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

    chipx86 chipx86

    No need for the parens.

    chipx86 chipx86

    checks sorts before filesystem.

    chipx86 chipx86

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

    chipx86 chipx86

    "Jujutsu"

    chipx86 chipx86

    Can we make these keyword-only?

    chipx86 chipx86

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

    chipx86 chipx86

    Can we do one per line? This is much harder to read and maintain this way.

    chipx86 chipx86

    Should we log here?

    chipx86 chipx86

    Same here re: one per line.

    chipx86 chipx86
    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
    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
    david
    david
    maubin
    1. 
        
    2. rbtools/clients/jujutsu.py (Diff revisions 7 - 10)
       
       
      Show all issues

      Do we want to capitalize Jujutsu here too?

    3. 
        
    david
    maubin
    1. Ship It!
    2. 
        
    chipx86
    1. Looks great!

      Couple small readability nits.

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

      Can we do one per line? This is much harder to read and maintain this way.

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

      Should we log here?

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

      Same here re: one per line.

    5. 
        
    david
    chipx86
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (9a98bc7)