3169: (RBTools) Git-p4 repo throws 'UnboundLocalError' on post-review

dpr***@gmai***** (Google Code) (Is this you? Claim this profile.)
Dec. 23, 2013
What version are you running?
0.5.2 (also tested with git 74ebdf)

What's the URL of the page containing the problem?
N/A (RBTools issue)


What steps will reproduce the problem?
1. Sync a perforce repository using git-p4
2. Configure reviewboard settings for Perforce depot
2. Create new branch off master and create a commit you want to post to reviewboard
3. Attempt to post with 'post-review'

What is the expected output? What do you see instead?
Unknown expected output, python throws a UnboundLocalError (log attached)

What operating system are you using? What browser?
Fedora 19

Please provide any additional information below.
[dreid@dev24-164 ~]$ cd git-p4/naples/
[dreid@dev24-164 naples]$ git branch
  dan-test
* master
[dreid@dev24-164 naples]$ git log | head
commit 3532e2c4cd4fe49400457cb0568bfa9ac5be383a
Author: Daniel Reid <dreid@nyx.com>
Date:   Wed Dec 11 17:54:30 2013 +0000
    Updated gitignore
    
    [git-p4: depot-paths = "//utp_depot/projects/Exchange/XDP/xdp_naples_branch/release_1.1.0/": change = 5241975]
commit f9c8e2112eada5145e7a110c8dde6408367b1537
Author: Daniel Reid <dreid@nyx.com>
[dreid@dev24-164 naples]$ git checkout dan-test 
Switched to branch 'dan-test'
[dreid@dev24-164 naples]$ git log | head
commit d25af07436bfb7f5b9fc34efc74f122e2a7cd10f
Author: Daniel Porter <dporter@nyx.com>
Date:   Wed Dec 11 18:20:11 2013 +0000
    Cool feature x
commit 3532e2c4cd4fe49400457cb0568bfa9ac5be383a
Author: Daniel Reid <dreid@nyx.com>
Date:   Wed Dec 11 17:54:30 2013 +0000
[dreid@dev24-164 naples]$ post-review -d
>>> RBTools 0.5.2
>>> Python 2.7.5 (default, Nov 
#1 dpr***@gmai***** (Google Code) (Is this you? Claim this profile.)
It would appear 'base_path' is not getting assigned as the regular expression is incorrect.

From git.py:445:
 m = re.search(r'repo-paths = "(.+)": change = (\d+)\]', log, re.M) 

"repo-paths" should be "depot-paths"

git log attached
#2 dpr***@gmai***** (Google Code) (Is this you? Claim this profile.)
  • +
    commit d25af07436bfb7f5b9fc34efc74f122e2a7cd10f
    Author: Daniel Porter <dporter@nyx.com>
    Date:   Wed Dec 11 18:20:11 2013 +0000
        Cool feature x
    commit 3532e2c4cd4fe49400457cb0568bfa9ac5be383a
    Author: Daniel Reid <dreid@nyx.com>
    Date:   Wed Dec 11 17:54:30 2013 +0000
        Updated gitignore
        
        [git-p4: depot-paths = "//utp_depot/projects/Exchange/XDP/xdp_naples_branch/release_1.1.0/": change = 5241975]
    commit f9c8e2112eada5145e7a110c8dde6408367b1537
    Author: Daniel Reid <dreid@nyx.com>
    Date:   Wed Dec 11 16:34:34 2013 +0000
        Add gitignore for Git users
        
        [git-p4: depot-paths = "//utp_depot/projects/Exchange/XDP/xdp_naples_branch/release_1.1.0/": change = 5241936]
#3 dpr***@gmai***** (Google Code) (Is this you? Claim this profile.)
A fix for this issue was submitted to ReviewBoard.

https://reviews.reviewboard.org/r/5120/
david
#4 david
Fixed in release-0.5.x (0f88c6a)
  • +Fixed