Re: [viewvc-dev] r2674 (Fix annotate views using urllib.pathname2url) breaks annotate on windows
Jens Peters <[email protected]> Tue, 03 Jan 2012 20:02:32 +0100
| Newsgroups | gmane.comp.version-control.cvs.viewcvs.devel |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_22699_1743047836.1325617409527 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit On 3-1-2012 16:24, C. Michael Pilato wrote: > On 12/30/2011 05:08 AM, Jens Peters wrote: >> Hello there, >> >> While testing the current 1.1 branch on a windows box I could not see >> annotations. After some investigation it looks like r2675/r2674 is the >> reason. On windows the rootpath looks like '/d:/svn/repos'. Obviously >> urllib.pathname2url does not like a path segment like that. >> >> Unfortunately I don't know beter solution to your original issue :( >> >> Regards, >> Jens > Thanks for the report, Jens! Man, I feel like I'm playing whack-a-mole with > that section of code... > > I've taken yet another crack it in r2707 (r2708 on the 1.1.x branch). Could > you give the code a spin in your Windows environment? > > Obviously I'd like annotations to work *at all* in Windows. But I'm also > trying to ensure that they work when either or both of the "on-disk path to > the repository" and "versioned file path inside the repository" have > URI-unsafe characters (spaces, for example). > > Thanks! > Hello Mike, Not yet, but applying a patch like attached made ik work. 'drive' already contains the ':' so no need to concatenate it manually. What do you had in mind with os.path.abspath, it concatenate the current working directory with the rootpath, thus in my case adding D:\svn as prefix again :) May be os.path.normpath is what you want (Just based on documentation, I don't have any experience with it)? Regards, Jens ------------------------------------------------------ http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4251&dsMessageId=2905703 To unsubscribe from this discussion, e-mail: [[email protected]]. ------=_Part_22699_1743047836.1325617409527 Content-Type: text/plain; name=svn_repos.py.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=svn_repos.py.patch SW5kZXg6IGxpYi92Y2xpYi9zdm4vc3ZuX3JlcG9zLnB5DQo9PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQotLS0gbGliL3Zj bGliL3N2bi9zdm5fcmVwb3MucHkJKHJldmlzaW9uIDI3MDgpDQorKysgbGliL3ZjbGliL3N2bi9z dm5fcmVwb3MucHkJKHdvcmtpbmcgY29weSkNCkBAIC0xMDksMTMgKzEwOSwxMyBAQA0KIAogZGVm IF9yb290cGF0aDJ1cmwocm9vdHBhdGgsIHBhdGgpOgogICBkcml2ZSwgcm9vdHBhdGggPSBvcy5w YXRoLnNwbGl0ZHJpdmUocm9vdHBhdGgpCi0gIHJvb3RwYXRoID0gb3MucGF0aC5hYnNwYXRoKHJv b3RwYXRoKQorICByb290cGF0aCA9IG9zLnBhdGgubm9ybXBhdGgocm9vdHBhdGgpCiAgIGlmIG9z LnNlcCAhPSAnLyc6CiAgICAgcm9vdHBhdGggPSBzdHJpbmcucmVwbGFjZShyb290cGF0aCwgb3Mu c2VwLCAnLycpCiAgIHJvb3RwYXRoID0gdXJsbGliLnF1b3RlKHJvb3RwYXRoKQogICBwYXRoID0g dXJsbGliLnF1b3RlKHBhdGgpCiAgIGlmIGRyaXZlOgotICAgIHJldHVybiAnZmlsZTovLy8nICsg ZHJpdmUgKyAnOicgKyByb290cGF0aCArICcvJyArIHBhdGgKKyAgICByZXR1cm4gJ2ZpbGU6Ly8v JyArIGRyaXZlICsgcm9vdHBhdGggKyAnLycgKyBwYXRoCiAgIGVsc2U6CiAgICAgcmV0dXJuICdm aWxlOi8vJyArIHJvb3RwYXRoICsgJy8nICsgcGF0aAogCg== ------=_Part_22699_1743047836.1325617409527--