summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-03-10Revert the change to encode the uploaded content as UTF-8.HEADmasterChristian Hammond
The change made to RC1 for fixing diff uploading in some cases actually broke things. The content length was no longer correct, if we even could encode to UTF-8. We now upload the raw bytes once again.
2010-03-10Prevent a failure when there's an error reading a diff.Christian Hammond
If reading a diff failed and we received a one-line error message, post-review would crash. It assumed a second line always existed. Now we properly abort with debug information. Patch by Laurent Nicolas. Reviewed at http://reviews.reviewboard.org/r/1457/
2010-02-24Protect against an uninitialized variable.Christian Hammond
The new flexible HTTP error handling code had an uninitialized variable. This checks for it and makes sure not to break. Patch by Laurent Nicolas. Reviewed at http://reviews.reviewboard.org/r/1427/
2010-02-24Fix two issues when using post-review with Subversion.Christian Hammond
First, using --revision-range with 0 wouldn't work, as the path given wouldn't have existed in revision 0. The repository path is now assumed if using revision 0, in order to get a diff of all the files. Second, sometimes an svn diff would have excess tabs in the diff file headers, which we wouldn't catch correctly. We now make sure to only split the headers into two groups, regardless of the number of tabs. Patch by Nathan Heijermans. Reviewed at http://reviews.reviewboard.org/r/1429/
2010-02-21Fix the default changeset support with more recent versions of P4.Christian Hammond
The new default changeset support was failing to set a default changeset description on newer versions of P4, which we would later need to parse in order to get the file listing. We now go through the same code path we went through with older versions of P4 in order to generate a default description in order to get those generated files. Patch by Laurent Nicolas. Reviewed at http://reviews.reviewboard.org/r/1418/
2010-02-21Fix a crash when using ClearCase.Christian Hammond
The ClearCase code was calling a command and expecting the result split across two variables, but didn't pass split_lines=True. Now it does! Patch by Bryan Halter Fixes bug #1423
2010-02-13Bump to 0.2 RC 2.Christian Hammond
2010-02-13Release RBTools v0.2 RC 1.release-0.2rc1Christian Hammond
2010-02-13Add Thilo-Alexander Ginkel and Petr Novák to the AUTHORS list.Christian Hammond
2010-02-13Filter out usernames from Mercurial repository paths in .hgrcChristian Hammond
We filtered out the username from a path when running 'hg svn info', but not when reading from .hgrc. We now apply the same filtering logic. This allows post-review to match a repository path with a username in it against a repository path on a Review Board server. Patch by Tom Saeger. Reviewed at http://reviews.reviewboard.org/r/1390/
2010-02-11Add support for --diff-filename when using --repository-url.Christian Hammond
This change allows --diff-filename to be used with --repository-url. This can be used to submit a diff outside of a working checkout. Patch by Luke Robison. Reviewed at http://reviews.reviewboard.org/r/1393/
2010-02-11Add a missing COPYING file.Christian Hammond
Patch by Stephen Gallagher. Reviewed at http://reviews.reviewboard.org/r/1384/
2010-02-06Do not run git remote show just because of remote URL.David Trowbridge
Patch from Petr Novák. Current post-review's GitClient calls "git remote show" to determine URL of upstream repository and parses its output. This patch replaces this with fetching the URL from local configuration, which spares a few moments of time since "git remote show" has to communicate with the remote in order to determine list of remote branches (which is subsequently discarded by the script). Testing done: Tested locally, seems to work fine. (I used it to submit this review request). Reviewed at http://reviews.reviewboard.org/r/1377/
2010-02-06post-review: correctly handle diff uploads, which contains non-ASCII charactersDavid Trowbridge
Patch from Thilo-Alexander Ginkel. Previous post-review versions did not correctly generate the Content-Length header sent along with the api/json/reviewrequests/<id>/diff/new/ request as the header's value was calculated based upon the length of the request body in characters instead of bytes. This patch should fix that issue by using the UTF-8 encoding of the body for the length calculation. Reviewed at http://reviews.reviewboard.org/r/1298
2010-02-06Merge commit 'origin/master'David Trowbridge
2010-02-06Fixes associated to Issue 1345David Trowbridge
Patch from Laurent Nicolas. post-review does not process a *pending* Perforce changeset in v0.2 beta3 (Note that it is a regression from v0.2 beta2). Also 2 changes that are not strictly related: 1) allow *pending* to be on the second line in addition to the first line 2) append the list of bugs to existing list if it exists already rather than overwritting it. Note the "view diffs" view does not show a white space change on line 1586. I fixed the indentation, otherwise the for loop was ending after the first line. Testing done: Tested post-review against our perforce repository, using two *pending* changeset. Tried combination of with and without -r to find existing review based on changeset number or review id. Added bug list to check append feature. Checked for different values of --bugs-closed. After each invocation, checked the GUI for a correct list, and then submitted the review before the next try: 1) No option Bugs: empty 2) --bugs-closed=123 Bugs: 123 3) --bugs-closed=456 Bugs: 123, 456 4) --bugs-closed=456 (repeat) Bugs: 123, 456 5) --bugs-closed=12 Bugs: 12, 123, 456 6) --bugs-closed=1234 Bugs: 12, 123, 456, 1234 7) --bugs-closed="1234, 12345, 1," Bugs: 1, 12, 123, 456, 1234, 12345 8) --bugs-closed="1,, 234, 12345, 1, ,," Bugs: 1, 123, 234, 456, 1234, 12345 10) --bugs-closed=" ,, ,,1,, 234, 12345, 1, ,, , , ,,,, ,,,,," Bugs: 1, 12, 123, 234, 456, 1234, 12345 Checked the database: Bugs field: 1234,12,456,1,123,234,12345 Fixes bug 1345
2010-02-06Be more flexible with HTTP response codes.Christian Hammond
post-review's HTTP GET/POST code always assumed that any Review Board API error code would be in an HTTP 200, and that anything else was an unknown failure. It's now more flexible and understands that any HTTP status code could have a JSON payload in it, and processes them accordingly. This introduces some new unit tests for testing the error parsing code paths. Reviewed at http://reviews.reviewboard.org/r/1375/
2010-01-31Add support for --diff-filename=-Christian Hammond
This adds support for passing diff content on STDIN when using --diff-filename=-. When specified, any input that is required (such as authentication information) will terminate and inform the user they must pass the appropriate information on the command line.
2010-01-31Add a --diff-filename parameter to post-review.Christian Hammond
This new parameter allows the caller to override the diff being uploaded to the Review Board server. This diff will be used instead of generating a diff manually. Patch by Chris Clark Reviewed at http://reviews.reviewboard.org/r/1197/
2010-01-29Fix a bug with parsing merge branch names.Christian Hammond
We were using lstrip to remove the prefix 'refs/heads/', but that strips all characters in the string, not the string itself. We now properly strip this prefix. Patch by Dan Savilonis Reviewed at http://reviews.reviewboard.org/r/1360/
2010-01-12Fix an assumption that Git master represents SVN trunk.Christian Hammond
post-review makes an assumption that the 'master' branch in a Git repository represents SVN's 'trunk' when using git-svn. Now it uses the calculated parent branch, which may be 'master' or may be some other branch, depending on the repository setup. Patch by Mike Crute Reviewed at http://reviews.reviewboard.org/r/1307/
2010-01-12Provide --guess-description and --guess-summary for Mercurial revision ranges.Christian Hammond
This implements support for --guess-description and --guess-summary with revision ranges in Mercurial. The commit messages are concatenated to form the description, and the first line of the first commit message forms the summary. Patch by Stefan Ring Reviewed at http://reviews.reviewboard.org/r/1333/
2010-01-05Fix --guess-description with Git.Christian Hammond
A recent change to post-review broke --guess-description with Git when not specifically using a parent branch. We now default to grabbing all logs from the merge base (for example, "master") and using that as the description. This covers the same range as the diff itself.
2009-12-22Support the new move/add and move/delete operations in Perforce.Christian Hammond
New versions of Perforce provide more explicit information when moving files. There are two new types: move/add and move/delete. These more or less map (for our purposes) to just add and delete. We should now handle them. Fixes bug #1417
2009-12-20Support server aliases for Perforce.Christian Hammond
Some Perforce setups have DNS aliases for a Perforce server. We currently fetch the server aliases, but weren't doing anything with them. Now we support scanning a list of aliases against the known list of repositories on Review Board in order to find the right repository URL to use. This happens automatically without any additional configuration. Patch by Ravi Kondamuru Reviewed at http://reviews.reviewboard.org/r/1235/
2009-12-06Fix an invalid class name.Christian Hammond
A recent patch introduced a refernece to HttpDigestAuthHandler, but this should have been HTTPDigestAuthHandler. Patch by Jason Felice Reviewed at http://reviews.reviewboard.org/r/1290/
2009-11-28Add HTTP Digest Authentication to post-reviewDavid Trowbridge
Patch from Ryan Oblak to add support for HTTP Digest Authentication to post-review. It was really trivial given the work already added in for HTTP Basic Authentication. Testing done: This has been tested on my Review Board 1.1 alpha 1 installation with Digest, Basic, and no authentication. Reviewed at http://reviews.reviewboard.org/r/1265/
2009-11-22Fix a breakage in git-svn.Christian Hammond
We need GitClient.head_ref to be defined for diffing, but this was only defined in the pure Git case. We now set this before determining the mode for GitClient. Fixes bug #1400
2009-11-05Don't depend on simplejson on Python 2.6 eggs.Christian Hammond
We were requiring the simplejson dependency on Python 2.6, despite the fact that Python 2.6 includes json built-in. We no longer depend on simplejson on this version. Fixes bug #1383
2009-11-04Properly represent binary files in patches when using git-svn.Christian Hammond
When adding/changing binary files against a git-svn repository, the binary files would be filtered out of the diff. We now represent binary files properly by faking the information in a diff. Patch by Anthony Cruz. Reviewed at http://reviews.reviewboard.org/r/1194/
2009-11-03Fix post-review error reporting when using --diff-only.Christian Hammond
Running post-review --diff-only may throw exceptions when encountering errors, instead of gracefully handlin them. A simple case of this is to run with --diff-only without having a post-review login cookie, and instead of a login prompt, post-review will crash with a KeyError. This change fixes this reporting by not special-casing the --diff-only parameter in the error reporting. We were only handling errors if that option was not set. Patch by Eric Huss. Reviewed at http://reviews.reviewboard.org/r/1185/
2009-11-03Improve git parent branch detection in post-review.Christian Hammond
This adds improved logic for determining the parent branch used when generating a diff. It will attempt to detect the merge base of the current head, falling back to defaults if necessary. A tracking branch can be manually specified too. The new code attempts the following: 1) Tries to detect the tracking branch for the current HEAD, if possible. 2) If a tracking branch doesn't exist, or is not remote, it will fall back on 'origin/master'. 3) If the --tracking-branch parameter is specified, this branch will be used instead of 'origin/master'. It also provides unit tests for post-review. Right now, these test only GitClient (in pure Git mode), but new tests can be added down the line for the rest of post-review. Patch by Dan Savilonis Reviewed at http://reviews.reviewboard.org/r/1144/
2009-10-16Update the Review Board server domain name.Christian Hammond
2009-10-13Update all URLs to point to the new site.Christian Hammond
2009-10-10Show syntax errors in .reviewboardrc files.Christian Hammond
If a .reviewboardrc file had a syntax error, we would silently ignore it, which made it hard to debug problems. We now fail on syntax errors and list the error information, including the filename, line number and offset on the line. Patch by Eric Huss
2009-10-10Re-introduce a fix for binary files and versioning for Perforce.Christian Hammond
The fix for bug #585 broke the binary file support. This change brings it back. This also fixes the Perforce server versioning check. Patch by Eric Huss Reviewed at http://reviews.review-board.org/r/1154/
2009-10-05Don't produce broken diff files with files that don't end in a newline.David Trowbridge
Some people have source files that don't end in a newline. In this case, it's possible for us to create a diff file where the end of one file is joined on the same line as the header for the next file. This change adds an extra check to _do_diff to make sure that we don't make broken diffs when people have broken files. Fixes bug 1340.
2009-09-27Support creating diffs with multiple files when using --revision-rangeDavid Trowbridge
When creating an SVN diff for a remote repository using --revision-range and passing in specific filenames, post-review would only get the first file as the diff. This is because it was using the arg as the base path. This change makes it treat the arg as a file list if it's more than one item long. Fixes bug 1162
2009-09-24Support "revision-range" option with gitDavid Trowbridge
Patch from Flavio Castelli. With this patch post-review will support the revision-range option following the syntax explained at http://www.review-board.org/docs/manual/dev/users/tools/post-review/#posting-committed-code Testing done: I have tested this new feature locally and it works fine. I have successfully tested the following commands: post-review --revision-range=rev1:rev2 --guess-summary --guess-description post-review --revision-range=rev1:rev2 --guess-description post-review --revision-range=rev1:rev2 post-review --revision-range=rev --guess-summary --guess-description post-review --revision-range=rev Reviewed at http://reviews.review-board.org/r/1049/
2009-09-22Don't unconditionally publish the draft when setting a field.Christian Hammond
When setting a field (such as target reviewers) from post-review, we were saving the draft, always. This is bad enough, but we were doing this before even updating the diff. This would result is a published draft and an extra change description entry. We no longer save the draft, unless the user uses --publish. Fixes bug #811
2009-09-21Fix the path to the user's appdata directory on Win Vista+.Christian Hammond
We were hard-coding the path to the user's Application Data directory, which changed in Windows Vista. We now use the APPDATA environment variable, which is guaranteed to point to the correct directory. Fixes bug #1279
2009-09-21Support older p4d, pending changelists.David Trowbridge
Patch from Matthew Woehlke. This fixes post-review to work on older p4d (which I am stuck with at $DAYJOB); without this change post-review can only be used on submitted changelists. This also adds support for the default changelist (for all p4/p4d versions). Reviewed at http://reviews.review-board.org/r/1031/ and http://reviews.review-board.org/r/804/ Fixes bug 1020.
2009-09-21Bump to RBTools v0.2 beta 3 dev.Christian Hammond
2009-09-21Release RBTools v0.2 beta 2.release-0.2beta2Christian Hammond
2009-09-21Added release notes for RBTools v0.2 beta 2.Christian Hammond
2009-09-10Add Repository UUID support to git-svn.Christian Hammond
This change introduces Repository UUID support to git-svn, allowing Review Board to match repositories by UUID instead of comparing the repository name directly. Patch by Matthew Woehlke. Reviewed at http://reviews.review-board.org/r/1030/
2009-08-25Add a .reviewboardrc for RBTools.Christian Hammond
2009-08-25Fix an issue in GitClient where local repository configuration is ignored.Christian Hammond
2009-08-22Patch by Dana Lacoste to fix a bug with post-review on Windows where wechipx86
improperly check for the os.uname function. Fixes bug #1280.
2009-08-22Add raw file URL support to the Repository admin page and Git.chipx86
This introduces a new column, raw_file_url, to Repository, and shows it in the admin UI for SCMTools that support it. This URL provides a way for certain SCMTools (right now, Git only) to access files over HTTP, instead of checking the file out through the SCM or accessing it locally (in the case of Git). The raw file URL acts as a URL with fields to be substituted. If <revision> exists in the URL, it will be replaced with the revision of the file. If <filename> exists, it will be replaced with the filename. This also adds a GitHub hosting service and bug tracker to the Repository admin. Using this, it's trivial to add any GitHub project without knowing the raw file URL mask. Reviewed at http://reviews.review-board.org/r/977/