This document is aiming to help two groups of people:
1. Normal (by which I mean those who don’t spend 18 hours a day hacking in front of laptops in their basements) people who work with lots of documents and are seeking ways to organize their work. You may find the screen shots helpful.
2. Computer geeks who happen to need managing their binary files. Maybe you don’t need to read any further. “Use SVN! You idiot” could be sufficient. :)
Be aware: This is a mini howto of using
SVN to manage documents on Windows platform. I am using Windows 7, I can’t promise these steps work for other Windows operating systems, and I CAN promise that they WON’T work for Linux/Mac OS since the software used here are for Windows only. So, if you are using non-M$ operating system, you can safely ignore the rest of blabbing and enjoy your life elsewhere.
.
.
.
Firstly, some background BS, you can skip it and jump to the
real stuff:
Moving is a serious business. You have to face a lot of changes—weather, work, the community your live—basically everything around you. I have been in this situation since moving back to Canada this February. I suddenly found myself doing a lot of paper work -- reactivating credit card, changing bank address, applying for new health care card—things that I didn’t need to do when I was in China. This morning, while working with yet another document, a thought kicked in my mind: “I wonder if I can find a software application to manage all these documents so that I can track the changes when need to.”
As a faithful googler, I eagerly typed “Document Management System” in my Chrome address bar, and was taken to a sea of sites that point to different DMSs (yes, they even have an acronym for this kind of systems). However, all these applications looked overly complex and none meet my requirement of tracking changes (I could be wrong, since I didn’t finish reading even one complete description of these products due to impatience+boredom).
Then my geekyness as a programmer woke up. I had been using SVN to manage source code for work and it did the job just fine, why not use it for my documents? Even though the binary format nature of these documents would make features such as merge and diff stop working, but all I needed was to be able to grab “snap shots” of documents at certain point of time. SVN seems to be perfect for doing that.
So, I rolled up my sleeves and started building the home-made DMS. Also, I decided to record every step so that maybe someone sitting on the other end of the Internet can benefit from it.
Now the real stuff:
1 Setting up Visual SVN Server
1.1 Go to http://www.visualsvn.com/ and download and install the latest SvnServer software.
1.2 Create a user, for example: weima.
1.3 Create a new repository, for example weima_docs.
1.4 Assign read/write privilege of weima_docs to user weima.
2 Download and install Tortoise SVN client
2.1 Goto http://tortoisesvn.net/downloads to download and install Tortoise SVN client. Reboot your computer.
3 Import documents to repository
3.1 In your windows explorer, goto the parent directory of the directory where you store documents.
3.2 Right click to bring up the tortoises menu and click import.

A dialog asking for repository url should pop up
3.3 Goto VisualSvn UI, right click on the repository, select copy url to clipboard .
3.4 Go back to tortoise svn import dialog box, use Ctrl+V to paste the contents to the URL address bar. Then click on OK.
3.5 A dialog asking for user name and password pops up. Fill out the user name and password and check the save authentication check box to stop the dialog from popping up in future usages.

4 Checkout versioned documents
4.1 Create a new directory, for example, versioned_docs.
4.2 In windows explore, go to the newly created directory.
4.3 Right click-> Svn checkout.

4.4 In the repository url address bar, paste the repository address. If you haven’t copied anything to clipboard after step 6, Ctrl+V should still work.
Click OK. Now the directory should contain a hidden .svn subdirectory and files checked out from svn repository. The new files should be associated with green check mark signs.
5 Work with versioned documents and commit changes.
5.1 Open a versioned document. In my case, Test1.doc.
5.2 Make some modification to the file and save.
5.3 In Windows explorer the modified file should be associated with red exclamation sign now.
5.4 right click on the changed file, click on Svn commit
Click OK on the following two dialog boxes. Now the change is committed to the server. The sign that associated with the changed file should switch back to the green check mark again.
6 Revision of documents.
6.1 In windows explorer, right click on the file that needs to be revised. Choose Tortoise Svn-> Update to revision

6.2 In the pop up dialog box, choose the version you want to revise to, and click OK.
6.3 Now you can work on the revised document and do normal update and commit as shown in step 5.
Conclusion: I am pretty happy with the result. I am now able to do all kinds of changes to my documents withough the fear of losing any of the valuable works (as long as I remember to commit changes after important updates). Since SVN is a huge topic, it’s not possible for me to cover everything in this little blog entry. You can check the
tortoise svn manual if interested.