ClearCase and Reviewboard setup.

235 views
Skip to first unread message

Oliver Jones

unread,
Jul 10, 2009, 1:24:43 AM7/10/09
to reviewboard
According to the ReviewBoard 1.0 release notes ReviewBoard is supposed
to support ClearCase "out of the box".

However once I had ReviewBoard 1.0 installed on my Windows server the
config section's Scmtools area didn't mention ClearCase.

After a little Googling I found that you need to add the ClearCase
SCMTool manually into the DB. That I have done.

Now I assume I need to add a repository. However I have no idea what
to enter into the "Path" configuration item when adding the repo.

This page contains info on determining the path with SVN, Git, etc,
but not ClearCase:
http://www.review-board.org/docs/manual/dev/admin/management/repositories/#determining-repository-information

Is ClearCase actually supported??

Reading the post-review script it also appears that the clearcase code
assumes you're using Cygwin. We do not have Cygwin installed here.
And getting it installed could be difficult.

It also seems to hard code the vob location.

Can someone who has actually gotten ClearCase and ReviewBoard to play
nice with each other in a Windows (non-Cygwin) environment help me out
here.

Thanks

djs

unread,
Jul 10, 2009, 10:22:44 AM7/10/09
to reviewboard
Hi Oliver,

Yes, Clearcase is in fact supported. We have tested out setting it up
running on Windows here and were able to get it to working. The path
should be the location of a dynamic view and you don't need cygwin to
use it. There is code in post-review to support using cygwin or the
regular cmd.exe on Windows.

We did have to modify one line of code in post-review to get it to run
successfully, at which point we were able to run post-review and pass
a list of files are arguments. This uploaded a diff of the checked out
files against their base revisions. I believe you also need to modify
the hard-coded location in the post-review script for it to work.

I will try to submit a patch in a few days to fix post-review. Let me
know if you have any luck setting it up.

Dan

On Jul 10, 1:24 am, Oliver Jones <orjo...@gmail.com> wrote:
> According to the ReviewBoard 1.0 release notes ReviewBoard is supposed
> to support ClearCase "out of the box".
>
> However once I had ReviewBoard 1.0 installed on my Windows server the
> config section's Scmtools area didn't mention ClearCase.
>
> After a little Googling I found that you need to add the ClearCase
> SCMTool manually into the DB.  That I have done.
>
> Now I assume I need to add a repository.  However I have no idea what
> to enter into the "Path" configuration item when adding the repo.
>
> This page contains info on determining the path with SVN, Git, etc,
> but not ClearCase:http://www.review-board.org/docs/manual/dev/admin/management/reposito...

Bartlomiej Celary

unread,
Jul 10, 2009, 11:22:10 AM7/10/09
to revie...@googlegroups.com
Hi Dan,

> We did have to modify one line of code in post-review to get it to run

Could you check if those changes are not similar to mine
(http://reviews.review-board.org/r/906/)? I know I had difficulties
submitting a diff for a clearcase repo and those changes fixed it.

I think that we should also make a hard-coded part configurable.

Thanks,
Bartek

djs

unread,
Jul 10, 2009, 2:37:55 PM7/10/09
to reviewboard
Yes, split_lines=True is what I needed to add to get it to work. I'm
less sure about the other changes. They seem like they might be a
problem with your version of python on Windows. I'll add comments to
the review.

Dan

On Jul 10, 11:22 am, Bartlomiej Celary <bartlomiej.cel...@gmail.com>
wrote:
> Hi Dan,
>
> > We did have to modify one line of code in post-review to get it to run
>
> Could you check if those changes are not similar to mine
> (http://reviews.review-board.org/r/906/)?I know I had difficulties

Christian Hammond

unread,
Jul 10, 2009, 3:29:19 PM7/10/09
to revie...@googlegroups.com
Hi djs,

Since David and I have no ClearCase support or really test infrastructure, would I be able to convince you to write some entries for our docs on setting it up and using it? Nothing major, but it would be good if people were able to get it working easier than they are.

Christian

--
Christian Hammond - chi...@chipx86.com
Review Board - http://www.review-board.org
VMware, Inc. - http://www.vmware.com

Dan Savilonis

unread,
Jul 10, 2009, 5:38:29 PM7/10/09
to reviewboard
I will try to write up my experience as I can. (Un)fortunately, we're
not using RB with Clearcase right now, as I run a rogue Clearcase-to-
git system, and use RB with git :)

At minimum right now, we need to get the the line from Bartek's patch
to add split_line=TRUE committed or post-review will just fail for end
users. If you can get the Clearcase SCMTool to be added to the list of
scmtools by default, that would be great, too. I have no idea how to
do that, though.

Dan

On Jul 10, 3:29 pm, Christian Hammond <chip...@chipx86.com> wrote:
> Hi djs,
>
> Since David and I have no ClearCase support or really test infrastructure,
> would I be able to convince you to write some entries for our docs on
> setting it up and using it? Nothing major, but it would be good if people
> were able to get it working easier than they are.
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> Review Board -http://www.review-board.org
> VMware, Inc. -http://www.vmware.com

Dan Savilonis

unread,
Jul 16, 2009, 9:32:03 PM7/16/09
to reviewboard
I went through a fresh installation of reviewboard with Clearcase
today and recorded the steps.

Here's what you need to do to get up and running. For the purpose of
this test, I used a dynamic view and was running the server on the
same machine as I had the view and did a review of checked out files.

1) Add reviewboard.scmtools.clearcase.ClearCaseTool in the admin
interface (Home > Scmtools > Tools), if using ReviewBoard 1.0. This
step is not necessary if you're running svn revision >= r2041.
2) Add a ClearCase repository via the admin interface, and specify a
path to your view (I used the top of the view, not the vob).
3) Apply the patch from http://reviews.review-board.org/r/906/ to your
post-review script.
4) Edit post-review ClearCaseClient class. Change cc_rootpath to be
identical to what you typed into the admin interface, change viewtype
to 'dynamic' (if you're trying this with a dynamic view, of course)
4) Check out a file in the view and make a change
4) Run post-review in your view and pass a list of the files that
you've checked out after the options. Alternatively if you're lazy
like me, you can do something like (on windows, with cygwin, msys,
etc, in your vob directory):

cleartool lsco -cview -me -recurse -short | sed "s/\\\\/\//g" | xargs
python post-review --server=http://example.com/

I tried using a snapshot view but it didn't work immediately for me
and I haven't debugged it. It looked like it was trying to use a
clearcase extended path. I assumed you could only use that notation
within a dynamic view, but I'm probably wrong.

Dan

夏勇杰

unread,
Jul 17, 2009, 6:50:15 AM7/17/09
to reviewboard
Hi Dan,

I have some questions about post review.

Should we install cygwin for post-review in order to make it work with
Clearcase?

On Jul 17, 9:32 am, Dan Savilonis <d...@n-cube.org> wrote:
> I went through a fresh installation of reviewboard with Clearcase
> today and recorded the steps.
>
> Here's what you need to do to get up and running. For the purpose of
> this test, I used a dynamic view and was running the server on the
> same machine as I had the view and did a review of checked out files.
>
> 1) Add reviewboard.scmtools.clearcase.ClearCaseTool in the admin
> interface (Home > Scmtools > Tools), if using ReviewBoard 1.0. This
> step is not necessary if you're running svn revision >= r2041.
> 2) Add a ClearCase repository via the admin interface, and specify a
> path to your view (I used the top of the view, not the vob).
> 3) Apply the patch fromhttp://reviews.review-board.org/r/906/to your

Dan Savilonis

unread,
Jul 17, 2009, 10:23:36 AM7/17/09
to reviewboard
It is not required. post-review simply includes support for cygwin
(i.e. path translation since cleartool does not understand cygwin
paths). My example used sed and xargs to make it easier, so that's the
only reason I suggested having the tools in your path. This feature
can eventually be added to post-review to automatically collect
checked out files.

Dan

吴开春

unread,
Jul 17, 2009, 8:11:27 PM7/17/09
to reviewboard
请教一下,你装起来用了没有?

On Jul 17, 10:23 pm, Dan Savilonis <d...@n-cube.org> wrote:
> It is not required. post-review simply includes support for cygwin
> (i.e. path translation since cleartool does not understand cygwin
> paths). My example used sed and xargs to make it easier, so that's the
> only reason I suggested having the tools in your path. This feature
> can eventually be added to post-review to automatically collect
> checked out files.
>
> Dan
>
> On Jul 17, 6:50 am, 夏勇杰 <notox...@gmail.com> wrote:
>
>
>
> > Hi Dan,
>
> > I have some questions about post review.
>
> > Should we install cygwin for post-review in order to make it work with
> >Clearcase?
>
> > On Jul 17, 9:32 am, Dan Savilonis <d...@n-cube.org> wrote:
>
> > > I went through a fresh installation of reviewboard withClearcase
> > > today and recorded the steps.
>
> > > Here's what you need to do to get up and running. For the purpose of
> > > this test, I used a dynamic view and was running the server on the
> > > same machine as I had the view and did a review of checked out files.
>
> > > 1) Add reviewboard.scmtools.clearcase.ClearCaseTool in the admin
> > > interface (Home > Scmtools > Tools), if using ReviewBoard 1.0. This
> > > step is not necessary if you're running svn revision >= r2041.
> > > 2) Add aClearCaserepository via the admin interface, and specify a
> > > path to your view (I used the top of the view, not the vob).
> > > 3) Apply the patch fromhttp://reviews.review-board.org/r/906/toyour
> > > post-review script.
> > > 4) Edit post-review ClearCaseClient class. Change cc_rootpath to be
> > > identical to what you typed into the admin interface, change viewtype
> > > to 'dynamic' (if you're trying this with a dynamic view, of course)
> > > 4) Check out a file in the view and make a change
> > > 4) Run post-review in your view and pass a list of the files that
> > > you've checked out after the options. Alternatively if you're lazy
> > > like me, you can do something like (on windows, with cygwin, msys,
> > > etc, in your vob directory):
>
> > > cleartool lsco -cview -me -recurse -short | sed "s/\\\\/\//g" | xargs
> > > python post-review --server=http://example.com/
>
> > > I tried using a snapshot view but it didn't work immediately for me
> > > and I haven't debugged it. It looked like it was trying to use a
> > >clearcaseextended path. I assumed you could only use that notation
> > > within a dynamic view, but I'm probably wrong.
>
> > > Dan
>
> > > On Jul 10, 5:38 pm, Dan Savilonis <d...@n-cube.org> wrote:
>
> > > > I will try to write up my experience as I can. (Un)fortunately, we're
> > > > not using RB withClearcaseright now, as I run a rogueClearcase-to-
> > > > git system, and use RB with git :)
>
> > > > At minimum right now, we need to get the the line from Bartek's patch
> > > > to add split_line=TRUE committed or post-review will just fail for end
> > > > users. If you can get theClearcaseSCMTool to be added to the list of
> > > > scmtools by default, that would be great, too. I have no idea how to
> > > > do that, though.
>
> > > > Dan
>
> > > > On Jul 10, 3:29 pm, Christian Hammond <chip...@chipx86.com> wrote:
>
> > > > > Hi djs,
>
> > > > > Since David and I have noClearCasesupport or really test infrastructure,
> > > > > would I be able to convince you to write some entries for our docs on
> > > > > setting it up and using it? Nothing major, but it would be good if people
> > > > > were able to get it working easier than they are.
>
> > > > > Christian
>
> > > > > --
> > > > > Christian Hammond - chip...@chipx86.com
> > > > > Review Board -http://www.review-board.org
> > > > > VMware, Inc. -http://www.vmware.com
>
> > > > > On Fri, Jul 10, 2009 at 7:22 AM, djs <d...@n-cube.org> wrote:
>
> > > > > > Hi Oliver,
>
> > > > > > Yes,Clearcaseis in fact supported. We have tested out setting it up
> > > > > > running on Windows here and were able to get it to working. The path
> > > > > > should be the location of a dynamic view and you don't need cygwin to
> > > > > > use it. There is code in post-review to support using cygwin or the
> > > > > > regular cmd.exe on Windows.
>
> > > > > > We did have to modify one line of code in post-review to get it to run
> > > > > > successfully, at which point we were able to run post-review and pass
> > > > > > a list of files are arguments. This uploaded a diff of the checked out
> > > > > > files against their base revisions. I believe you also need to modify
> > > > > > the hard-coded location in the post-review script for it to work.
>
> > > > > > I will try to submit a patch in a few days to fix post-review. Let me
> > > > > > know if you have any luck setting it up.
>
> > > > > > Dan
>
> > > > > > On Jul 10, 1:24 am, Oliver Jones <orjo...@gmail.com> wrote:
> > > > > > > According to the ReviewBoard 1.0 release notes ReviewBoard is supposed
> > > > > > > to supportClearCase"out of the box".
>
> > > > > > > However once I had ReviewBoard 1.0 installed on my Windows server the
> > > > > > > config section's Scmtools area didn't mentionClearCase.
>
> > > > > > > After a little Googling I found that you need to add theClearCase
> > > > > > > SCMTool manually into the DB.  That I have done.
>
> > > > > > > Now I assume I need to add a repository.  However I have no idea what
> > > > > > > to enter into the "Path" configuration item when adding the repo.
>
> > > > > > > This page contains info on determining the path with SVN, Git, etc,
> > > > > > > but notClearCase:
> > > > > >http://www.review-board.org/docs/manual/dev/admin/management/reposito...
>
> > > > > > > IsClearCaseactually supported??
>
> > > > > > > Reading the post-review script it also appears that theclearcasecode
> > > > > > > assumes you're using Cygwin.  We do not have Cygwin installed here.
> > > > > > > And getting it installed could be difficult.
>
> > > > > > > It also seems to hard code the vob location.
>
> > > > > > > Can someone who has actually gottenClearCaseand ReviewBoard to play
> > > > > > > nice with each other in a Windows (non-Cygwin) environment help me out
> > > > > > > here.
>
> > > > > > > Thanks- Hide quoted text -
>
> - Show quoted text -

Dan Savilonis

unread,
Jul 17, 2009, 9:05:23 PM7/17/09
to reviewboard
The requirements to use post-review with clearcase are the same as
with any other version control system. The only difference is you pass
a list of filenames as arguments to the script that you want to
review:

python post-review --server=http://example.com/ file1.c file2.c
file3.c

If post-review doesn't work, easy_install rbtools should install the
python dependencies.

Dan

Karthik

unread,
Jul 20, 2009, 6:37:33 AM7/20/09
to reviewboard
Hi Dan,
I have done the changes to make it work with Clearcase. I have
followed all the steps you have mentioned. I am using dynamic
clearcase view only. When I run the post-review script, it hangs when
it tries to post the diff content. But I can see the diff content if I
use output-diff option for post-review. Following are the output taken
from post-review script.

karthik-wx> ct lsco -cview -me -short -rec | sed "s/\\\\/\//g" | xargs
python C:/Python25/Scripts/post-review --server="http://localhost:
8082" --submit-as="karthik" --password="mywork" –d
C:\Python25\lib\site-packages\rbtools-0.2beta1-py2.5.egg\EGG-INFO
\scripts\post-review
>>> cleartool pwv -short
>>> repository info: Path: /sw0, Base path: /sw0, Supports changesets: False
>>> cleartool desc -pre K:\sw0\software\code\include\techMgr.h
>>> Looking for 'localhost /' cookie in C:\Documents and Settings\karthik\Local Settings\Application Data\.post-review-cookies.txt
>>> Cookie file loaded, but no cookie for this server
==> Review Board Login Required
Enter username and password for Review Board at http://localhost:8082/
>>> Logging in with username "karthik"
>>> HTTP POSTing to http://localhost:8082/api/json/accounts/login/: {'username': 'karthik', 'password': '**************'}
>>> Logged in.
>>> Attempting to create review request for None
>>> Submitting the review request as karthik
>>> HTTP POSTing to http://localhost:8082/api/json/reviewrequests/new/: {'repository_path': '/sw0',
'submit_as': 'karthik'}
>>> Review request created
>>> Attempting to set field 'description' to 'karthik_view_9.0BugFix
VIEWTYPE: dynamic
' for review request '6'
>>> HTTP POSTing to http://localhost:8082/api/json/reviewrequests/6/draft/set/: {'description': 'karthik_view_9.0BugFix\nVIEWTYPE: dynamic\n'}
>>> HTTP POSTing to http://localhost:8082/api/json/reviewrequests/6/draft/save/: {}
>>> Review request draft saved
>>> Uploading diff, size: 548
>>> HTTP POSTing to http://localhost:8082/api/json/reviewrequests/6/diff/new/: {'basedir': '/sw0'}
---- It hangs after this line ---

Please let me know If I miss any configuration or something.

Thanks,
Karthik

On Jul 18, 6:05 am, Dan Savilonis <d...@n-cube.org> wrote:
> The requirements to use post-review with clearcase are the same as
> with any other version control system. The only difference is you pass
> a list of filenames as arguments to the script that you want to
> review:
>
> python post-review --server=http://example.com/file1.c file2.c

Dan Savilonis

unread,
Jul 20, 2009, 12:45:23 PM7/20/09
to reviewboard
Well, it looks like you are having the same problem as in another
thread, however both have Clearcase in common. Everything is working
okay in the post-review half of things, so my guess is something is
going wrong trying to access the base files from Clearcase on the
server side.

It looks like you are running Windows, but your basedir and
repository_path are '/sw0' which looks unix-like. Are you sure you
have the repository path configured correctly on the server? If it's a
dynamic view, it ought to just be a root drive letter like "X:/".

Dan

On Jul 20, 6:37 am, Karthik <karthikeyan1...@gmail.com> wrote:
> Hi Dan,
>      I have done the changes to make it work with Clearcase. I have
> followed all the steps you have mentioned. I am using dynamic
> clearcase view only. When I run the post-review script, it hangs when
> it tries to post the diff content. But I can see the diff content if I
> use output-diff option for post-review. Following are the output taken
> from post-review script.
>
> karthik-wx> ct lsco -cview -me -short -rec | sed "s/\\\\/\//g" | xargs
> python C:/Python25/Scripts/post-review --server="http://localhost:
> 8082" --submit-as="karthik" --password="mywork" –d
>  C:\Python25\lib\site-packages\rbtools-0.2beta1-py2.5.egg\EGG-INFO
> \scripts\post-review>>> cleartool pwv -short
> >>> repository info: Path: /sw0, Base path: /sw0, Supports changesets: False
> >>> cleartool desc -pre K:\sw0\software\code\include\techMgr.h
> >>> Looking for 'localhost /' cookie in C:\Documents and Settings\karthik\Local Settings\Application Data\.post-review-cookies.txt
> >>> Cookie file loaded, but no cookie for this server
>
> ==> Review Board Login Required
> Enter username and password for Review Board athttp://localhost:8082/>>> Logging in with username "karthik"
> >>> HTTP POSTing tohttp://localhost:8082/api/json/accounts/login/:{'username': 'karthik', 'password': '**************'}
> >>> Logged in.
> >>> Attempting to create review request for None
> >>> Submitting the review request as karthik
> >>> HTTP POSTing tohttp://localhost:8082/api/json/reviewrequests/new/:{'repository_path': '/sw0',
>
> 'submit_as': 'karthik'}>>> Review request created
> >>> Attempting to set field 'description' to 'karthik_view_9.0BugFix
>
> VIEWTYPE: dynamic
> ' for review request '6'>>> HTTP POSTing tohttp://localhost:8082/api/json/reviewrequests/6/draft/set/:{'description': 'karthik_view_9.0BugFix\nVIEWTYPE: dynamic\n'}
> >>> HTTP POSTing tohttp://localhost:8082/api/json/reviewrequests/6/draft/save/:{}
> >>> Review request draft saved
> >>> Uploading diff, size: 548
> >>> HTTP POSTing tohttp://localhost:8082/api/json/reviewrequests/6/diff/new/:{'basedir': '/sw0'}
Reply all
Reply to author
Forward
0 new messages