Loading...

All project content is available for reading, but you need to be a member of the project for Subversion checkout of source code, or to create/modify any information.
Login if you are a member. Apply here to request membership (open to all).

Frequently Asked Questions

General CodeResort

Browsing files shows strange international characters

When I see diffs or browse files using the code browser, international charactes shows up scrambled in some way. Why?

CodeResort will send the file down the line as utf-8, but the file might have another encoding on the harddrive. Check out the file, open it in an editor that allows you to specify the encoding (Notepad2, Notepad++, Visual Studio etc.) and make sure you save the file to disk as utf-8.

Commit the file, and check the changeset. You should see the international characters show up as expected. If you diff the change on the file before committing it, you should see a change on line 1, but the built in Diff in TortoiseSVN will not show exactly what has changed. What you cannot see (the change) is something we call an Byte Order Mark (BOM) that indicates the encoding of the file. See the link below for more information on the BOM.

Encodings can be a bit elusive, complex and often seem right out impossible to grasp. Having an understanding on how encodings work will be of great help if you need to exchange information between platforms, or if you're doing globalized web sites. Actually, understanding encodings will make you a better programmer - for sure!

Joel Spolsky explains this in an educational and fun way at: http://www.joelonsoftware.com/articles/Unicode.html

Subversion

About using the repository and Subversion clients with Code projects.

TortoiseSVN

Problem with Web project in Visual Studio .Net

By default, TortoiseSVN creates .svn folders inside each directory in the working copy. Visual Studio .Net have problems with these folders for web projects, and a special version of TortoiseSVN should be used (that names the folders _svn instead). Download client from http://tortoisesvn.tigris.org/download.html

Note: This makes the local working copy incompatible with other clients (that need .svn folders), but is of no consequence to other users or the central repository.

Alternatively, use another client - see HelpUser/Subversion for list of clients.

I renamed or deleted a folder outside of Subversion

Ok, first, don't ever do that again. Remember, the repository is your master structure, and structural changes must be done in the repository. If you're using TortoiseSVN, keep you hands off the Delete and Rename commands in Windows Explorer. Use the corresponding commands in TortoiseSVN instead. These will mark your folders and files as delete commands in the repository, and they will be removed from your drive on the next commit.

When that is said, this is a very common mistake, and that is why we have the Cleanup command. Use it! It might not work all the time, but try running it a couple of times, and it should be able to fix most problems.

If Cleanup does not help you get back on track, check the _svn/entries files. It lists all the entries in that folder, and look for entries that does not look correct, especially folders or files that have been deleted or renamed.

I once had to remove an entry like this:

<entry
       name="bvn"
       copied="true"
       kind="dir"
       copyfrom-rev="1"
       schedule="add"
       copyfrom-url="https://code.bvnetwork.no/svn/bvnmodules/BVNetwork.SendMail/trunk/BVNetwork.EPiSendMail/BVNetwork" />

because I renamed the directory from BVNetwork to bvn. I tried to clean up by doing updates, additions and cleanups. TortoiseSVN got really confused, but after deleting the entry I got it working again.

Visual Studio .NET

What happens when you delete a folder or file in VS.NET?

It will not be deleted in Subversion. On the next update, you'll get it back. The correct way to delete the file or folder is to remove it using one of the Subversion tools. In Tortoise, for an example, right click the folder, select TortoiseSVN and Delete. The file will be marked for removal, and deleted on the next Commit.

Using Ankhsvn Visual Studio .NET plug-in

If you are using the ASP.NET version of Tortoise, and thus _svn instead of .svn for Subversion metadata, you need to change the

 <AdminDirectoryName>_svn</AdminDirectoryName>

option in the ankhsvn.xml config file (you can get to this from the "Tools, AnkhSVN, Edit the AnkhSVN config file" menu.)

My Visual Studio .NET project is out of sync

Well, yeah, this happens. Remember, the Visual Studio .NET solution is highly dependent on the project file, which has information about all the files in your project. There are numerous ways your project can get out of sync:

  1. You update your folder structure, but not the project file. This means that files deleted by someone else is still part of your project. Visual Studio .NET will complain about this.
  2. You use Tortoise, AnkhSVN and or other tools at the same time. In order to ensure optimal performance, they will keep changes in memory or cache for some time. This means that one tool is not neccessary getting information about the changes done by another, right here, right now. Refreshing or closing whatever browser you're using (Windows Explorer, Visual Studio .NET etc.) will normally do the trick

The good thing about all this is that you're using Subversion. The files are in there, you can go back to whatever revision you'd like and undo any errors.

Also, use the Cleanup method on your problem folders. It should be present in most of the Subversion tools (like TortoiseSVN), to update the metadata and get to a clean and stable directory structure.