Add command for configuring a repository to point to a Review Board server

Review Request #4662 — Created Sept. 28, 2013 and submitted

Information

RBTools
master

Reviewers

Add command for configuring a repository to point to a Review Board server

The new command 'setup-repo' interactively creates the configuration file
.reviewboard in the user's current working directory.

Reviewed at https://reviews.reviewboard.org/r/4662/

Tested with Git and Subversion on two Review Board servers.

Unit tests pass.

Description From Last Updated

'CommandError' imported but unused

reviewbotreviewbot

Col: 80 E501 line too long (82 > 79 characters)

reviewbotreviewbot

'test' imported but unused

reviewbotreviewbot

'json' imported but unused

reviewbotreviewbot

'CommandError' imported but unused

reviewbotreviewbot

You might want to look at using distutils.util.strtobool, as that can support multiple ways of yes/no, and can just return …

PU puiterwijk

'test' imported but unused

reviewbotreviewbot

'json' imported but unused

reviewbotreviewbot

local variable 'origcwd' is assigned to but never used

reviewbotreviewbot

Duplicate line. Need to remove.

ED edwlee

'test' imported but unused

reviewbotreviewbot

'json' imported but unused

reviewbotreviewbot

undefined name 'PerforceClient'

reviewbotreviewbot

local variable 'newfile' is assigned to but never used

reviewbotreviewbot

Col: 1 W391 blank line at end of file

reviewbotreviewbot

'test' imported but unused

reviewbotreviewbot

'json' imported but unused

reviewbotreviewbot

undefined name 'PerforceClient'

reviewbotreviewbot

local variable 'newfile' is assigned to but never used

reviewbotreviewbot

'test' imported but unused

reviewbotreviewbot

'json' imported but unused

reviewbotreviewbot

undefined name 'PerforceClient'

reviewbotreviewbot

local variable 'newfile' is assigned to but never used

reviewbotreviewbot

Col: 20 E127 continuation line over-indented for visual indent

reviewbotreviewbot

Col: 20 E127 continuation line over-indented for visual indent

reviewbotreviewbot

Col: 80 E501 line too long (80 > 79 characters)

reviewbotreviewbot

'test' imported but unused

reviewbotreviewbot

'json' imported but unused

reviewbotreviewbot

undefined name 'PerforceClient'

reviewbotreviewbot

local variable 'newfile' is assigned to but never used

reviewbotreviewbot

Col: 80 E501 line too long (83 > 79 characters)

reviewbotreviewbot

Col: 20 E127 continuation line over-indented for visual indent

reviewbotreviewbot

Col: 80 E501 line too long (80 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (90 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (80 > 79 characters)

reviewbotreviewbot

'test' imported but unused

reviewbotreviewbot

'json' imported but unused

reviewbotreviewbot

I think I'd like "guess_current_branch" more. This method will actually "guess" the branch, rather than "get the guess". I also …

SM smacleod

While a lot of old code doesn't match this, the format should be: """One-line summary.""" or: """One-line summary. Multi-line description. …

chipx86chipx86

I'd like to see a docstring on this, and as part of it an explanation (in git terms) of what …

SM smacleod

This should not be changed like this here. Any command that talks to the Review Board server needs to support …

SM smacleod

Imports go in three groups: Built-in Python modules. Third-party Python modules. Modules as part of the current codebase. The rbtools …

chipx86chipx86

Class names never use _. They're CamelCase.

chipx86chipx86

"Interactively creates"

chipx86chipx86

If you could try to wrap the text so that it's more consistent at where the line ends, that would …

chipx86chipx86

How about we just switch this to say "if the scm client supports it"

SM smacleod

name = "config-repo"

SM smacleod

Maybe we should have something about generating a configuration file here

SM smacleod

I don't know how I feel about changing this from the same option we use for all other commands. Should …

SM smacleod

Same note about docstrings. This applies to all remaining ones.

chipx86chipx86

Docstrings should have a single line summary on the first line, and then a longer description after, like your docstring …

SM smacleod

These don't need to be raw strings.

chipx86chipx86

Same docstring formatting

SM smacleod

This will not return every repository. The API resources are paged so you'll need to be looping through the pages …

SM smacleod

Blank line between these (surrounding blocks)

chipx86chipx86

This if statement is a bit unwieldy. Maybe break it up. You can do: is_match = ( tool_name == repo.tool …

chipx86chipx86

Blank line before.

chipx86chipx86

It's unclear to me what's happening here. In one case, if the user says Yes, we return directly. Otherwise, if …

chipx86chipx86

We do this tool comparison twice. Might be nice to first filter into a list of repositories matching the proper …

chipx86chipx86

Blank line before.

chipx86chipx86

Missing a docstring for this function.

chipx86chipx86

This is unnecessary since the RBTools API doesn't support any reviewboard version <1.6.12 or something

SM smacleod

Missing a docstring.

chipx86chipx86

This won't work in Python 2.4, or 2.5 without importing with_statement from __future__.

chipx86chipx86

print is wrong here. You should be using die().

chipx86chipx86

This could be combined to one statement.

chipx86chipx86

Use parens for multiple lines instead of . In this case, we usually like to see it like: print ('......' …

chipx86chipx86

Shouldn't call sys.exit. Instead, just return. We don't want callers that call into these classes to exit prematurely.

chipx86chipx86

Ideally, this file wouldn't know which can be guessed. Instead, try calling get_guessed_branch, and if it raises NotImplementedError, catch it …

chipx86chipx86

let's make this "config-repo", instead of "config_repo". We've set a convention with the "api-get", and "list-repo-types" commands that we use …

SM smacleod

All other commands use - instead of _. I think a better name for this would just be "setup", or …

chipx86chipx86

The === length should match the title.

chipx86chipx86

Should be one line.

chipx86chipx86

Python 2.4 doesn't support with, so we can't use that.

chipx86chipx86

"it attempts to guess"

chipx86chipx86

Not all repositories use this format. For example, git@github.com:reviewboard/reviewboard. Nothing else in our codebase attempts to fuzzy-match repositories. I'd suggest …

chipx86chipx86

This needs to compare against both path and mirror_path.

chipx86chipx86

One line.

chipx86chipx86

Can't use with on Python 2.4.

chipx86chipx86

Can't use .format() on the versions of Python we support.

chipx86chipx86

There will always be a name, and we should always generate with a name and not a path.

chipx86chipx86

This doesn't look like it will render the cofnig very nicely to the user.

chipx86chipx86

What about Y, N, YES, Yes, NO, No, etc? Is it case-sensitive?

chipx86chipx86

If this fails, we should probably display something like %s is not a valid answer first.

chipx86chipx86

Two blank lines between top-level items.

daviddavid
reviewbot
  1. This is a review from Review Bot.
    Tool: PEP8 Style Checker
    Processed Files:
    rbtools/commands/create_rc.py
    setup.py
    Ignored Files:

  2. rbtools/commands/create_rc.py (Diff revision 1)
     
     
    Show all issues

    Col: 80
    E501 line too long (82 > 79 characters)

  3. 
      
reviewbot
  1. This is a review from Review Bot.
    Tool: Pyflakes
    Processed Files:
    rbtools/commands/create_rc.py
    setup.py
    Ignored Files:

  2. rbtools/commands/create_rc.py (Diff revision 1)
     
     
    Show all issues

    'CommandError' imported but unused

  3. setup.py (Diff revision 1)
     
     
    Show all issues

    'test' imported but unused

  4. setup.py (Diff revision 1)
     
     
    Show all issues

    'json' imported but unused

  5. 
      
ED
reviewbot
  1. This is a review from Review Bot.
    Tool: PEP8 Style Checker
    Processed Files:
    rbtools/commands/create_rc.py
    setup.py
    Ignored Files:

  2. 
      
reviewbot
  1. This is a review from Review Bot.
    Tool: Pyflakes
    Processed Files:
    rbtools/commands/create_rc.py
    setup.py
    Ignored Files:

  2. rbtools/commands/create_rc.py (Diff revision 2)
     
     
    Show all issues

    'CommandError' imported but unused

  3. setup.py (Diff revision 2)
     
     
    Show all issues

    'test' imported but unused

  4. setup.py (Diff revision 2)
     
     
    Show all issues

    'json' imported but unused

  5. 
      
PU
  1. 
      
  2. rbtools/commands/create_rc.py (Diff revision 2)
     
     
    Show all issues

    You might want to look at using distutils.util.strtobool, as that can support multiple ways of yes/no, and can just return True, False or ValueError.

    1. Thanks for the tip!

  3. 
      
ED
reviewbot
  1. This is a review from Review Bot.
    Tool: PEP8 Style Checker
    Processed Files:
    rbtools/commands/create_rc.py
    setup.py
    Ignored Files:

  2. 
      
reviewbot
  1. This is a review from Review Bot.
    Tool: Pyflakes
    Processed Files:
    rbtools/commands/create_rc.py
    setup.py
    Ignored Files:

  2. rbtools/commands/create_rc.py (Diff revision 3)
     
     
    Show all issues

    local variable 'origcwd' is assigned to but never used

  3. setup.py (Diff revision 3)
     
     
    Show all issues

    'test' imported but unused

  4. setup.py (Diff revision 3)
     
     
    Show all issues

    'json' imported but unused

  5. 
      
ED
  1. 
      
  2. rbtools/commands/create_rc.py (Diff revision 3)
     
     
    Show all issues

    Duplicate line. Need to remove.

  3. 
      
ED
reviewbot
  1. This is a review from Review Bot.
    Tool: PEP8 Style Checker
    Processed Files:
    rbtools/commands/create_rc.py
    setup.py
    rbtools/clients/init.py
    rbtools/commands/init.py
    rbtools/clients/git.py
    Ignored Files:

  2. rbtools/clients/git.py (Diff revision 4)
     
     
    Show all issues

    Col: 1
    W391 blank line at end of file

  3. 
      
reviewbot
  1. This is a review from Review Bot.
    Tool: Pyflakes
    Processed Files:
    rbtools/commands/create_rc.py
    setup.py
    rbtools/clients/init.py
    rbtools/commands/init.py
    rbtools/clients/git.py
    Ignored Files:

  2. rbtools/clients/git.py (Diff revision 4)
     
     
    Show all issues

    undefined name 'PerforceClient'

  3. rbtools/clients/git.py (Diff revision 4)
     
     
    Show all issues

    local variable 'newfile' is assigned to but never used

  4. setup.py (Diff revision 4)
     
     
    Show all issues

    'test' imported but unused

  5. setup.py (Diff revision 4)
     
     
    Show all issues

    'json' imported but unused

  6. 
      
ED
reviewbot
  1. This is a review from Review Bot.
    Tool: PEP8 Style Checker
    Processed Files:
    rbtools/commands/create_rc.py
    setup.py
    rbtools/clients/init.py
    rbtools/commands/init.py
    rbtools/clients/git.py
    Ignored Files:

  2. 
      
reviewbot
  1. This is a review from Review Bot.
    Tool: Pyflakes
    Processed Files:
    rbtools/commands/create_rc.py
    setup.py
    rbtools/clients/init.py
    rbtools/commands/init.py
    rbtools/clients/git.py
    Ignored Files:

  2. rbtools/clients/git.py (Diff revision 5)
     
     
    Show all issues

    undefined name 'PerforceClient'

  3. rbtools/clients/git.py (Diff revision 5)
     
     
    Show all issues

    local variable 'newfile' is assigned to but never used

  4. setup.py (Diff revision 5)
     
     
    Show all issues

    'test' imported but unused

  5. setup.py (Diff revision 5)
     
     
    Show all issues

    'json' imported but unused

  6. 
      
ED
reviewbot
  1. This is a review from Review Bot.
    Tool: PEP8 Style Checker
    Processed Files:
    rbtools/commands/config_repo.py
    setup.py
    rbtools/clients/init.py
    rbtools/commands/init.py
    rbtools/clients/git.py
    Ignored Files:

  2. rbtools/commands/config_repo.py (Diff revision 6)
     
     
    Show all issues

    Col: 20
    E127 continuation line over-indented for visual indent

  3. rbtools/commands/config_repo.py (Diff revision 6)
     
     
    Show all issues

    Col: 20
    E127 continuation line over-indented for visual indent

  4. rbtools/commands/config_repo.py (Diff revision 6)
     
     
    Show all issues

    Col: 80
    E501 line too long (80 > 79 characters)

  5. 
      
reviewbot
  1. This is a review from Review Bot.
    Tool: Pyflakes
    Processed Files:
    rbtools/commands/config_repo.py
    setup.py
    rbtools/clients/init.py
    rbtools/commands/init.py
    rbtools/clients/git.py
    Ignored Files:

  2. rbtools/clients/git.py (Diff revision 6)
     
     
    Show all issues

    undefined name 'PerforceClient'

  3. rbtools/clients/git.py (Diff revision 6)
     
     
    Show all issues

    local variable 'newfile' is assigned to but never used

  4. setup.py (Diff revision 6)
     
     
    Show all issues

    'test' imported but unused

  5. setup.py (Diff revision 6)
     
     
    Show all issues

    'json' imported but unused

  6. 
      
ED
reviewbot
  1. This is a review from Review Bot.
    Tool: PEP8 Style Checker
    Processed Files:
    rbtools/commands/config_repo.py
    setup.py
    rbtools/clients/init.py
    rbtools/commands/init.py
    rbtools/clients/git.py
    Ignored Files:

  2. rbtools/commands/config_repo.py (Diff revision 7)
     
     
    Show all issues

    Col: 80
    E501 line too long (83 > 79 characters)

  3. rbtools/commands/config_repo.py (Diff revision 7)
     
     
    Show all issues

    Col: 20
    E127 continuation line over-indented for visual indent

  4. rbtools/commands/config_repo.py (Diff revision 7)
     
     
    Show all issues

    Col: 80
    E501 line too long (80 > 79 characters)

  5. rbtools/commands/config_repo.py (Diff revision 7)
     
     
    Show all issues

    Col: 80
    E501 line too long (90 > 79 characters)

  6. rbtools/commands/config_repo.py (Diff revision 7)
     
     
    Show all issues

    Col: 80
    E501 line too long (80 > 79 characters)

  7. 
      
reviewbot
  1. This is a review from Review Bot.
    Tool: Pyflakes
    Processed Files:
    rbtools/commands/config_repo.py
    setup.py
    rbtools/clients/init.py
    rbtools/commands/init.py
    rbtools/clients/git.py
    Ignored Files:

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

    undefined name 'PerforceClient'

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

    local variable 'newfile' is assigned to but never used

  4. setup.py (Diff revision 7)
     
     
    Show all issues

    'test' imported but unused

  5. setup.py (Diff revision 7)
     
     
    Show all issues

    'json' imported but unused

  6. 
      
ED
chipx86
  1. 
      
  2. rbtools/clients/__init__.py (Diff revision 8)
     
     
     
     
     
    Show all issues

    While a lot of old code doesn't match this, the format should be:

    """One-line summary."""

    or:

    """One-line summary.

    Multi-line description.
    """

  3. rbtools/commands/config_repo.py (Diff revision 8)
     
     
     
     
     
    Show all issues

    Imports go in three groups:

    1. Built-in Python modules.
    2. Third-party Python modules.
    3. Modules as part of the current codebase.

    The rbtools imports should be separated from the distutils/pkg_resources ones.

  4. rbtools/commands/config_repo.py (Diff revision 8)
     
     
    Show all issues

    Class names never use _. They're CamelCase.

  5. rbtools/commands/config_repo.py (Diff revision 8)
     
     
     
    Show all issues

    "Interactively creates"

  6. rbtools/commands/config_repo.py (Diff revision 8)
     
     
     
     
     
     
     
     
     
     
    Show all issues

    If you could try to wrap the text so that it's more consistent at where the line ends, that would be great. Each line should end as close as possible to column 79.

  7. rbtools/commands/config_repo.py (Diff revision 8)
     
     
     
     
     
    Show all issues

    Same note about docstrings.

    This applies to all remaining ones.

  8. rbtools/commands/config_repo.py (Diff revision 8)
     
     
     
    Show all issues

    These don't need to be raw strings.

  9. rbtools/commands/config_repo.py (Diff revision 8)
     
     
     
    Show all issues

    Blank line between these (surrounding blocks)

  10. rbtools/commands/config_repo.py (Diff revision 8)
     
     
     
     
    Show all issues

    This if statement is a bit unwieldy. Maybe break it up. You can do:

    is_match = (
    tool_name == repo.tool and
    self.match_repository_paths(...))

    if is_match:

    May seem silly, but it's nice to keep conditionals a bit simpler.

  11. rbtools/commands/config_repo.py (Diff revision 8)
     
     
    Show all issues

    Blank line before.

  12. rbtools/commands/config_repo.py (Diff revision 8)
     
     
     
     
     
     
    Show all issues

    It's unclear to me what's happening here.

    In one case, if the user says Yes, we return directly. Otherwise, if they say no, we're storing the name. "matched" makes it sound like one that's valid and good, but it seems to me that it's one that we don't want. That could come up multiple times, so that should be a list of discarded_repo_names.

    Can you add some comments explaining the workflow for what this is all doing?

    1. My intention was to store the names of matched repos. In the case the user does not select a matching repo, he/she would be prompted to choose from a list of non-matching repos (derived from the set of all repos minus matching repos). I made the mistake of storing only the most recently found match, instead of storing all matches in a list.

      I've decided to make the logic simpler by only prompting for matching repos.

  13. rbtools/commands/config_repo.py (Diff revision 8)
     
     
    Show all issues

    We do this tool comparison twice. Might be nice to first filter into a list of repositories matching the proper tool. You can do this in the first pass so that you're only iterating through the good list the second time.

    In fact, I mentioned a discarded_repo_names list above. We could build a list of good repo names that consists of every entry matching the repo name and not explicitly denied by the user.

    1. As mentioned above. I'll be removing this loop to keep the logic simpler.

  14. rbtools/commands/config_repo.py (Diff revision 8)
     
     
    Show all issues

    Blank line before.

  15. rbtools/commands/config_repo.py (Diff revision 8)
     
     
    Show all issues

    Missing a docstring for this function.

    1. This method will be removed as all RB versions supported by RBTools support repo names.

  16. rbtools/commands/config_repo.py (Diff revision 8)
     
     
    Show all issues

    Missing a docstring.

  17. rbtools/commands/config_repo.py (Diff revision 8)
     
     
    Show all issues

    This won't work in Python 2.4, or 2.5 without importing with_statement from __future__.

    1. Should this be an conditional import based on the Python version?

  18. rbtools/commands/config_repo.py (Diff revision 8)
     
     
    Show all issues

    print is wrong here. You should be using die().

    1. Not die(), raise a CommandError(), which will print the error message and exit.

  19. rbtools/commands/config_repo.py (Diff revision 8)
     
     
     
    Show all issues

    This could be combined to one statement.

  20. rbtools/commands/config_repo.py (Diff revision 8)
     
     
     
     
    Show all issues

    Use parens for multiple lines instead of .

    In this case, we usually like to see it like:

    print ('......'
           '....'
           % (...))
    
  21. rbtools/commands/config_repo.py (Diff revision 8)
     
     
    Show all issues

    Shouldn't call sys.exit. Instead, just return. We don't want callers that call into these classes to exit prematurely.

    1. Yeah, no sys.exit from commands. You'll want to either return as Christian said, or raise a CommandExit()

  22. rbtools/commands/config_repo.py (Diff revision 8)
     
     
     
     
    Show all issues

    Ideally, this file wouldn't know which can be guessed. Instead, try calling get_guessed_branch, and if it raises NotImplementedError, catch it and ignore. We'll only store a branch if the tool supports it.

    That way, it's easy to add support without touching this file, and third parties can add support as well to their own modules.

  23. setup.py (Diff revision 8)
     
     
    Show all issues

    All other commands use - instead of _.

    I think a better name for this would just be "setup", or "setup-repo", but I want David and Steven to weigh in on that.

    1. Yeah, I like "setup-repo", or "init-repo" or "init".

    2. I changed the name to "setup-repo". I'll leave this issue open for David's feedback.

  24. 
      
SM
  1. 
      
  2. rbtools/clients/__init__.py (Diff revision 8)
     
     
     
     
     
    Show all issues

    I think I'd like "guess_current_branch" more. This method will actually "guess" the branch, rather than "get the guess".

    I also kind of like throwing "current" in there since this could be a working directory supporting multiple branches (such as in the git case).

    As for the docstring styling, let's go ahead and update this to look like the PEP8 docstrings (see sanitize_changenum above). I understand you're probably just following the majority style in this file, but it does appear we've started to transition to the standard style, so lets keep going.

    I'd also like if we could be a little more verbose in describing the intended purpose of this method. How about something like::

    """Guess the repository branch of the current directory.
    
    Derived classes should override this method if they
    are able to determine the current branch of the working
    directory.
    
    The name of the branch which diffs will be generated
    against should returned. If a derived class supports
    guessing, but is unable to determine the branch,
    ``None`` should be returned.
    """
    
    1. As discussed over IRC, this has been renamed to "get_current_branch".

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

    I'd like to see a docstring on this, and as part of it an explanation (in git terms) of what branch is being returned

  4. rbtools/commands/__init__.py (Diff revision 8)
     
     
     
    Show all issues

    This should not be changed like this here.

    Any command that talks to the Review Board server needs to support the "username" and "password" options. (These should be added to your command)

    As part of a cleanup I'd like to have some pre-defined options like:

    RB_SERVER_OPTIONS = [
        ...
    ]
    
    SCM_CLIENT_OPTIONS = [
        ...
    ]
    

    and any commands that use the respective functionality just add these to their list of options. I haven't got around to doing this yet though.

  5. rbtools/commands/config_repo.py (Diff revision 8)
     
     
     
    Show all issues

    How about we just switch this to say "if the scm client supports it"

  6. rbtools/commands/config_repo.py (Diff revision 8)
     
     
    Show all issues

    name = "config-repo"

  7. rbtools/commands/config_repo.py (Diff revision 8)
     
     
    Show all issues

    Maybe we should have something about generating a configuration file here

  8. rbtools/commands/config_repo.py (Diff revision 8)
     
     
     
     
     
    Show all issues

    I don't know how I feel about changing this from the same option we use for all other commands.

    Should probably be:

        Option("--server",
               dest="server",
               metavar="SERVER",
               config_key="REVIEWBOARD_URL",
               default=None,
               help="specify a different Review Board server to use"),
    
  9. rbtools/commands/config_repo.py (Diff revision 8)
     
     
     
     
     
    Show all issues

    Docstrings should have a single line summary on the first line, and then a longer description after, like your docstring for the whole command

  10. rbtools/commands/config_repo.py (Diff revision 8)
     
     
     
     
     
     
    Show all issues

    Same docstring formatting

  11. rbtools/commands/config_repo.py (Diff revision 8)
     
     
     
     
     
    Show all issues

    This will not return every repository. The API resources are paged so you'll need to be looping through the pages as well. You can see an example of this in "rbt post", in the "get_repository_path" method. You'll do something like:

    repositories = api_root.get_repositories()
    
    try:
        while True:
            for repo in repositories:
                # Your looping in here
    
            repositories = repositories.get_next()
    except StopIteration:
        pass
    
  12. rbtools/commands/config_repo.py (Diff revision 8)
     
     
     
    Show all issues

    This is unnecessary since the RBTools API doesn't support any reviewboard version <1.6.12 or something

  13. setup.py (Diff revision 8)
     
     
    Show all issues

    let's make this "config-repo", instead of "config_repo". We've set a convention with the "api-get", and "list-repo-types" commands that we use dashes to seperate words in command names.

  14. 
      
ED
  1. 
      
  2. setup.py (Diff revision 8)
     
     

    I'm not sure if "setup" is the right word here since it's a noun, not a verb (although it's pretty much become a verb through consistent misuse). "Set-up-repo" would be more correct.

  3. 
      
ED
  1. 
      
  2. rbtools/clients/__init__.py (Diff revision 8)
     
     
     
     
     

    I don't think my description for this method is clear enough. The method is meant to guess the branch name of the server's repository (i.e. for the BRANCH config value in .reviewboardrc), not the branch of the current working directory. In this case we wouldn't want "current" in the method name.

    1. So, the reason I suggested the doc string I did, is because different repository types have different branching models and terminology. In the git case, the branch we would like is the "tracking-branch" most likely. But in the subversion case, it's just the current branch.

      Since this command will most likely be run on the tracking-branch itself, and not some feature branch, the "current branch" and the "tracking-branch" should be the same. I can definitely see uses for this function as well if we have it just return the current branch. Does this make more sense?

    2. Yep that makes sense now. Thanks!

  3. 
      
ED
ED
ED
ED
ED
chipx86
  1. 
      
  2. docs/rbtools/rbt/commands/setup-repo.txt (Diff revision 12)
     
     
     
     
    Show all issues

    The === length should match the title.

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

    Should be one line.

  4. rbtools/commands/setup_repo.py (Diff revision 12)
     
     
    Show all issues

    Python 2.4 doesn't support with, so we can't use that.

  5. rbtools/commands/setup_repo.py (Diff revision 12)
     
     
    Show all issues

    "it attempts to guess"

  6. rbtools/commands/setup_repo.py (Diff revision 12)
     
     
     
    Show all issues

    Not all repositories use this format. For example, git@github.com:reviewboard/reviewboard.

    Nothing else in our codebase attempts to fuzzy-match repositories. I'd suggest just doing a direct compare. You probably won't need this function.

  7. rbtools/commands/setup_repo.py (Diff revision 12)
     
     
     
    Show all issues

    This needs to compare against both path and mirror_path.

  8. rbtools/commands/setup_repo.py (Diff revision 12)
     
     
     
    Show all issues

    One line.

  9. rbtools/commands/setup_repo.py (Diff revision 12)
     
     
    Show all issues

    Can't use with on Python 2.4.

  10. rbtools/commands/setup_repo.py (Diff revision 12)
     
     
     
    Show all issues

    Can't use .format() on the versions of Python we support.

  11. rbtools/commands/setup_repo.py (Diff revision 12)
     
     
    Show all issues

    There will always be a name, and we should always generate with a name and not a path.

  12. rbtools/commands/setup_repo.py (Diff revision 12)
     
     
     
     
     
     
     
    Show all issues

    This doesn't look like it will render the cofnig very nicely to the user.

  13. rbtools/utils/console.py (Diff revision 12)
     
     
     
    Show all issues

    What about Y, N, YES, Yes, NO, No, etc? Is it case-sensitive?

    1. It's case-insensitive. I've updated the docstring for clarity in reviesion 13.

  14. rbtools/utils/console.py (Diff revision 12)
     
     
     
    Show all issues

    If this fails, we should probably display something like %s is not a valid answer first.

  15. 
      
ED
ED
ED
ED
david
  1. This looks good to me but I think Christian or Steven should take one more look.

  2. rbtools/utils/console.py (Diff revision 14)
     
     
     
     
    Show all issues

    Two blank lines between top-level items.

  3. 
      
ED
david
  1. Ship It!
  2. 
      
ED
Review request changed
Status:
Completed
Change Summary:
Pushed to master (51b488b). Thanks!