Permalink
Commits on Aug 30, 2017
  1. Add custom formatting to rbt status

    brennie committed Aug 30, 2017
    The `rbt status` command now supports two new flags:
    
     * `--format` for specifying a custom output format instead of a
       tabulated format. This is useful for custom script integration with
       the command.
     * `-z` which makes the custom-formatted lines nul-terminated.
    
    Testing Done:
    Used this with a fish completion for `rbt land -r` and `rbt post -r`.
    Posted and update to this change using said completion.
    
    Reviewed at https://reviews.reviewboard.org/r/9153/
Commits on Jul 7, 2017
  1. Merge branch 'release-0.7.x'

    davidt committed Jul 7, 2017
  2. Create better diffs from mercurial.

    misery committed with davidt Jul 7, 2017
    This commit makes two changes to the way that mercurial diffs are generated:
    
    1. It is not necessary to add date and time to the created diff. This makes it
       possible to create a hashsum over a diff to compare it with a previous
       generated diff.
    2. Use git-format diffs, since they're more detailed.
    
    Testing Done:
    Created a review request with "rbt post".
    Tested hg versions: 2.6.2, 4.2.1
    
    Reviewed at https://reviews.reviewboard.org/r/9009/
Commits on Jun 13, 2017
  1. Merge branch 'release-0.7.x'

    davidt committed Jun 13, 2017
  2. Prevent VS2015 tf.exe from taking priority over rb-tfs.

    davidt committed Jun 13, 2017
    VS2015 ships a tf.exe, but it isn't full-featured enough for us to use.
    Unfortunately, when I added support for VS2017's version, I did so in a way
    that prevented rb-tfs from being used. This change fixes it up to actually
    check the version of tf.exe before assuming that it will work.
    
    Testing done:
    Had a customer use this in production and they reported that it worked.
    
    Reviewed at https://reviews.reviewboard.org/r/9012/
Commits on May 24, 2017
  1. Merge branch 'release-0.7.x'

    chipx86 committed May 24, 2017
  2. Remove the information about the Git tracking branch help changes.

    chipx86 committed May 24, 2017
    This change didn't actually end up in 0.7.10, and is being pulled from
    the release notes. It will be added back in 0.7.11, and the online
    documentation will include the help information.
  3. Clarify the default tracking branch behavior in Git.

    chipx86 committed May 24, 2017
    The help for --tracking-branch said that if not provided, origin/master
    would be used as a default. This is sort of true, but misses a step.
    RBTools will attempt to find the tracking branch for the active branch
    and use that instead. This wasn't really clear from the help text, and
    led to some confusion by users.
    
    This is a simple wording change that just adds information on the
    missing step.
    
    Testing Done:
    Saw the help text.
    
    Reviewed at https://reviews.reviewboard.org/r/8965/
  4. Merge branch 'release-0.7.x'

    chipx86 committed May 24, 2017
  5. Release RBTools 0.7.10.

    chipx86 committed May 24, 2017
  6. Add release notes for RBTools 0.7.10.

    chipx86 committed May 24, 2017
    This covers the new TFS support for Visual Studio 2017, new
    configuration options, bug fixes, API improvements, and the new macOS
    installer.
    
    Testing Done:
    Built and looked through the release notes.
    
    Reviewed at https://reviews.reviewboard.org/r/8947/
  7. Improve query optimization when using ClearCase-based repositories.

    chrahunt committed with chipx86 May 24, 2017
    We optimize HTTP requests to Review Board by prioritizing repositories
    based on name. Previously this was done using strict comparison of name
    returned by Review Board to name returned by cleartool. This is no good
    when supporting users on Windows and Unix both. They are different, as
    shown here:
    
        W:\srcSHARE>cleartool describe -short vob:.
        \srcSHARE
    
    And when the VOB is mounted to /vobs in Unix:
    
        [/vobs/srcSHARE]$ cleartool describe -short vob:.
        /vobs/srcSHARE
    
    Now we compare the name of the returned repository with each part of
    the VOBs tag returned by cleartool. Subsequently, Review Board server
    administrators can set repository names for individual VOBs and can
    expect it to match for users regardless of platform. `srcSHARE` works
    in the example above.
    
    Testing Done:
    I posted a review to an internally-hosted Review Board instance from a
    VOB with the name `srcSHARE` on both Linux and Windows. The repository
    in Review Board has the name `srcSHARE`.
    
    In the debug output it is clear that the number of repositories queried
    is reduced. In our specific case because the Review Board server is
    hosted very far away, this represents a time savings of a few minutes
    for each review posted.
    
    More details are in the review request.
    
    Reviewed at https://reviews.reviewboard.org/r/8936/
  8. Add some missing options to the RBTools 0.6.x docs.

    chipx86 committed May 24, 2017
    There are options referenced in the release notes that never had a
    corresponding option definition in the docs. This adds those missing
    docs so that references will work without complaining. It does not
    include every single missing option, just those needed to satisfy the
    warnings.
    
    Testing Done:
    Built the docs and saw that the release notes properly linked to the
    formerly missing options.
    
    Reviewed at https://reviews.reviewboard.org/r/8958/
  9. Add some missing options to the RBTools 0.5.x docs.

    chipx86 committed May 24, 2017
    There are options referenced in the release notes that never had a
    corresponding option definition in the docs. This adds those missing
    docs so that references will work without complaining. It does not
    include every single missing option, just those needed to satisfy the
    warnings.
    
    Testing Done:
    Built the docs and saw that the release notes properly linked to the
    formerly missing options.
    
    Reviewed at https://reviews.reviewboard.org/r/8957/
  10. Fix references and all warnings in the release notes docs.

    chipx86 committed May 24, 2017
    The release notes emit a lot of warnings, due to the usage of `:option:`
    and the inability for this to properly reference options in external
    documentation over intersphinx.
    
    To prevent these warnings and improve documentation, a few changes
    were made:
    
    1. There's now a `:rbtcommand:` directive and role for linking to RBTools
       commands, which supports intersphinx mapping. This is used in the
       documentation now instead of using `:program:` or `:command:`.
    
    2. We're now using the new support in beanbag-docutils 1.3 to fix up
       option references and to specify explicit intersphinx sets to use
       when a reference doesn't otherwise match anything, ensuring that we
       link up to the right documentation in each release notes page.
    
    3. Release notes for older versions of RBTools that did not ship
       manuals (< 0.5) no longer use `:option:`, but instead just use
       literals. While we'd ideally use `:option:`, it's not worth the
       warnings and doesn't buy us anything here.
    
    4. Sections pertaining to specific RBTools commands now specify
       `.. program::` in order to link up the options correctly.
    
    Testing Done:
    Built the docs and went through every affected page and link, making
    sure all the links were correct.
    
    There are no longer any warnings in the docs.
    
    Reviewed at https://reviews.reviewboard.org/r/8956/
  11. Improve the RBTools doc builds and fix some warnings and issues.

    chipx86 committed May 24, 2017
    The RBTools documentation and release notes builds now use the
    intersphinx linking setup we use in our other doc codebases. There are
    intersphinx entries for different versions of Review Board and RBTools,
    which the release notes and manual will later be able to take advantage
    of, and the doc builds can be set to point to a local website instance
    to find the object inventories.
    
    There's also fixes for a bad directive name and for missing escaping for
    RBTools command help output.
    
    Testing Done:
    Built the docs against the local webserver and against reviewboard.org,
    and saw that the intersphinx URLs matched what I pointed to.
    
    Saw that errors relating to the escaping and bad directive were gone.
    
    Reviewed at https://reviews.reviewboard.org/r/8950/
Commits on May 23, 2017
  1. Merge branch 'release-0.7.x'

    davidt committed May 23, 2017
  2. Use `open <url>` on macOS instead of webbrowser module.

    davidt committed May 23, 2017
    There's currently a bug in the interaction between AppleScript on the latest
    macOS and python's `webbrowser` module which is causing URL opens to fail. This
    change moves us over to using macOS's `open` command instead, which is likely
    the way that Python is going to go.
    
    Testing done:
    Posted this change and opened it successfully.
    
    Reviewed at https://reviews.reviewboard.org/r/8959/
  3. Fix mangling of SVN diffs that contain lines that look like headers.

    davidt committed May 9, 2017
    If a file has a removed line that looks vaguely like a file header (i.e. the
    line is "-- XX (Y)"), the entry for the removed line in the diff would get
    filtered out by our code that tries to mangle the diffs to make renames and
    copies work properly.
    
    This change makes the code that detects and mangles file headers much more
    specific, looking at each chunk of 5 lines instead of lines one by one.
    
    Testing done:
    - Created a reproduction case and verified that `rbt diff` and `svn diff`
      produced the same output.
    - Wrote a unit test and checked that the test failed before the change and
      succeeded afterward.
    - Ran entire test suite.
    
    Fixes bug 4546.
    
    Reviewed at https://reviews.reviewboard.org/r/8934/
Commits on May 9, 2017
  1. Merge branch 'release-0.7.x'

    davidt committed May 9, 2017
  2. Fix SVN unit tests with SVN 1.9

    davidt committed May 9, 2017
    SVN 1.9 once again made some changes to the format of diffs. This change adds
    new hashes for our equality tests. At some point soon we'll probably want to
    rework this to be a little less sensitive to the underlying format changes, but
    for now we can keep this jalopy running a little longer.
    
    Testing done:
    Ran unit tests.
    
    Reviewed at https://reviews.reviewboard.org/r/8933/
  3. Split up rbtools.clients.tests.

    davidt committed May 8, 2017
    The clients test suite was getting pretty huge. This change moves everything
    into a `tests/` directory and splits each repo type into its own file. There
    have been no actual functional changes to anything, and the tests that were
    previously failing are still failing.
    
    Testing done:
    Ran unit tests.
    
    Reviewed at https://reviews.reviewboard.org/r/8929/
Commits on Apr 21, 2017
  1. Merge branch 'release-0.7.x'

    davidt committed Apr 21, 2017
  2. Get rid of die().

    davidt committed Apr 14, 2017
    The `die()` method is one of the most ancient parts of RBTools, and it's long
    outlived its usefulness, especially now that more and more people are using
    RBTools as an API and not just a command.
    
    This change gets rid of it in favor of using exceptions, which are already all
    handled correctly.
    
    Testing done:
    - Smoke tested rbt commands.
    - Ran unit tests.
    
    Reviewed at https://reviews.reviewboard.org/r/8899/
  3. Add TFS support for VS2017 users.

    davidt committed Mar 22, 2017
    Visual Studio 2017 changes the on-disk format of the user cache for TFS
    workspaces, and Team Explorer Everywhere and the TFS Java SDK don't have
    support for the new format. This meant that our two methods for interfacing
    with TFS on the client would not work against VS2017 workspaces.
    
    Fortunately, the `tf.exe` command-line tool that ships with VS2017 restores
    some of the features that were removed in VS2015 (which prompted our move to
    Team Explorer Everywhere), and is sufficient for posting pending changes. This
    change implements support for that, and adds some documentation about the three
    TFS methods and how to use them.
    
    Testing done:
    - Posted a few TFS changes involving edits, adds, deletes, moves, and copies on
      various types of files, including binary files.
    - Built the docs and looked at the new page.
    
    Reviewed at https://reviews.reviewboard.org/r/8833/
Commits on Apr 18, 2017
  1. Merge branch 'release-0.7.x'

    davidt committed Apr 18, 2017
  2. Restore the missing _convert_symbolic_revision method.

    davidt committed Mar 18, 2017
    At some point, the old TEE adaptor lost an important method. This change
    restores it.
    
    Testing done:
    Posted a TFS change using the TEE adaptor.
    
    Reviewed at https://reviews.reviewboard.org/r/8832/
Commits on Apr 6, 2017
  1. Use file attachments override for the user file attachments resource.

    davidt committed Mar 17, 2017
    This override makes it easy to upload files via the RBTools Python API.
    
    Testing done:
    Used this from Review Bot.
    
    Reviewed at https://reviews.reviewboard.org/r/8822/
Commits on Mar 6, 2017
  1. Merge branch 'release-0.7.x'

    davidt committed Mar 6, 2017
  2. Add user-configurable option to suppress git, mercurial, and perforce…

    skhzhang committed with davidt Mar 6, 2017
    … warnings.
    
    Prior to this change, it was not possible for the user to suppress warnings
    from git, mercurial, and perforce. This could result in a large number of
    warning messages output to the log which can be cumbersome and fill up the
    console window.
    
    This change allows the user to suppress warnings from rbtools/clients/git.py,
    rbtools/clients/mercurial.py, and rbtools/clients/perforce.py by setting
    SUPPRESS_CLIENT_WARNINGS in .reviewboardrc to True.
    
    Testing Done:
    Checked that the warning message in git.py is suppressed when the
    SUPPRESS_CLIENT_WARNINGS is set to True.
    
    Bugs closed: 4041
    
    Reviewed at https://reviews.reviewboard.org/r/8638/
Commits on Feb 9, 2017
  1. Improve some docs on rbt post, and add anchors.

    chipx86 committed Feb 9, 2017
    This makes a couple small improvements to the documentation on rbt post,
    preferring rbt post -u over -r, and removing the (outdated)
    documentation for -g.
    
    It also adds a bunch of anchors we can use to link to usage
    documentation for different SCMs. Future changes will build upon this by
    splitting out the pages into per-SCM pages.
    
    Testing Done:
    Built the docs and tested the references.
    
    Reviewed at https://reviews.reviewboard.org/r/8730/
  2. Use six for pulling in unquote.

    dsully committed with davidt Feb 9, 2017
    This change updates the TFS implementation to get `urllib2.unquote` from
    `six.moves`, for compatibility with Python 3.
    
    Testing Done:
    Loaded the module in a Python 3 environment.
    
    Reviewed at https://reviews.reviewboard.org/r/8632/
  3. Don't give "dirty" warning only because of dirty submodules

    vadz committed with davidt Feb 9, 2017
    Ignore changes in submodules working directories when checking for pending
    changes: it is common to have some untracked files in the submodules (e.g.
    those produced during the build) and sometimes some existing files could be
    modified as well.
    
    Also, as diff doesn't include changes to the submodules in any case, it seems
    logical to exclude them from the dirty check too.
    
    ---
    
    I'm quite sure that the current behaviour is not ideal because a submodule with
    some untracked files in it really shouldn't result in
    
        WARNING: Your working directory is not clean. Any changes which have not been committed to a branch will not be included in your review request.
    
    as it currently does and so I think it's clear that `--ignore-submodules`
    option should be used. However I'm not sure if my patch is ideal neither: I can
    see arguments both in favour of changing the value of this option to
    `untracked` (because a really dirty submodule could contain some changes that
    were meant to be committed and forgotten) and `all` (because it would be
    consistent to ignore the submodules completely for consistency with
    `make_diff`). So while I believe that using `dirty` here is the happy middle
    ground, I would totally understand if you changed it to something else. But,
    again, IMO at the very least `--ignore-submodules=untracked` should be used
    because it's pretty common to have untracked files in submodules and the
    warning is just distracting and teaches users to simply ignore it.
    
    Testing Done:
    To be honest, not much: just reran the same `rbt post` command that warned me
    about working directory not being clean before and confirmed that the warning
    didn't happen any more.
    
    Reviewed at https://reviews.reviewboard.org/r/8627/