3044: plasticscm repository doesn't work

abhi****@gmai***** (Google Code) (Is this you? Claim this profile.)
david
david
Dec. 23, 2013
What version are you running?
1.7.12

What's the URL of the page containing the problem?
-

What steps will reproduce the problem?
1. Try to add a repository hosted by PlasticSCM server in review board.
2.
3.

What is the expected output? What do you see instead?
- PlasticSCM repository couldn't be added to reviewboard.

What operating system are you using? What browser?
Firefox, Linux(ubuntu)

Please provide any additional information below.
This issue is very easy to reproduce.
david
#1 david
Are there any errors in the web UI or in the review board logs?
  • +NeedInfo
#2 abhi****@gmai***** (Google Code) (Is this you? Claim this profile.)
From the logs it seems that get_repositories function in the plastic plugin fails to fetch the repositories.

- 2013-07-11 10:16:02,919 - DEBUG -  - Plastic: get_repositories

On the other note, I tried the dev build(1.8) of reviewboard from the github and it seems to add the PlasticScm repository.
However, now 'post-review' fails to raise a review request. There was an error raised by plastic plugin something about '_options'.
I don't have the exact exception trace at the moment. I'll try to reproduce the issue and paste the exact backtrace.
#3 abhi****@gmai***** (Google Code) (Is this you? Claim this profile.)
Traceback (most recent call last):
  File "/usr/local/bin/post-review", line 9, in <module>
    load_entry_point('RBTools==0.5.1.dev', 'console_scripts', 'post-review')()
  File "/usr/local/lib/python2.7/dist-packages/RBTools-0.5.1.dev-py2.7.egg/rbtools/postreview.py", line 1332, in main
    diff, parent_diff = tool.diff(args)
  File "/usr/local/lib/python2.7/dist-packages/RBTools-0.5.1.dev-py2.7.egg/rbtools/clients/plastic.py", line 73, in diff
    return self.branch_diff(args), None
  File "/usr/local/lib/python2.7/dist-packages/RBTools-0.5.1.dev-py2.7.egg/rbtools/clients/plastic.py", line 92, in branch_diff
    if not self._options.branch:
AttributeError: 'PlasticClient' object has no attribute '_options'
#4 abhi****@gmai***** (Google Code) (Is this you? Claim this profile.)
This is the error that I am getting when trying to submit a review through UI(1.8dev).

  File "/home/abhiravk/workspace/rb-dev-env/local/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/home/abhiravk/workspace/rb-dev-env/local/lib/python2.7/site-packages/Djblets-0.7.16-py2.7.egg/djblets/auth/util.py", line 47, in _checklogin
    return view_func(request, *args, **kwargs)
  File "/home/abhiravk/workspace/reviewboard/reviewboard/reviews/views.py", line 249, in new_review_request
    local_site=local_site)
  File "/home/abhiravk/workspace/reviewboard/reviewboard/reviews/forms.py", line 220, in create
    changenum, local_site)
  File "/home/abhiravk/workspace/reviewboard/reviewboard/reviews/managers.py", line 130, in create
    review_request.update_from_commit_id(commit_id)
  File "/home/abhiravk/workspace/reviewboard/reviewboard/reviews/models.py", line 411, in update_from_commit_id
    raise NotImplementedError()
NotImplementedError


http://dpaste.com/hold/1326236/
chipx86
#5 chipx86
Looks like two things:

1) Fallout from options restructuring on the RBTools side.

2) Fallout from commit ID changes on the Review Board side.

(This is why we really need an actual Plastic maintainer, or some solid unit tests.)
  • -NeedInfo
    +Confirmed
  • +Component-RBTools
    +Component-SCMTools
  • +david
david
#6 david
Fixes for both reviewboard and rbtools are pending review.
  • -Confirmed
    +PendingReview
david
#7 david
Review Board fix pushed to release-1.7.x (c5a373c).
david
#8 david
RBTools fix pushed to master (3bd0c7f).
  • -PendingReview
    +Fixed
#9 abhi****@gmai***** (Google Code) (Is this you? Claim this profile.)
Hi I was testing this fix on 1.7.13 alpha 0 and found the encountered the following error while adding a plastic SCM repository.

09:19:56	DEBUG	- Plastic: Checking repository op@127.0.0.1:8087
09:19:56	DEBUG	- Plastic: get_repositories 127.0.0.1:8087

I'll test the fixes on the master branch and share the result.
david
#10 david
I think that's just some debug logging, not a real error. Did the diff upload correctly?
#13 abhi****@gmai***** (Google Code) (Is this you? Claim this profile.)
It doesn't seem to be a debug log 'only'. I also see a red bar which contents are not readable because it is hidded behind some element. Plastic repository which I was trying to add is not visible in the reviewboard, so it seem like adding repository didn't work.

On the other node, I tried to do the same thing on the 'master' branch and there repository could be added on reviewboard site but creating a review by giving a changeset doesn't work from the site. A blank review is created but there is no file description or diff :(

Using 'post-review' encountered the following error when trying to post the review.
abhiravk@MrvServer:~/workspace/plastic$ post-review 447
Failed to execute command: ['cm', 'diff', '447', '--format={status} {path} rev:revid:{revid} rev:revid:{parentrevid} src:{srccmpath} dst:{dstcmpath}{newline}']
['Incorrect object specification 447\n']
#14 abhi****@gmai***** (Google Code) (Is this you? Claim this profile.)
abhiravk@MrvServer:~/workspace/plastic$ post-review cs:412 cs:443
==> HTTP Authentication Required
Enter authorization information for "Web API" at localhost:8888
Username: abhiravk
Password:

Error uploading diff

Your review request still exists, but the diff is not attached.


-- 
Web server log when posting review using 'post-review'
--
2013-08-07 01:41:21,024 - DEBUG - None - AnonymousUser - /api/review-requests/ - Attempting authentication on API for user abhiravk
[07/Aug/2013 01:41:22] "POST /api/review-requests/ HTTP/1.1" 201 1544
[07/Aug/2013 01:41:22] "PUT /api/review-requests/3/draft/ HTTP/1.1" 200 914
2013-08-07 01:41:22,978 - DEBUG -  - DiffParser.parse: Beginning parse of diff, size = 45257
2013-08-07 01:41:22,987 - DEBUG -  - DiffParser.parse: Finished parsing diff.
2013-08-07 01:41:22,987 - DEBUG -  - Plastic: parse_diff_revision file "/home/abhiravk/workspace/plastic/config_ac.c" revision rev:revid:13356
2013-08-07 01:41:22,988 - DEBUG -  - Plastic: file_exists "/home/abhiravk/workspace/plastic/config_ac.c" revision rev:revid:13356
2013-08-07 01:41:22,988 - DEBUG -  - Plastic: get_file "/home/abhiravk/workspace/config_ac.c" rev rev:revid:13356
2013-08-07 01:41:23,528 - ERROR - None - abhiravk - /api/review-requests/3/diffs/ - Error uploading new diff: The specified revision was not found rev:revid:13356@rep:op@repserver:172.16.135.11:8087
Traceback (most recent call last):
  File "/home/abhiravk/workspace/reviewboard/reviewboard/webapi/resources.py", line 2041, in create
    request.FILES.get('parent_diff_path'))
  File "/home/abhiravk/workspace/reviewboard/reviewboard/reviews/forms.py", line 310, in create
    history)
  File "/home/abhiravk/workspace/reviewboard/reviewboard/diffviewer/forms.py", line 54, in create
    basedir, self.request)
  File "/home/abhiravk/workspace/reviewboard/reviewboard/diffviewer/managers.py", line 80, in create_from_upload
    save=save)
  File "/home/abhiravk/workspace/reviewboard/reviewboard/diffviewer/managers.py", line 96, in create_from_data
    check_existence=(not parent_diff_file_contents)))
  File "/home/abhiravk/workspace/reviewboard/reviewboard/diffviewer/managers.py", line 202, in _process_files
    not repository.get_file_exists(filename, revision, request))):
  File "/home/abhiravk/workspace/reviewboard/reviewboard/scmtools/models.py", line 207, in get_file_exists
    exists = self._get_file_exists_uncached(path, revision, request)
  File "/home/abhiravk/workspace/reviewboard/reviewboard/scmtools/models.py", line 365, in _get_file_exists_uncached
    exists = self.get_scmtool().file_exists(path, revision)
  File "/home/abhiravk/workspace/reviewboard/reviewboard/scmtools/plastic.py", line 113, in file_exists
    return self.client.get_file(path, revision)
  File "/home/abhiravk/workspace/reviewboard/reviewboard/scmtools/plastic.py", line 246, in get_file
    raise SCMError(errmsg)
SCMError: The specified revision was not found rev:revid:13356@rep:op@repserver:172.16.135.11:8087

[07/Aug/2013 01:41:23] "POST /api/review-requests/3/diffs/ HTTP/1.1" 400 198

---

My repository is using xLinks.
david
#15 david
At this point, I think the regressions that we introduced have been fixed, and we need someone who knows about plastic to weigh in. I emailed the plastic maintainers with a link to this bug, so hopefully they'll take a look at some point.
  • -Fixed
    +New
david
#16 david
  • -New
    +Fixed