If you want to restore a deleted file from svn there are a few ways to do it, and some work better than others.
The subversion book gives the basic info for restoring a file using either merge or copy. However, the method used in the example for copy didn't work for me. So let's say you delete a file "Stuff.java" in revision 100. Then you would want to restore the file, using the previous revision, into the current working directory like this.
svn copy -r 99 http://svn.mycompany.org/repos/myproject/Stuff.java Stuff.java
My svn server didn't seem to handle the revision option correctly, and kept telling me that the file didn't exist. So an alternative syntax looks like this:
svn copy http://svn.mycompany.org/repos/myproject/Stuff.java@99 Stuff.java
This second syntax, which I didn't see mentioned in the svn book, worked like a charm for me.
If you don't know in which revision the file was deleted, you can use svn log in the directory to see a history of file changes.
After you copy the deleted file, you are not quite finished. You'll still have to commit your changes. So something like svn commit -m "Restore file Stuff.java" will finish the job.
Wednesday, January 28, 2009
Monday, January 12, 2009
RPM for Pidgin msn pecan
Apparently Microsoft changed something on the MSN Messenger servers today, and this was causing problems for many people using Pidgin. One workaround is to use the modified msn plugin from google. But I couldn't find any Fedora rpms for this. So I decided to make one.
The rpm for Fedora 10 is here.
And the source rpm is here.
The rpm for Fedora 10 is here.
And the source rpm is here.
Thursday, December 18, 2008
Thursday, August 14, 2008
Recursively remove .svn directories
It seems I regularly need to remove all the .svn directories from a directory structure. It would be nice if this function to disconnect a directory structure was built into svn, but since it is not, I usually use this command from the root of the project directory structure:
rm -rf `find . -name .svn`
rm -rf `find . -name .svn`
Thursday, June 5, 2008
You talk better than you fool
One of my favorite Simpson's quotes:
Bart: You're going down, Homer. I'm gonna fool you!
Homer: You talk better than you fool.
Bart: I'll fool you up real nice.
Homer: You couldn't fool your mother on the foolingest day of your life if you had an electrified fooling machine.
Friday, March 21, 2008
Finding stuff in jars
My coworker gave me a nice command to use when looking for certain classes in a set of jar files. This will recursively process each jar file in the current directory, and list the contents in search_jars.txt
find . -name \*jar -exec unzip -l {} \; > search_jars.txt
Then you can look in search_jars to find out where class files or other stuff is coming from.
find . -name \*jar -exec unzip -l {} \; > search_jars.txt
Then you can look in search_jars to find out where class files or other stuff is coming from.
Tuesday, February 12, 2008
Setting local maven repository
Maven has a convenient property that can be used to set the location of the local maven repository. It can be passed as a parameter using the "-D" option.
mvn -Dmaven.repo.local=/home/path/to/local/repo install
mvn -Dmaven.repo.local=/home/path/to/local/repo install
Subscribe to:
Posts (Atom)

