Malicious enjoyment derived from observing someone else’s misfortune
 

Tag Archives: subversion

SVN Log Made Easier

So, I got tired of typing in the dates to find a range of log messages. Here’s my solution: # In ~/.bashrc svn-log() { case $1 in yesterday | yes | y) svn log -r {`date -d yesterday +”%Y-%m-%d”`}:{`date +”%Y-%m-%d”`};; *) echo “Invalid Option: $1″;; esac } I plan to add more to this later.

Ignoring SVN and CVS files with rsync

I found out how to get rid of those pesky Subversion and CVS files as well as some other crappy files laying around when rsyncing. It’s really quite simple. It turns out the *-C* switch does this for you: rsync -Cavrx … Very nice.

Switching SVN Locations

I moved some crap around in my repository the other day, and I felt the pain when I tried to update. Thankfully, the svn people have thought this thru already. svn sw https://modzer0.cs.uaf.edu/repos/hank/code/rails/stockmaster . At first this broke, so I had to do a temporary svn cp to resolve some missing crap. After that, it moved right over to the new location and I could update again. If I had changed servers and not paths, I could have done this: [...]

Easy ACL Making for Subversion

So, I was messing around with Access Control Lists in svn today, and I needed to fund out who the commiters were on each repository. I used svn log to do this: svn log https://modzer0.cs.uaf.edu/repos/hank | grep ‘^r[0-9]\{1,\}’ | cut -d\| -f 2 | sort | uniq -c This gets all the users and the number of commits they have: 1 DevastatorIIC 73 hank 37 hardwarehank How helpful.

Typo is broken, but I fixed Firefox

So, I upgraded Typo a few days ago, and just noticed today that all my links are broken because my relative_url_root is busted. I wonder what caused that. Anyway, on a better note, I fixed Firefox to open all new windows in new tabs instead. So much better. Here’s the fix: browser.link.open newwindow.restriction = 0 browser.link.open newwindow = 3 Now, all the calls even from javascript will divert into the newwindow setting, which opens new tabs for everything. YAY! This [...]

Magical SVN Remove

Have you ever wanted to batch remove some Subversion files? Try this on for size: svn rm `svn stat | grep ! | sed -e ‘s/^\!\s\+//;s/$/ /’ | tr -d ‘\n’` That will remove all the entries from svn stat that start with !. Very handy. Took a few minutes to write (sed wouldn’t get rid of my newline, so I used tr …), but it’s worth it.

Fixed httpd hangings

So, Apache (httpd) was hanging for some reason, and it was really perplexing. I turned on the mod_status stuff and looked at the results, and found that the hung processes were caused when requests went to certain Subversion repositories. All I had to do was svnadmin recover them, and all was well. Otherwise, I found an interesting function for ruby today… #number_with_delimiter(number, delimiter) number_with_delimiter(2000000) Makes 2000000 look like 2,000,000. Amazing!

Simultaneous SVN Dump and Load with Netcat

I started by looking at the code from here. Then, I decided I should use netcat instead of scp. Here’s the result: cd <repos dir> svnadmin dump reponame | nc6 -x <NewServer> 7676 cd <repos dir> svnadmin create reponame nc6 -x -l -p 7676 | svnadmin load reponame Works like a charm – it’s awesome to have 2 windows open and watch the simultaneous dump and import – how hot.