Eclipse Diff Viewer

61 views
Skip to first unread message

Tiago Proença

unread,
Jun 18, 2012, 2:34:48 PM6/18/12
to erevie...@googlegroups.com
Is it possible to view diffs from projects that you don't have in your workspace? I'm getting an error when I try to do this. Please check attached image.

-- Tiago


sts.png

Robert Munteanu

unread,
Jun 18, 2012, 3:58:13 PM6/18/12
to erevie...@googlegroups.com
Hi Tiago,
Technically it should be possible for Git projects if you have a the
correct git repository tracked - visible in the 'Git repositories'
view.

Also you should download a nightly update site zip from
https://buildhive.cloudbees.com/job/rombert/job/ereviewboard/7/org.review_board.ereviewboard$org.review_board.ereviewboard.update/
( use the -assembly.zip ) since that fixes an EGit problem.

Robert

--
Sent from my (old) computer

Tiago Proença

unread,
Jun 18, 2012, 7:20:44 PM6/18/12
to erevie...@googlegroups.com
I'm gonna take a look and let you know.

Thanks for the fast reply.

-- Tiago

Tiago Proença

unread,
Jun 19, 2012, 4:11:17 PM6/19/12
to erevie...@googlegroups.com
New error message. See screenshot attached. Seems that I have to have the project in my workspace. 

In my company I perform a lot of code reviews from projects that I'm actually not working with, and hence don't have the source code locally. Also, I don't want to checkout code from every review I have to perform. 

Are you aware if ReviewBoard API offers a way to get the source code of the original and the modified file? Because if there is such a thing, I believe should not be a big deal to invoke the diff editor to show that.  In the past I developed an inline diff viewer of remote files using the editor, and it worked pretty well. 

Let me know if you think this can be possible to achieve. If sounds resonable, I can help.


Thanks,
-- Tiago
2012-06-19_13h03_26.png

Robert Munteanu

unread,
Jun 20, 2012, 4:16:09 AM6/20/12
to erevie...@googlegroups.com
>
> Are you aware if ReviewBoard API offers a way to get the source code of the
> original and the modified file? Because if there is such a thing, I believe
> should not be a big deal to invoke the diff editor to show that.  In the
> past I developed an inline diff viewer of remote files using the editor, and
> it worked pretty well.
>
> Let me know if you think this can be possible to achieve. If sounds
> resonable, I can help.

What we currently do is:

- retrieve the diff file using
http://www.reviewboard.org/docs/manual/1.6/webapi/2.0/resources/file-diff/
- retrieve the 'old' file revision from the SCM repo using Eclipse
APIs and use it to display the diff

AFAIK Reviewboard does not store the file revisions, just the diff. It
might be possible to ask reviewboard to retrieve the file revision
itself but I did not find any reference to it in the web api docs at
http://www.reviewboard.org/docs/manual/1.6/webapi/ .

There are a couple of options here:

- raise an enhancement request with RB to ask for a 'pass-through'
method to retrieve the 'old' file revision from SCM
- always have the git repositories checked out in Eclipse
- if no repository can be found in Eclipse open the diff in the browser

Robert

Tiago Proença

unread,
Jun 20, 2012, 5:08:31 PM6/20/12
to erevie...@googlegroups.com

Robert Munteanu

unread,
Jun 21, 2012, 3:43:45 PM6/21/12
to erevie...@googlegroups.com
You're right, that seems to be possible. And it's probably a better option than getting the changes from the workspace.

Would you be willing to make a quick try to see if this would work ? I'm quite short on time right now but I can give you any information that you need.

Robert

Tiago Proença

unread,
Jun 21, 2012, 10:05:27 PM6/21/12
to erevie...@googlegroups.com
Sure... I'm gonna take a look and I let u know...

-- Tiago

Tiago Proença

unread,
Jun 22, 2012, 12:05:23 AM6/22/12
to erevie...@googlegroups.com
Hi Robert,

I'm planning to take a look on this in the weekend. So far, I'm having problems with dependencies on Indigo. Perhaps, I'm missing something to import the project. BTW, I never used maven with RCP projects. So can you give me a hand about how can I import the project correctly and other tools I have to install? So far I installed m2e. 

-- Tiago

Robert Munteanu

unread,
Jun 23, 2012, 9:36:20 AM6/23/12
to erevie...@googlegroups.com
Hi,

Try the following steps:

  1. Clone the project using EGit
  2. In the git repositories view navigate to ereviewboard -> working directory -> and open ereviewboard.target
  3. In the newly opened editor click 'Set as target platform '. This will take a while ...
  4. In the meantime Use File -> Import -> Existing maven projects and select the project's directory . Import all projects, you might need to install a couple of configurators in the process.

Robert

Reply all
Reply to author
Forward
0 new messages