• 
      

    Add support for posting with Markdown-formatted commit messages.

    Review Request #5211 — Created Jan. 7, 2014 and submitted

    Information

    RBTools
    master

    Reviewers

    Add support for posting with Markdown-formatted commit messages.

    This adds a new option --markdown option to rbt post which prevents
    escaping of content within the commit message for the description. This
    prevents the need to unescape the description before publishing if the
    commit message is considered Markdown-safe, or if it's otherwise
    Markdown-formatted.

    There's also a MARKDOWN option for .reviewboardrc that can be set to
    enable this by default.

    This only works for Review Board 2.0+. For now, it may cause an error
    when using it with older versions. We'll likely want to introduce a
    capability and make use of it.

    Posted this change, and didn't touch the Description field.

    Description From Last Updated

    You also need to check that tool.capabilities is not None.

    daviddavid
    david
    1. This looks OK, but I'm not comfortable with it without having the capability.

    2. 
        
    chipx86
    david
    1. 
        
    2. rbtools/commands/post.py (Diff revisions 1 - 2)
       
       
      Show all issues

      You also need to check that tool.capabilities is not None.

      1. I believe post always has tool.capabilities. We create one regardless of the existence of the resource.

        We also have another capability check for base_commit_id, which doesn't check if it's None.

      2. Well, the SCMTool ctor defaults capabilities to None, and other places that look at capabilities do something like:

        if (self.capabilities and
            self.capabilities.has_capability('diffs', 'moved_files')):
        
      3. Right, the bits of API and SCMClients don't assume they have it, because it's up to the command to decide it's worth initializing it (since it's another API request). The post command always initializes by calling setup_tool, which is what creates the capabilities instance (whether or not an equivalent exists on the server). Commands are safe to assume there's an object if they call setup_tool.

      4. OK. Ship it.

    3. 
        
    chipx86
    Review request changed
    Status:
    Completed