Posts Tagged version control

Restoring files or folders in SVN

To recover a folder or a file in svn, you can use the copy command to copy the folder from the revision of the repository before the file or folder was deleted (or modified). The syntax can be a bit confusing but here’s how it can be done. The first flag -r (i’m not sure if you need this the way this command is formatted) specified the revision you copy from. The next argument is the source and it needs to be the full path to the file or folder you’re recovering followed by @ and the revision number. then the location the to copy the data to (which can be just . for this folder).

Example:

svn cp -r 111 https://server/svn/path/to/folder@111 .
svn ci -m "restored file or folder"

, , ,

1 Comment

Mercurial

For a class I’m taking next quarter, I was looking for a lightweight repository I could host on my shared host which would replace SVN.  I came across Mercurial and after playing around with it a bit, I think it may prove to be a very powerful tool.  This tool will work well for this project because there will only be two people working on the project and the complications of using SVN will only inhibit productivity.  The big idea for Mercurial is getting rid fo the central repository.  Instead, each client “clones” the repository and works off their own local repository.  When they’re done making changes, they “push” their work back to the central repository.  When changes have been made by other users, you “pull” those changes.  see the quick start.

Mercurial Quick Start

 

Quick Start Guide

The key feature I really like about Mercurial for this project is the fact that it is very lightweight.  It works without having to modify Apache!  This allows me to use my shared host to host my repository!  Something you can’t do with SVN.  All it is is a CGI script.  See our repository: http://www.prenticew.com/hg/evil.

, , ,

No Comments