On Tue, Nov 16, 2010 at 5:28 PM, orzha1 <orz...@gmail.com> wrote:
> Hello Jan,
> thank you very much indeed for the profound explanation.
> Yes,I've modified a config spec as you suggested and it works.
> Thank you.

I'm glad it works :)

> post-review generates diffs from uncommitted code.
> Currently it checks the files in CO state:
> cleartool lscheckout -avobs -cview -me -fmt %[type]p\t%En\t%PVn\t%Vn
> \n
> but in case the file is checked in a diff won't be generated.
> The first option is to add a new block (treating this issue) into the
> code.

The problem is after You check-in fileis not different then others
checked-in files. So there is no way to figure out what should be send
to review.

Thinking about post-review I thought about sending changes made on
branch or revision range.
* post-review --parent my_branch_123 - this command will generate
review for everything You develop on branch my_branch_123
* post-review --revision-range
"/a/b/c@@/main/1:/a/b/c/@@/main/2:/d/e/f@@/main/7:/d/e/f@@/main/19" -
this command generate review for files /a/b/c and /d/e/f between
version 1 and 2 for /a/b/c and 7 and 19 for /d/e/f/

Clear Case doesn't have something like "changesets"  (I heard a rummer
there is something like that in UCM). So IBM fix this allowing to
checkin changes to Clear Quest(where Clear Quest hold in defect
checked-in files - which play a role of changeset but is hold outside
the Clear Case. In our company we read this changeset from Clear
Quest, transform to form of --revision-range and just run post-review
with this revision-range.

This is all what in my hamble opinion passible in Clear Case post-review manner.


> Could you explain how the application can be used for post-committed
> reviews.
> Thanks
>
> On Nov 15, 4:59 pm, Jan Koprowski <jan.koprow...@gmail.com> wrote:
>> Hi Orzcha1,
>>
>>   I'm happy someone make useful my patches. They still doesn't perfect
>> and need to be tricky with Your environment but this is best what we
>> have now. I'm still trying to fix all of this Clear Case
>> implementation but this will take more time. I hope at the end we will
>> get very stable Clear Case implementation but for now this is only a
>> wish hard to materialize.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Sun, Nov 14, 2010 at 7:07 PM, orzha1 <orz...@gmail.com> wrote:
>> > Hello,
>> > I've recently configured Review Board 1.5 (CentOS 5.3,Python 2.4).Our
>> > SCM environment consists of the Clear Case 7 + patches.The problem
>> > occurs when:
>> > 1) trying to upload a diff file by using post-review:
>> >    post-review   --server="http://myserver/";  --repository-url=/
>> > vobs/  -d
>>
>> >>>> cleartool pwv -short
>> >>>> cleartool lsview -full -properties -cview
>> >>>> cleartool pwv -root
>> >>>> repository info: Path: /vobs/, Base path: /vobs/, Supports changesets: 
>> >>>> False
>> >>>> cleartool lscheckout -avobs -cview -me -fmt %[type]p\t%En\t%PVn\t%Vn\n
>> > ==> Review Board Login Required
>> > Enter username and password for Review Board athttp://myserver/
>> >>>> Looking for 'myserver/' cookie in /home/user/.post-review-cookies.txt
>> >>>> Loaded valid cookie -- no login required
>> >>>> Attempting to create review request on /vobs/ for None
>> >>>> HTTP POSTing 
>> >>>> tohttp://myserver/api/json/reviewrequests/new/:{'repository_path': 
>> >>>> '/vobs/'}
>> >>>> Review request created
>> >>>> Uploading diff, size: 709
>> >>>> HTTP POSTing 
>> >>>> tohttp://myserver/api/json/reviewrequests/131/diff/new/:{'basedir': 
>> >>>> '/vobs/'}
>> >>>> Got API Error 105 (HTTP code 200): One or more fields had errors
>> >>>> Error data: {'fields': {'path': ['/bin/cat: 
>> >>>> /vobs/webos/src/common/link.c@@/main/submit_cheetah_32490/1: No such 
>> >>>> file or directory\n']}, 'stat': 'fail', 'err': {'msg': 'One or more 
>> >>>> fields had errors', 'code': 105}, 'deprecated': {'in_version': '1.5'}}
>>
>> > Error uploading diff
>>
>> > The generated diff file was empty. This usually means no files were
>> > modified in this change.
>>
>> > Try running with --output-diff and --debug for more information.
>>
>> > Your review request still exists, but the diff is not attached.
>>
>> > When I'm trying to access the file manually - no problem at all.
>> > And the most strange behaviour - sometimes the diff is uploaded
>> > successfully(very seldom):
>> >>>> cleartool pwv -short
>> >>>> cleartool lsview -full -properties -cview
>> >>>> cleartool pwv -root
>> >>>> repository info: Path: /vobs/, Base path: /vobs/, Supports changesets: 
>> >>>> False
>> > ==> Review Board Login Required
>> > Enter username and password for Review Board athttp://myserver/
>> >>>> Looking for 'myserver /' cookie in /home/user/.post-review-cookies.txt
>> >>>> Loaded valid cookie -- no login required
>> >>>> Attempting to create review request on /vobs/ for None
>> >>>> HTTP POSTing 
>> >>>> tohttp://myserver/api/json/reviewrequests/new/:{'repository_path': 
>> >>>> '/vobs/'}
>> >>>> Review request created
>> >>>> Uploading diff, size: 709
>> >>>> HTTP POSTing 
>> >>>> tohttp://myserver/api/json/reviewrequests/124/diff/new/:{'basedir': 
>> >>>> '/vobs/'}
>> > Review request #124 posted.
>>
>>   I believe the problem is the difference between Your dynamic view's
>> configspec on Review Board side and configspec in view where You
>> generate review.
>>   Path generated by Clear Case (in Your situation by post-review)
>> depends on config spec. In one view path available by /a/b/c/d.txt can
>> be accessible by /foo/bar/abc.txt in another. This depends only from
>> what configspec. I know this sounds really creepy but this is how IBM
>> implement this control version system and this make implement working
>> CC implementation a true horror.
>>   So the point is Your Review Board's dynamic view's *config spec* and
>> the developer view's *config spec doesn't match* in one of them You
>> have patches witch is not available in second. You try to set exactly
>> the same config spec in both directories or at least config spec which
>> show Your branch/label or whatever You use to commiting in Your
>> dynamic config spec. I believe this could help You.
>>   I guess reviews which was successfull sent was on main branch or
>> other branch which was expose in Review Board's dynamic view by config
>> spec.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> > 2) In case i was lucky and the diff is uploaded , trying to view the
>> > diff in the Review Board web GUI.The following appears:
>> > /bin/cat: /vobs/webos/src/common/link.c@@/main/submit_cheetah_32490/1:
>> > No such file or directory
>>
>> > Traceback (most recent call last):
>> >  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.5-py2.4.egg/
>> > reviewboard/diffviewer/views.py", line 153, in view_diff
>> >    interdiffset, highlighting, True)
>> >  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.5-py2.4.egg/
>> > reviewboard/diffviewer/diffutils.py", line 1063, in get_diff_files
>> >    large_data=True)
>> >  File "/usr/lib/python2.4/site-packages/Djblets-0.6.4-py2.4.egg/
>> > djblets/util/misc.py", line 166, in cache_memoize
>> >    data = lookup_callable()
>> >  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.5-py2.4.egg/
>> > reviewboard/diffviewer/diffutils.py", line 1062, in <lambda>
>> >    enable_syntax_highlighting)),
>> >  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.5-py2.4.egg/
>> > reviewboard/diffviewer/diffutils.py", line 548, in get_chunks
>> >    old = get_original_file(filediff)
>> >  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.5-py2.4.egg/
>> > reviewboard/diffviewer/diffutils.py", line 364, in get_original_file
>> >    large_data=True)[0]
>> >  File "/usr/lib/python2.4/site-packages/Djblets-0.6.4-py2.4.egg/
>> > djblets/util/misc.py", line 166, in cache_memoize
>> >    data = lookup_callable()
>> >  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.5-py2.4.egg/
>> > reviewboard/diffviewer/diffutils.py", line 363, in <lambda>
>> >    data = cache_memoize(key, lambda: [fetch_file(file, revision)],
>> >  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.5-py2.4.egg/
>> > reviewboard/diffviewer/diffutils.py", line 342, in fetch_file
>> >    data = tool.get_file(file, revision)
>> >  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.5-py2.4.egg/
>> > reviewboard/scmtools/clearcase.py", line 59, in get_file
>> >    output = self.client.cat_file(adjust_path, revision)
>> >  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.5-py2.4.egg/
>> > reviewboard/scmtools/clearcase.py", line 166, in cat_file
>> >    raise SCMError(errmsg)
>> > SCMError: /bin/cat: /vobs/webos/src/common/link.c@@/main/
>> > submit_cheetah_32490/1: No such file or directory
>>
>> This error show what is going on. Config spec doesn't expose branch
>> 'submit_cheetah_32490'. Probably on of the directories  'src' or
>> 'common' exists only on this branch and patch  or similar
>> '/vobs/webos/src/common@@/main/submit_cheetah_32490/2/link.c@@/main/submit_ 
>> cheetah_32490/1'
>> will work. But this is only a shoot. The problem is config spec in
>> Your development view expose branch 'submit_cheetah_32490' so Clear
>> Case doesn't produce suffix '@@/main/submit_cheetah_32490/2' for
>> directory in this path because this directory is available in file
>> system as i - without this suffix - because of config spec (exposing
>> this branch in file system).
>>
>> You can check this by Your self trying find this file in
>> '/vobs/webos/src/common/link.c' but probably You don't find even
>> 'common' because config spec wasn't set to expose it. Try to change
>> config spec and try to see the diff again.
>>
>> Bad information is that: each time when You change config spec You
>> expose old reviews already done to stop showing their diff contents -
>> because You can accidentally  "hide" directory they need to access the
>> file.
>>
>> If You develop on branches only way I figure out is to develop in view
>> without branches exposed (on /main/LATEST) and use dynamic views and
>> access to files by 'cd common@@/main/submit_cheetah_32490/2'. This is
>> really hard I know - maybe You figure out something better - but this
>> is the best I can give You right now. This force Clear Case to
>> generate paths with all of the suffixes in paths. Path which have
>> version-suffix after each directory and file in the path will work in
>> 99% of dynamic views regardless of config spec. The problem is still
>> don't find way to force Clear Case generate paths in this format in
>> developers view. The suffixes are added only if config spec doesn't
>> expose something in file system. And paths with suffixes work only
>> inside dynamic view.
>>
>> In our company we created a little "middleware" which receive a
>> requests to generate review. After request they gather all data and
>> use Review Board's review (this same which will be used to see diffs
>> in GUI) to generate one. But this works only for post-reviews and
>> doesn't for pre-reviews.
>>
>> I believe with this informations You will figure out how to handle
>> Your situation. I hope so.
>>
>> Greetings from Poland!
>> --
>>
>>
>>
>> > Do you have any idea? Thanks
>>
>> > --
>> > Want to help the Review Board project? Donate today 
>> > athttp://www.reviewboard.org/donate/
>> > Happy user? Let us know athttp://www.reviewboard.org/users/
>> > -~----------~----~----~----~------~----~------~--~---
>> > To unsubscribe from this group, send email to 
>> > reviewboard+unsubscr...@googlegroups.com
>> > For more options, visit this group 
>> > athttp://groups.google.com/group/reviewboard?hl=en
>>
>> --
>>
>>
>>
>>
>>
>>
>>
>> ><> Jan Koprowski
>
> --
> Want to help the Review Board project? Donate today at 
> http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~----------~----~----~----~------~----~------~--~---
> To unsubscribe from this group, send email to 
> reviewboard+unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/reviewboard?hl=en



-- 
><> Jan Koprowski

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to