Review Board

beta

Added full home directory to subversion certificate error message.

Submitted
Updated 3 months, 4 weeks ago

Mat Schaffer Reviewers
trunk reviewboard
None Review Board SVN
The previous message just said '~'.  This substitutes the actual home directory of the user which should be helpful when diagnosing svn issues.
scmtools tests still run (os x, linux).  Used this change to help diagnose confusion about which user reviewboard was running as.
Posted 4 months, 1 week ago (July 11th, 2008, 12:21 a.m.)

   

  
/trunk/reviewboard/scmtools/svn.py (Diff revision 1)
109
                home = os.environ.get("HOME")
We should probably figure out what our story is for running this on Windows. This and the path mentioned may very well be wrong.
  1. Mat Schaffer 4 months, 1 week ago (July 11th, 2008, 5:11 a.m.)
    Good point.  I think os.path.expanduser('~') might be the better choice here anyway.  I'll try it out on Mac and Windows then update the diff.
/trunk/reviewboard/scmtools/svn.py (Diff revision 1)
109
                    'HTTPS certificate not accepted.  Please ensure that ' +
111
                    'HTTPS certificate not accepted.  Please ensure that ' +
110
                    'the proper certificate exists in ~/.subversion/auth ' +
112
                    ('the proper certificate exists in %s/.subversion/auth ' % (home)) +
111
                    'for the user that reviewboard is running as.')
113
                    'for the user that reviewboard is running as.')
Rather than special-casing this line, remove the "+" on each line (as Python will properly concatenate the strings) and then put the "% home" at the end of the whole string. (Home doesn't need to be in parens).
  1. Mat Schaffer 4 months, 1 week ago (July 11th, 2008, 5:11 a.m.)
    Will do.
Posted 4 months, 1 week ago (July 11th, 2008, 10:46 a.m.)
Updated diff.  I attempted to write a unit test for this, but it looks like the subversion get_file test doesn't run correctly on windows yet.
/trunk/reviewboard/scmtools/svn.py (Diff revision 2)
109
                home = os.path.expanduser('~')
On my XP image this resolves as follows:

>>> os.path.expanduser('~')
'C:\\Documents and Settings\\Administrator'
Ship it!
Posted 3 months, 4 weeks ago (July 23rd, 2008, 5:37 p.m.)
Looks good. Committed as r1412. Thanks!