1279: post-review on windows assumes pre-vista hard coded path

jeam****@gmai***** (Google Code) (Is this you? Claim this profile.)
chipx86
chipx86
Sept. 22, 2009
1494, 1944
What version are you running?
post-review 0.8 (RBTools 0.2beta1) Under python 2.5.4 on Windows Vista

What's the URL of the page containing the problem?
N/A

What steps will reproduce the problem?
1. easy_install -U RBTools
2. <create an edited file in perforce>
3. run "python post-review -d <changelist>"

What is the expected output? What do you see instead?
Expected: the URL to the newly created review
Actual:
c:\Users\lacoste>python c:\Python\2.5.4\Scripts\post-review -d 216465
>>> svn info
>>> p4 info
>>> repository info: Path: perforce:1666, Base path: None, Supports
changesets: True
>>> p4 counters
>>> Generating diff for changenum 216465
>>> p4 describe -s 216465
>>> Processing edit of //path/to/file.xml
>>> Writing "//path/to/file.xml#10" to "c:\users\lacoste\appdata\lo
cal\temp\tmpdbjvzd"
>>> p4 print -q //path/to/file.xml#10
>>> p4 where //path/to/file.xml
>>> diff -urNp c:\users\lacoste\appdata\local\temp\tmpdbjvzd
c:\perforce\path\to\file.xml
>>> Looking for 'reviewboard /reviews/' cookie in C:\Users\lacoste\Local
Settings\Application Data\.post-review-cookies.txt
>>> Couldn't load cookie file: [Errno 2] No such file or directory:
'C:\\Users\\
lacoste\\Local Settings\\Application Data\\.post-review-cookies.txt'
==> Review Board Login Required
Enter username and password for Review Board at
http://servicemanager.labs.pereg
rine.com/reviews/
Username: dlacoste
Password:
>>> Logging in with username "dlacoste"
>>> HTTP POSTing to http://reviewboard/reviews/api/json/ac
counts/login/: {'username': 'dlacoste', 'password': '**************'}
Traceback (most recent call last):
  File "c:\Python\2.5.4\Scripts\post-review", line 5, in <module>
    pkg_resources.run_script('RBTools==0.2beta1', 'post-review')
  File "C:\Python\2.5.4\Lib\site-packages\pkg_resources.py", line 448, in
run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "C:\Python\2.5.4\Lib\site-packages\pkg_resources.py", line 1173, in
run_script
    exec script_code in namespace, namespace
  File "c:\Python\2.5.4\Scripts\post-review", line 2313, in <module>

  File "c:\Python\2.5.4\Scripts\post-review", line 2291, in main

  File "c:\Python\2.5.4\Scripts\post-review", line 308, in login

  File "c:\Python\2.5.4\Scripts\post-review", line 569, in api_post

  File "c:\Python\2.5.4\Scripts\post-review", line 551, in http_post

  File "C:\python\2.5.4\lib\_MozillaCookieJar.py", line 118, in save
    f = open(filename, "w")
IOError: [Errno 2] No such file or directory: 'C:\\Users\\lacoste\\Local
Setting

What operating system are you using? What browser?
Windows Vista, browser N/A

Please provide any additional information below.
There is neither a "Local Settings" nor a "Application Data" in Vista and
2008 Server: programs should use the %APPDATA% environment variable
instead, which will resolve to the appropriate directory.

Workaround:
Create a "Local Settings" folder and a subfolder "Application Data" and
then post-review will use it (it's still the wrong location, but it works)
chipx86
#1 chipx86
  • +Confirmed
  • -Priority-Medium
    +Priority-High
    +Component-RBTools
david
#2 david
  • +Milestone-RBTools-Release1.0
chipx86
#3 chipx86
  • -Confirmed
    +Fixed
  • +OpSys-Windows
  • +chipx86
chipx86
#4 chipx86
Fixed in r45a9029