3755: rbtools post command ignores --update flag

jonatha*******@gmai***** (Google Code) (Is this you? Claim this profile.)
June 2, 2015
What version are you running?
RBTools 0.7

What's the URL of the page containing the problem?
It's a client tool issue

What steps will reproduce the problem?
1. rbt post -u --diff-filename patch

What is the expected output? What do you see instead?
It's supposed to update an existing open review, but instead it posts a new review.
rbt status shows the open review I wanted to update.

What operating system are you using? What browser?
Linux 3.18.4-1-ARCH, python 2.7.9

Please provide any additional information below.
I am working in a git-svn clone of an SVN repository - I suspect that this is part of the issue. This functionality has worked perfectly until very recently, so I suspect it's related to 157e416c697, since that appears to be in the 0.7 release. It's frustrating because now my reviewboard account is littered with discarded reviews that I didn't mean to open.
#1 chipx86
Hi Jonathan,

How was it performing before? -u should not have been compatible with --diff-filename (and in fact, we were just talking here about how it should display an error when using both). -u is based on the contents of the HEAD commit in the repository, whereas --diff-filename is meant to bypass using contents from the repository and instead trusting the information you provide on the command line. We never anticipated people would be using both at once.
  • +NeedInfo
#2 chipx86
A related question: Why are you needing to use --diff-filename in the first place?
#3 jonatha*******@gmai***** (Google Code) (Is this you? Claim this profile.)
rbt post -u has always popped up with the review to update, and I type "yes" and everything works great.

I don't always use --diff-filename but I have to whenever working with UTF-16 files. SVN does not handle UTF-16 line endings correctly and generates broken-looking diffs. But git-svn generates correct diffs, so I have to manually break them with this workflow:

1. rbt diff > patch
2. format-svn-diff.sh patch
3. rbt post --diff-filename patch

format-svn-diff.sh is a script I wrote that copies UTF-16 files to an SVN working directory, generates an SVN diff, and then copies the result back into the patch.

I would love if rbtools could handle all this automatically, but I don't expect y'all to workaround someone else's bug.
#4 david
  • -NeedInfo
  • +Component-RBTools
  • +david
#5 david
Fixed in release-0.7.x (94301f5). This will ship in 0.7.4. Thanks!
  • -PendingReview