pictures

Undelete Something With SVN

hr
hr Heading 2 Icon Undelete Something With SVN

Ever delete something with svn (svn del) and then realize you needed it again? You can get it back by using: svn copy -r HEAD filenameyoudeleted.extension filenameyoudeleted.extension

svn copy is the command to get a working copy back
-r is short for revision. I used HEAD which will give you the latest in repository. You can specify a revision number, revision right before you committed, etc (check out svn help copy)
filename is what you deleted, then where it goes. I usually do something like this within the folder the file was located so you do not see any paths, but if your file was in /www/files/ you would need to specify the file path to /www/files/filnameyoudeleted.extension /www/files/filnameyoudeleted.extension

Working with SVN is a lifesaver - and this tip is gold.

HOWTO Change the SVN Editor

hr
hr Heading 2 Icon HOWTO Change the SVN Editor

Because I always forget…to change the text editor that svn uses with the commit messages, just type in this command (if you use bash):
export SVN_EDITOR=vi

*Substitute vi for your editor of choice.
**Personally, I once was a pico/nano fan, then I moved to emacs, and now I am a vi person.

Subversion File Status Reference

hr
hr Heading 2 Icon Subversion File Status Reference

Something that confuses a lot of people when they start using subversion is the file status. (svn st) Here is a quick list of the file status codes and what they mean:

A File was added
C Conflicting changes
D File was deleted
G File was merged
R File was replaced
U File was updated
? File is not under version control (you will need to add it)
! File is missing (probably was deleted using the OS or some other application and not subversion)

Switch Repositories (SVN)

hr
hr Heading 2 Icon Switch Repositories (SVN)

In order to take a look at WordPress 2.5 before it was released, I used subversion to check out the latest code available using the instructions given on the WordPress site. Once WordPress 2.5 was released, I wanted to keep my sites using 2.5 and not the bleeding edge releases (2.6) so I needed to easily switch repositories from http://svn.automattic.com/wordpress/trunk/ to http://svn.automattic.com/wordpress/branches/2.5/.
I had never had to switch repositories, so it took some reading to figure it out. For future reference, the following command works when used in the directory you have the checked out files in: “svn switch http://newrepos.com .” For my example, I ran the command: “svn switch http://svn.automattic.com/wordpress/branches/2.5/ .”

remove all .svn directories in a directory.

hr
hr Heading 2 Icon remove all .svn directories in a directory.

Anyone who uses subversion will need this sooner or later. Change directories to the root directory and run:
find . -name .svn -print0 | xargs -0 rm -rf. Bingo...all .svn directories are gone and you can start fresh!
[tags]subversion, svn[/tags]

mini stack.

hr
hr Heading 2 Icon mini stack.

To address my increasing backup needs as well as my need for more FireWire and USB ports, I decided to buy a miniStack (500GB). I own a Mac Mini and so the miniStack seemed like the perfect solution. Now comes my friendly reminder to all those reading that do not back up...back it up! On another note, I also recently started using SVN for all my business projects (thanks Demitrious) which is backed up offsite. Back up!
[tags]mini stack, SVN, backup[/tags]


search

subscription information

Blog RSS

Comments RSS



Powered by FeedBlitz

blog categories

blog tags

most popular posts

  1. jappler recommends: room & board (store).
  2. using parallels and windows for web development debugging.
  3. another good first tuesday in november.
  4. remove all .svn directories in a directory.
  5. wordpress newsletter plugin.
  6. Add a "Pseudo" Pseudo Class Hover in Inline CSS.
  7. php live training.
  8. so long, farewell ben!
  9. css containers: one image, fixed width, rounded corners.
  10. feel better soon joe paterno.

blog archive

standards

Get Firefox!
XHTML
CSS