InformationPhotography |
Thursday, May 31. 2007Netbeans svn+ssh Username GlitchTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
Brilliant! Been trying to connect to the svn server at my University and was having this exact problem. Thanks!
My experience w/ this bug is that I would fill it in as
svn+ssh://username@server/dir1/dir2 and tunnel method ssh -l username ...and it would work initially, but sometime later (maybe after restarting Netbeans?) it would break as you described. Your workaround (assuming it works, I haven't tried) sounds great if you're creating a new repository, but doesn't explain what to do if the repository is already created. So here's what I did: First, I did a grep to find all the files / lines in my source directory that would have the info I needed to change. cd workingdir grep -R servername . I noted that none of them had my username@ preceding servername, as expected. I found that all files that needed to be changed were in .svn/ folders, and all were named "entries". Doing a listing on these files revealed that they were all read only, so if I was to change them, I'd have to chmod u+w `find . -name entries` I proceeded to insert the "username@" in the files using regexxer. (I'm using Ubuntu, so I installed it directly from the universe repository. Here is a blog post about it: http://dailypackage.fedorabook.com/index.php?/archives/137-Productive-Monday-Regexxer-GUI-search-replace.html . The regexxer homepage is http://regexxer.sourceforge.net/ . If you need this functionality on Windows, I hear jEdit may work.) I navigated to the svn working copy on the left, and checked the "hidden" box (recursive was already checked). In the search field, I put "svn\+ssh:\/\/servername" (no quotes). (For users familiar w/ regular expressions, note that the plus sign needs to be escaped here, whereas it doesn't for a grep search, or for sed replacement.) I copied the search text, pasted it in the Replace, and inserted added the obvious so it looked like "svn\+ssh:\/\/username@servername" (no quotes). I clicked Find so it would show me the files containing the search string, and there's a preview of the first replacement toward the bottom right. It all looked good, so I clicked "All Files", which performed the replacement. Lastly, I undid the permissions change at the command line (while still in the workingdir): chmod u-w `find . -name entries` So far, so good. Hopefully Netbeans won't strip it again. At least now if it does, I can fight back. If it happens repeatedly, I can make a shell script using perl or sed. ------------------------------ BTW, I was using Netbeans 6.1, and I'm currently using NetBeans 6.5 RC2. I experienced this bug on both, though in 6.5 RC2 it may have been only after I migrated from 6.1, I really don't know. ...Has no one submitted this bug yet? If not, do you know where one could do so?
cd /path/to/project/home/directory
for f in `find -name 'entries'`; do chmod +w $f; ff="$f.old"; mv $f $ff; sed -e 's://server/://username@server/:' $ff > $f; chmod -w $f; # uncomment to delete the old file (not recommended) # rm -f $ff done # don't forget substitute 'server' and 'username' |
QuicksearchLexiyntax @ Twitter
Categories |