2392: rbtools should provide a warning when svn files are out of date
- New
- RBTools
| ata****@gmai***** (Google Code) (Is this you? Claim this profile.) | |
What version are you running? RB 1.5, RBTools 0.3 Describe the enhancement and the motivation for it. When a subversion user's working copy is out of sync with what's checked in running the post-review command will sometimes fail, since the uploaded diff can't apply against the svn head. Before submitting a diff post-review should check if our original copy of those files differ from what has been checked in, and give the user a warning if it does that they should first run 'svn update'. Honestly I mostly use git so I'm only familiar with this issue from trying to help other users - apologies if I misunderstand how post-review works in that use case. :)
Post-review should post the diff in such a way that it doesn't matter if the files are out of date (it should include the source revision info in the diff). What failures are you seeing?
-
+ NeedInfo
Hmmm, in reading over the ticket again it sounds like the leading theory was that the user...
- Had their local copy at r2454.
- Added a new file and checked that in. Evidently svn commit doesn't issue a sync so their local copy was still at r2454 and the remote was r2455. Here's an article describing svn's mixed revisions...
http://markphip.blogspot.com/2006/12/mixed-revision-working-copies.html
- They made another edit where they deleted the file they just committed and ran post-review, getting something like...
user@host] post-review
Error uploading diff: The file was not found in the repository (207)
Your review request still exists, but the diff is not attached.
user@host] post-review -d
...
>>> Review request created
>>> Uploading diff, size: 5803
>>> HTTP POSTing to https://cr.myhost.com/api/json/reviewrequests/2864/diff/new/: {'basedir': '/svn/path/to/repo'}
Error uploading diff: The file was not found in the repository (207)
>>> {u'stat': u'fail', u'file': u'/svn/path/to/repo/types/OrderItem.java', u'err': {u'msg': u'The file was not found in the repository', u'code': 207}, u'revision': u'2454'}
Your review request still exists, but the diff is not attached.
... which makes sense. The file didn't exist in r2454.
- In trying to figure out the issue they probably ran svn update, bringing the local copy to r2455 after which post-review ran just fine.
Sorry about the confusion - hopefully this makes more sense. :)