1423: post-review expects an array internally and a string is returned

bryan.******@gmai***** (Google Code) (Is this you? Claim this profile.)
chipx86
chipx86
Feb. 21, 2010
What version are you running?
RBTools 0.2Beta2

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

What steps will reproduce the problem?
1.Run post-review in a ClearCase view 
2.
3.

What is the expected output? What do you see instead?
I expect to see a topic successfully created but instead 
I see
Traceback (most recent call last):
  File "/usr/bin/post-review", line 7, in ?
    sys.exit(
  File "build/bdist.linux-i686/egg/rbtools/postreview.py", line 2511, in main
  File "build/bdist.linux-i686/egg/rbtools/postreview.py", line 947, in diff
  File "build/bdist.linux-i686/egg/rbtools/postreview.py", line 811, in
get_extended_namespace
  File "build/bdist.linux-i686/egg/rbtools/postreview.py", line 789, in
get_previous_version
ValueError: too many values to unpack


What operating system are you using? What browser?
Centos 5.4

Please provide any additional information below.
The get_previous_version function makes a call to execute to get the
previous version information from ClearCase here it expects exactly 2 items
back being the 2 lines out output from ClearTool instead it gets a string
#1 bryan.******@gmai***** (Google Code) (Is this you? Claim this profile.)
The attached patch fixes this issue for me and leave the original intent in place
  • +
    diff --git a/rbtools/postreview.py b/rbtools/postreview.py
    index c157277..10cdf02 100755
    --- a/rbtools/postreview.py
    +++ b/rbtools/postreview.py
    @@ -793,7 +793,7 @@ class ClearCaseClient(SCMClient):
                 # Call cleartool to get this version and the previous version
                 #   of the element.
                 curr_version, pre_version = execute(
    -                ["cleartool", "desc", "-pre", elem_path])
    +                ["cleartool", "desc", "-pre", elem_path],split_lines=True)
                 curr_version = cpath.normpath(curr_version)
                 pre_version = pre_version.split(':')[1].strip()
     
chipx86
#2 chipx86
Please post patches on http://reviews.reviewboard.org/
  • +Component-RBTools
#3 rame****@gmai***** (Google Code) (Is this you? Claim this profile.)
Any chance this patch would make it to the final RBTools?
chipx86
#4 chipx86
Committed to master as 24b1e9d.

In the future, please post patches to our Review Board instance. We don't track
patches on the bug tracker.
  • +Fixed
  • +chipx86