CategorySubversion

Here’s a list of errors and what I do to fix them. Also, there’s a list of tips when dealing with these errors.

Action: Commit or you add

Error Message: Entry for …. has no URL

What It Means: The SVN meta files were deleted/modified by your operating system or some other application and has deleted/corrupted the meta files.

Solution: Run cleanup on that directory. Afterwards, run update on that directory. Move the troubling files to a temp directory. Commit whatever you can from that directory. Delete that directory. Go one directory up, and do an update (this will create clean versions of the meta files) on it. Then, from the temp directory, copy the troubling files into the folder that was recreated after you did an update. The new files will have a + sign. Add those files and then commit them. If you still see the exclamation point on it, run cleanup on the folder again.

Action: Updating a folder

Error Message: system cannot find the path specified

What It Means: The SVN meta files were deleted/modified by your operating system or some other application and has deleted/corrupted the meta files.

Solution: Run cleanup on that directory. Afterwards, run update on that directory. If you get a conflict afterwards, resolve the conflict or revert to the current version in the trunk. Run update again.

Action: Updating a folder

Error Message: Can’t close file / There is not enough space on the disk

What It Means: Your hard drive is out of space.

Solution: Make more space on the drive that you’re running the update on.

Action: Commit a folder

Error Message: Out of date; try updating;

What It Means: The files in the folder you’re trying to commit have conflicts (most likely), and there’s repo changes you need to update your working directory to. Chances are that after you update, you’ll have conflicts and need to resolve them.

Solution: Update that directory.

Action: Updating a folder

Error Message: An existing connection was forcibly closed by the remote host

What It Means: Your connection to SVN was dropped or timed out. Also, the SVN server could’ve been reset.

What It Means: The SVN meta files were deleted/modified by your operating system or some other application and has deleted/corrupted the meta files.

Solution: Run cleanup on that folder and update again.

Action: Updating a folder

Error Message: Tree Conflict; One or more files are in a conflicted state

What It Means: Your folder has conflicts.

Solution: Go to the file(s) (in this case, e.cshtml), and resolve the conflict (or revert it if you haven’t touched it). After you do that, update the folder again.

Action: Add a file and then commit to the repo

Error Message: File … already exists

What it Means: Your metadata is not in sync with the repo and running cleanup is not helping.

Solution: This is one of the most problematic issues you may come across. Updating/cleaning up/etc may not help you here. The fastest way to resolve this is to delete from repository and add the file again to the folder and commit.

Drawback: You’ll lose the history of the file if you try to view it

Tips

Sometimes no matter what you do, it won’t work, so it may be faster to redo a checkout. That always guarantees that your directory will work afterwards. To do this, delete your working directory. Then create that directory again and do a checkout of the folder you want from the repo.

Basically, how fast you checkout depends on:
How many files you’re checking out
How many people are doing SVN operations simultaneously on the repo
The size of the files you’re checking out

If there’s a conflict, sometimes it’s just easier to revert (if you haven’t touched it) the file to the last revision (in Tortoise, you have the option to “Revert” if there’s a conflict) then trying to resolve it.

After you do a commit on a folder, the icon overlay may not update immediately, that is, you commit all the files in a folder and then you still see the exclamation icon over the folder. There are three ways you can resolve it:

Tortoise has to update all the metadata in needed files and subfolders. Depending on how many files there are in the folder, showing the icon may take a few seconds.

If you try to commit again you may get this:

So you have to wait.

If you’ve waited a while and the icon doesn’t update, with your OS, navigate to the folders where the suspected files (that have an exclamation icon) are. Once you get there, wait a few seconds. Then go up 1 directory and see if that fixed it.

If the above doesn’t work, run cleanup on that folder, and then do an update on that folder.

Add the most common actions to your context menu:

When I right-click on a folder, show the most common actions:

You can configure this by right clicking anywhere and doing settings -> Context Menu

This is a handy tool that lets you know when someone committed to the repo. In conjunction, if you download Snarl (https://sites.google.com/site/snarlapp/home) , it can show you notifications. Tried out this tool now, and it seems to work fine (so far).

Here’s a listing of items that may be of challenge when introducing it to a team who has no previous SVN experience. Version control is a rewarding experience, and once you get the hang of it, you’ll be wondering how you lived without it.

1. (Most) everyone using SCM for the first time. Have to be familiar with:
a. Subversion concepts
i. Terminology
ii. Best practices
b. Tools:
i. Tortoise Concepts
ii. Subclipse (Programmers)
c. Quirks
i. Sometimes the icon overlay won’t show in Explorer
ii. Thumbs.db file can make the status of the directory misleading
iii. Updating code in MacOSX’s finder can corrupt the SVN metadata
because a native SVN shell (e.g. Tortoise) isn’t being used.
d. Troubleshooting (I sent out a list of 10+ SVN issues and how to
troubleshoot)
i. What do you do when you get this type of error?
e. Undoing the way things were done before an SCM tool was used
2. SVN Performance
a. Performance of the SVN repository is dependent on use
i. If programmer-A does intensive SVN operations, like checkouts, it
slows down operations for everyone else – programmer B has to
sometimes up to 20 minutes to view the revisions of 1 file.
b. Performance of SVN client is dependent on network
3. Development Workflow between all members
4. Deployment to STAGING + PRODUCTION
a. A better process for deploying to STAGING:
i. If a change set that has to be deployed to STAGING is small
(e.g. <10 files under 1 folder), it can be done manually, which
takes seconds.
ii. If a change set is large (10 files, however, dispersed
throughout a code base), gets more error prone (done by hand)
and is better done through automation.