DeutschEnglish

Submenu

 - - - By CrazyStat - - -

5. May 2012

TortoiseSVN painfully slow (Log)

Filed under: Windows — Tags: , , , , , , — Christopher Kramer @ 21:14

I had a problem with TortoiseSVN: Sometimes it behaved painfully slow. Especially when I wanted to view the log of CrazyStat’s svn repository, it took about 10 minutes (!) to show it. First I thought the problem was caused by the Sourceforge servers, but then I realized that other svn clients did not have the same problem. I tried several things and the solution finally was quite simple and even listed the the TortoiseSVN FAQ:

Browsing very slow in explorer and file/open dialog.

If you have mapped network drives which are not resolved, either because the drive is inaccessible, or you have not logged in, file browsing may become unresponsive while Windows tries unsuccessfully to access the drive. Either unmap the drive or ensure that it can be accessed

 

I first did not think that this was my problem as I did not experience slow browsing in explorer or file/open dialog. But after I unmapped all unresolved network drives, it worked great again.

By the way, I’d recommend TortoiseSVN to anybody who is searching for a windows svn client. I have not seen any other client that powerful yet simple.

I hope this might be helpful for somebody who has the same problem.

Recommendation

Try my Open Source PHP visitor analytics script CrazyStat.

21. March 2012

Public SVN for CrazyStat

Filed under: CrazyStat — Tags: , , , — Christopher Kramer @ 23:12

Finally, CrazyStat’s SVN has gone public!

CrazyStat uses Sourceforge for SVN hosting. You can browse it here:

https://sourceforge.net/p/crazystat/code/

To checkout the current development version of CrazyStat, use one of these:

  • SVN over HTTP protocol:
    svn checkout http://svn.code.sf.net/p/crazystat/code/trunk crazystat-code
  • SVN protocol:
    svn checkout svn://svn.code.sf.net/p/crazystat/code/trunk crazystat-code

In the SVN repository, you can find the current CrazyStat 1.71 development version (in the trunk) along with 1.71 beta1 and beta2.

You can also read the commit logs to see what is going on with CrazyStat development.

In case you want to test the upcoming CrazyStat version 1.71, I’d recommend checking out the current development version from the trunk. Please let me know if you find any bugs or issues with the current development version (which will soon become RC1…).

This is part of my plans to make development of CrazyStat more open.

Greetings!

17. February 2012

Subversion (SVN): Permanently remove files from repository (history)

Filed under: Linux,Server Administration — Tags: , , , , , , — Christopher Kramer @ 20:02

As I am about to make CrazyStat’s subversion repository public, I checked whether there is anything in there that is not suitable to be made public. I stumbled upon some logfiles which I had once used for testing and accidentally commited to the repo. These logfiles contained private data and therefore, I needed to remove them from the history before making the repository public.

And that is how it can be done:

As SVN has no ‘obliterate’ command yet (see feature request here), you need to perform the following steps:

  1. Make sure nobody else uses the repo at the time
  2. Dump your repository to a dumpfile
  3. Filter the dumpfile (remove the files you do not want to be in there anymore)
  4. Create a new repository
  5. Import the dumpfile in the new repository
  6. Replace the old with the new repository
  7. Check it
  8. Clean up

These steps in detail:

Step 1: Make sure nobody else uses the repo at the time

I think the easiest way would be to remove write-permissions from the repository-folder. E.g. if you access your svn through apache, just chown it from www-data to root and nobody should be able to write anymore:

chown -R root:root /var/svn/REPOSITORY

Step 2: Dump your repository to a dumpfile

svnadmin dump /var/svn/REPOSITORY > dumpfile

Step 3: Filter the dumpfile

svndumpfilter exclude /path/of/file/to/remove < dumpfile > newdumpfile

This will remove the file “/path/of/file/to/remove”. You can remove multiple files at a time like this:

svndumpfilter exclude file1 file2 < dumpfile > newdumpfile

I did not find any way to use wildcards, though. Let me know in case you find anything.

Update: Thanks to the comment by Florian! Here is the way to use wildcards:

svndumpfilter exclude –pattern "*.OLD" < dumpfile > newdumpfile

Florian also pointed us to a documentation of svndumpfilter which might be helpful for some of you.

Step 4: Create a new repository

svnadmin create /var/svn/REPOSITORY_NEW

Familiar, right? 😉

Step 5: Import the dumpfile in the new repository

svnadmin load /var/svn/REPOSITORY_NEW < newdumpfile

Step 6: Replace the old with the new repository

chown -R www-data:www-data /var/svn/REPOSITORY_NEW
mv /var/svn/REPOSITORY /var/svn/REPOSITORY_OLD
mv /var/svn/REPOSITORY_NEW /var/svn/REPOSITORY

In the first line I also changed the file owner and group to www-data to make the new repository accessible for apache. In case you do not use apache (e.g. svnserve), skip the line or change the file owner and group to your needs (see what the owner of the old repo was using “ls -l /var/svn” ).

Step 7: Check it

You update your working copy (shouldn’t change anything). But when you browse your history and want to see one of the files you removed, you will get an error that the file could not be found.
You might want to make a fresh checkout and a commit to see whether everything still works as expected…

Step 8: Clean up

In case everything went well, you can delete a couple of things:

rm -R dumpfile newdumpfile /var/svn/REPOSITORY_OLD

 

Deleting old revisions

I also found a useful blog post on how to delete old revisions and only keep new ones. Some users might prefer this option if it is not a single file they want to get rid of but complete old revisions.

 

By the way, the CrazyStat SVN repository will be publicly available soon…

Hope somebody finds anything of this useful.