Tuesday, May 22, 2007

Cool trick: Re-instating deleted files in subversion.

One of the problems with version control in general is dealing with large amounts of binary data. If you add a large chunk of data, say an image sequence, its in there...for good*. If you delete it, and you want it back, well, is it possible to get it back without having to put it back in, increasing the size of the repository? With Subversion you can.

Earlier today we had a subcontractor who's new to using Subversion make the classic subversion mistake: copying a directory using Windows Explorer's copy and paste, instead of using Tortoise. So he copied his files to a new location, then used TortoiseSVN->Delete to remove the files from the repo, and supposedly committed his updates (which didn't move any files like he thought). When we asked him where the files went he was like 'i can see them'. So I went ahead and im'ed back 'i'll fix it'.

I reverted just the deleted branch to before he deleted the files. Then I moved them to where I wanted them to be in the current branch using the proper right-click and drag method with Tortoise.

The 'cool' part of this is that I'm actually moving files that aren't part of the current revision, and don't even exist in the current revision, from a previous revision. Remember that in Subversion all file revisions are really just links with data attached. All I'm doing is telling Subversion to link the data from a previous version to the latest revision, and Subversion just does what its told. Awesome!

* It is possible to use stream editing to remove files from SVN repositories, if you are braver than me.

2 comments:

Anonymous said...

Casinos Online tyuueooru
http://stonewalljacksoncarnival.org/ - Play Casino
3.
[url=http://stonewalljacksoncarnival.org/]Free Casino Gambling[/url]
Online Casino - The Advantages
Play online casino games for money or for free! FREE welcome bonuses are guaranteed!
The skyrocketing popularity of online casino, since its arrival, is no doubt something that cannot be overlooked at any cost.
Best Online Casino
Online Casino - The Advantages
Play online casino games for money or for free! FREE welcome bonuses are guaranteed!
The skyrocketing popularity of online casino, since its arrival, is no doubt something that cannot be overlooked at any cost.

Anonymous said...

I truly believe that we have reached the point where technology has become one with our world, and I am 99% certain that we have passed the point of no return in our relationship with technology.


I don't mean this in a bad way, of course! Ethical concerns aside... I just hope that as memory gets less expensive, the possibility of copying our brains onto a digital medium becomes a true reality. It's a fantasy that I dream about all the time.


(Posted on Nintendo DS running [url=http://www.leetboss.com/video-games/r4i-r4-sdhc-nintendo-ds]R4i[/url] DS FFV2)