Displaying articles with tag subversion
Posted by hank,
Thu May 03 14:16:00 UTC 2007
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.
Tags: subversion
Posted by hank,
Tue Mar 06 16:07:00 UTC 2007
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.
Tags: subversion
Posted by hardwarehank,
Wed Feb 21 01:38:18 UTC 2007
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:
svn sw --relocate https://modzer0.cs.uaf.edu/repos/hank/code/rails/stockmaster \
https://modher0.cs.uaf.edu/repos/hank/code/rails/stockmaster .
All documented here.
Tags: subversion
Posted by hardwarehank,
Sun Sep 03 08:51:43 UTC 2006
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.
Tags: subversion
Posted by hardwarehank,
Wed Aug 23 07:14:04 UTC 2006
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 info was stolen from [here](http://kb.mozillazine.org/Browser.link.open_newwindow.restriction)
###Update
Well, I contacted the #typo channel on freenode, and here’s the answer I got:
[11:39am|sprewell> hardwarehank, you should not be on trunk
[11:39am|sprewell> go back to 1230
So, here’s the solution I came to after screwing up a few times:
- Move all your custom plugins (if any) from components/plugins to somewhere safe
- Delete the components/plugins directory
- rake migrate VERSION=50
- svn up -r 1230
- If it complains about not being able to create directories, just blow away those directories too after you back up anything custom.
- Move things back in place
- mongrel_rails restart
Tags: subversion
Posted by hardwarehank,
Sun Aug 06 11:37:52 UTC 2006
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.
Tags: subversion
Posted by hardwarehank,
Thu Jun 22 22:34:30 UTC 2006
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!
Tags: subversion
Posted by hardwarehank,
Sun Jun 18 21:17:35 UTC 2006
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.
Tags: subversion