ankhsvn
Wiki: Faq10

Edit this page | Links to this page | Page information | Attachments | Refresh page

 

AnkhSVN 1.0.X FAQ

This is the complete FAQ for AnkhSVN. We have used our Wiki for this FAQ so that it is easy for you to help us maintain the contents of this FAQ. You only have to be a logged in project member to use the Wiki. There should be an Edit this page link displayed above.

Return to Wiki FrontPage

Contents

  1. Using the features of AnkhSVN
    1. AnkhSVN doesn't work for this project but TortoiseSVN works fine
    2. How do I make AnkhSVN use "_svn" instead of ".svn"?
    3. How do I identify the version of AnkhSVN I am using?
    4. Some project settings not preserved across checkin/checkout (ie. Working Directory). Why?
    5. Does subversion support locking of files? IE is there an equivalent of "checked out by me", "checked by other" as in Visual Source Safe?
    6. How does AnkhSVN determine whether a solution is version controlled?
    7. I selected No when asked whether to load AnkhSVN for my solution. Now I have changed my mind!
    8. What is the optimal solution layout for AnkhSVN?
    9. But I can't create a layout like that with ASP.NET 2003 projects! VS places the ASP.NET projects under wwwroot
    10. I can't figure out how to add a new project via AnkhSVN and yes, I read the Getting Started page
  2. Using AnkhSVN with other software
    1. What versions of VS.NET does AnkhSVN run on?
    2. What else do I need to have installed to use AnkhSVN?
    3. How do I convert my Visual Sourcesafe repository to Subversion?
    4. Why doesn't AnkhSVN work with Intel Compiler projects/{insert favorite project type here}
    5. I am using svnserve, when I attempt to do a commit to the remote repository I get a Permission denied error. How do i set up user accounts for svnserve?
    6. I'm trying use svn+ssh but i get an error dialog when I try to checkout or update.
  3. Errors (AnkhSVN 1.X)
    1. I get an error saying "Cannot copy or move file: it's not in the repository yet. Try committing first"
    2. I get an error saying "Failed to add file: object of the same name exists"
    3. I get an error saying "This client is too old to work with working copy; please get a newer Subversion client
    4. When committing, I get an error saying Aborting commit: file remains in conflict
    5. If I do a "Replace In Files", AnkhSVN doesn't notice that the files have changed.
    6. I am getting the error "Unable to retrieve folder information from the server with my ASP.NET web project".
    7. I get an error saying "The version resource does not correspond to the resource within the transaction."
    8. I get an error saying "PROPFIND of ...: 405 Method Not Allowed"
    9. I uninstalled AnkhSVN, but the menu entries are still there, how can I get rid of them?
    10. I am getting an svn client error exception for svn_io_file_open: can't open (then a path to a file with a .projdata or a .ncb extension)
    11. I am getting a MissingMethodException - Method not found: System.Object AddCommandBar
  4. Other
    1. What's an Ankh?

Using the features of AnkhSVN

AnkhSVN doesn't work for this project but TortoiseSVN works fine

The default directory for Subversion clients administrative data is ".svn" however Visual Studio has some issues with directories beginning with a . and so some clients use "_svn" instead.

If you have TortoiseSVN set to use "_svn" then you should also tell AnkhSVN to do this too as per the following question.

How do I make AnkhSVN use "_svn" instead of ".svn"?

Open Visual Studio without a project loaded.

From within Visual Studio choose Tools -> AnkhSVN -> Edit the AnkhSVN configuration.

Under Category "Subversion", key ?AdminDirectoryName put in the value "_svn"

Hit OK.

Now open up a solution that is versioned with subversion and enable it for AnkhSVN.

How do I identify the version of AnkhSVN I am using?

From within Visual Studo choose Help -> About Microsoft Visual Studio

In the dialog that is shown choose AnkhSVN from "Installed products" and the version details will then be displayed in "Product details".

Note both these lists may require scrolling to find AnkhSVN and the version numbers.

Some project settings not preserved across checkin/checkout (ie. Working Directory). Why?

Those settings are considered to be the local user project options and they are not meant to be version controled by definition. (FYI they are not stored in the .vcproj / .csproj but in the .suo / .csproj.user Visual Studio user option files)

Does subversion support locking of files? IE is there an equivalent of "checked out by me", "checked by other" as in Visual Source Safe?

AnkhSVN supports locking via the Lock and Unlock commands. It also has icons to indicate the lock status of a file.

How does AnkhSVN determine whether a solution is version controlled?

Whenever VS.NET loads a solution, AnkhSVN looks at the directory that contains the solution(.sln) file. If this directory is version controlled, AnkhSVN will present the user with a choice whether AnkhSVN should be enabled for the current solution. You can also choose to have AnkhSVN load for a single session only.

I selected No when asked whether to load AnkhSVN for my solution. Now I have changed my mind!

Right click on the solution node in the Solution Explorer and select AnkhSVN->Toggle AnkhSVN for this solution.

What is the optimal solution layout for AnkhSVN?

AnkhSVN will perform best(solution load time, refresh time etc...) when the file system layout of the solution follows the logical layout. That means something like this:

 SolutionDir\
    Solution.sln
    Project1\
       File1.cs
       File2.cs
       SubNamespace\
          File3.cs
          File4.cs
       Project1.csproj
    Project2\
       Foo.vb
       Bar.vb
       SubFoo\
           Moo.vb
       Project2.vbproj
    Project3
       Ooga.cpp
       Ooga.h
       Chacka.cpp
       Chacka.h
       Project3.vcproj

VS will create this kind of layout for you if you check the "Create directory for solution" checkbox when creating a new project.

But I can't create a layout like that with ASP.NET 2003 projects! VS places the ASP.NET projects under wwwroot

That 'is' the default layout, yes. However, it is quite possible to put an ASP.NET project anywhere in the file system.

Assume you have laid out the solution according to the above(either by creating other projects or by making a blank solution):

These instructions only work in VS 2003:

  • Create the directory under the solution directory that is to hold the ASP.NET project, f.ex ?WebProject

  • Go into the Properties dialog of that folder and click the Web Sharing tab
  • Click "Share this folder" and enter a suitable name, f.ex mywebproject
  • In VS.NET, right click the solution and choose Add->New project

  • Select ASP.NET project and enter http://localhost/mywebproject as the URL

  • VS.NET will now create the solution under SolutionDir\WebProject

I can't figure out how to add a new project via AnkhSVN and yes, I read the Getting Started page

There is a good chance that Visual Studio is not showing you the Solution node in Solution Explorer. To rectify this, go to the menu bar and click Tools > Options > Projects and Solutions, and check the box next to 'Always show solution.' After clicking OK, right click on the solution node to bring up the context menu, follow the Getting Started instructions from there.

Using AnkhSVN with other software

What versions of VS.NET does AnkhSVN run on?

AnkhSVN 1.0.4 supports VS.NET 2002 and VS.NET 2003. It is the same install file (msi) for all versions.

AnkhSVN 2.0 will only support Visual Studio 2005 and 2008. It is completely redesigned to take advantage of the new sourcecontrol api introduced in Visual Studio 2005.

What else do I need to have installed to use AnkhSVN?

AnkhSVN links into the same libraries that svn.exe does, so if the Subversion repository is already created it is possible to use AnkhSVN without ever installing Subversion at all. However, with AnkhSVN you cannot yet do some things, including but not limited to creating a repository, merging, copying or moving. It is highly recommended that Subversion be installed as well at this point. You can download Subversion from openCollabNet. Other than that all you need is VS.NET.

How do I convert my Visual Sourcesafe repository to Subversion?

Information is in the Subversion Migration section of openCollabNet. .

Why doesn't AnkhSVN work with Intel Compiler projects/{insert favorite project type here}

(AnkhSVN 1.X) In VS.NET, every vendor that provides a project type is also responsible for implementing its automation model. In some cases, they do a less than stellar job, and this leaves AnkhSVN in a position where it cannot get the information it needs.

(AnkhSVN 2.0) With the redesign for AnkhSVN 2.0 we implemented the new style SCC api which should support all project types that are scc-enabled just like the other source code control providers from other vendors.

I am using svnserve, when I attempt to do a commit to the remote repository I get a Permission denied error. How do i set up user accounts for svnserve?

Svnserve has built-in authentication and authorization. You can setup users and realms within your /path-to-repos/conf/svnserve.conf file. See http://svnbook.red-bean.com/svnbook-1.0/ch06s03.html for instructions.

I'm trying use svn+ssh but i get an error dialog when I try to checkout or update.

You may not have an ssh client available. You can specify the full path to the client in the c:\Documents and Settings\YOURUSERNAME\Application Data\Subversion\config. Make sure you uncomment the # tunnels section and add a line like this:

ssh = c:\\Program\ Files\\TortoiseSVN\\bin\\?TortoisePlink.exe

(note the double \ characters and the single \ to escape the space )

Errors (AnkhSVN 1.X)

I get an error saying "Cannot copy or move file: it's not in the repository yet. Try committing first"

Subversion (and AnkhSVN by consequence) does not allow you to rename items that have been added, but not committed. If you need to do this, first perform a "Revert" on the item, then do the rename and read it.

I get an error saying "Failed to add file: object of the same name exists"

This means that someone else has added a file with this name to the repository. When updating, Subversion will refuse to overwrite unversioned files. You have to move the unversioned file out of the way first.

I get an error saying "This client is too old to work with working copy; please get a newer Subversion client

Subversion 1.5 introduced a new working copy format. As a consequence, all clients linking to SVN 1.5 libraries will automatically upgrade any working copies they come into contact with, leaving the working copy unusable by older clients.

AnkhSVN 1.0.4 is linked to SVN 1.5, so upgrading will solve the problem.

When committing, I get an error saying Aborting commit: file remains in conflict

This means you have a file that is in conflict, ie, someone else has made a change that conflicts with one of yours. You will have to resolve the conflict before proceeding. This can be done by editing the conflict markers in the file, then doing AnkhSVN->Resolve on the file in question.

Alternatively, you can pick which version of the file you want to resolve in the Resolve dialog, or use an external merge tool (you need to set up one in the configuration dialog for this).

If I do a "Replace In Files", AnkhSVN doesn't notice that the files have changed.

If you want to do "Replace In Files" on files controlled by AnkhSVN, make sure to check the checkbox in the dialog that comes up. This will make VS open all the affected files in the document editor and force you to do an explicit "Save All" in order to finalize the changes. AnkhSVN will notice in this case.

I am getting the error "Unable to retrieve folder information from the server with my ASP.NET web project".

This problem is described in detail here: http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=60681 The best solution is to have AnkhSVN use _svn as the name of the Subversion administrative directory instead. This can be done in the configuration dialog (Tools->AnkhSVN->Edit AnkhSVN configuration).

I get an error saying "The version resource does not correspond to the resource within the transaction."

Running Update on the item in question solves this problem.

I get an error saying "PROPFIND of ...: 405 Method Not Allowed"

This usually means you are trying to perform a Subversion operation against an URL that isn't set up as a Subversion repository.

I uninstalled AnkhSVN, but the menu entries are still there, how can I get rid of them?

This is a known issue scheduled to be fixed with the 2.0 release. Until then, please view the following blog entry about how to remove the menu entries here.

I am getting an svn client error exception for svn_io_file_open: can't open (then a path to a file with a .projdata or a .ncb extension)

You cannot put the .projdata file under Subversion version control. VS.NET puts a pretty tight lock on that whenever a solution is loaded - other applications cannot even read from it. In fact, this exact scenario was used for an AnkhSVN presentation to demonstrate how the error reporting worked. This file is generated by VS.NET, doesn't have much of interest in it, and there's no reason to put it under version control anyway. Other generated files that should never be put under version control include but are not limited to files of type .user, .suo, .obj, .exe, .pdb and dll.

We recommend adding .projdata and some of the other file types to the global-ignores section in your %APPDATA%\Subversion\config file. This will ensure that they don't get accidentally imported if you use other clients to add your code to the repository. If you use AnkhSVN->Add solution to repository, AnkhSVN will of course ignore these files automatically.

Here is a sample global-ignores:

[miscellany]
### Set global-ignores to a set of whitespace-delimited globs
### which Subversion will ignore in its 'status' output.
global-ignores = *.projdata *.pdb *.exe *.dll obj tmp temp bin *proj.user *.o *.obj *.ncb *.suo *.pyc

I am getting a MissingMethodException - Method not found: System.Object AddCommandBar

This is caused by a bug in the installer of either Whidbey or the Express SKUs. To fix:

> cd %windir%\Microsoft.NET\Framework\v1.1.4322
> regasm /codebase envdte.dll

The last line will give you a warning, but it's not dangerous.

Other

What's an Ankh?

Read about this ancient Egyptian sign of life.

Return to Wiki FrontPage

Faq10 (last edited 2008-09-30 08:01:29 -0700 by ?sander)