visualsvn -subversion for visual studio

46
Subversion Integration for Visual Studio VisualSVN Team

Upload: jishin

Post on 12-Nov-2014

8.978 views

Category:

Documents


0 download

DESCRIPTION

VisualSVN is a transparent integration of Subversion version control system to the Visual Studiodevelopment environment.

TRANSCRIPT

Page 1: VisualSVN -Subversion for Visual Studio

Subversion Integrationfor Visual Studio

VisualSVN Team

Page 2: VisualSVN -Subversion for Visual Studio

VisualSVN: Subversion Integration for Visual StudioVisualSVN TeamCopyright © 2005-2007 VisualSVN Team

Windows® is a registered trademark of Microsoft Corporation.

All other trademarks and copyrights referred to are the property of their respective owners.

Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder.

Distribution of this work or derivative work in any standard (paper) book form for commercial purposes is prohibited unless priorpermission is obtained from the copyright holder.

DOCUMENTATION IS PROVIDED “AS IS” AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS ANDWARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE ORNON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLYINVALID.

Page 3: VisualSVN -Subversion for Visual Studio

VisualSVN Team 3

Introduction ...................................................................................................................................... 5What is Subversion? ................................................................................................................ 5What is VisualSVN? ................................................................................................................ 5

Intuitive status ................................................................................................................. 6Unlimited Subversion ....................................................................................................... 6

Getting Started ................................................................................................................................ 9Add Solution to Subversion ...................................................................................................... 9

Executing “Add Solution to Subversion” command ............................................................. 9Commit Solution to Subversion ....................................................................................... 10

Understanding VisualSVN .............................................................................................................. 13Why Visual Studio integration? ............................................................................................... 13Design principles of the VisualSVN ......................................................................................... 13

Basic Work Cycle .......................................................................................................................... 15Update your working copy ...................................................................................................... 15Make changes ....................................................................................................................... 15Examine Your Changes ......................................................................................................... 16Possibly undo some changes ................................................................................................. 16Merge others' changes ........................................................................................................... 17Commit your changes ............................................................................................................ 18

Examining History .......................................................................................................................... 21Web Development with VisualSVN ................................................................................................. 23

Web Development with Web Site Projects .............................................................................. 23File System Based Web Site Projects ............................................................................. 23Local IIS Based Web Site Projects ................................................................................. 26Remote IIS Based Web Site Projects .............................................................................. 33

Setting up Server ........................................................................................................................... 35Installation ............................................................................................................................. 35Management console ............................................................................................................. 36Repository management ......................................................................................................... 37Access permissions management ........................................................................................... 38

FAQ .............................................................................................................................................. 41

Page 4: VisualSVN -Subversion for Visual Studio

4 VisualSVN Team

Page 5: VisualSVN -Subversion for Visual Studio

VisualSVN Team 5

IntroductionVisualSVN is a transparent integration of Subversion version control system to the Visual Studiodevelopment environment. VisualSVN allows you to take full control on any changes in the project that aremade by you or your colleagues. With VisualSVN you can easily see the full history of modifications andrestore previous versions of your project. So, you can treat it as a “smart time machine”.

VisualSVN is built on the base of open source version control system that is a de-facto standard storagesystem for software projects. There are a lot of tools and services available for Subversion such as codereview systems and hosting providers. With VisualSVN you can use these tools and services without anylimitations.

What is Subversion?Subversion is a centralized multiuser version control system. Project files and full history of modificationsare stored in a repository. Repository can be located both on a server, and on a local computer.

Each developer has his own copy of the project on the local computer, which is called working copy. You canfreely do any changes in your working copy, such as modifications of files, addition of new files, renaming offiles and folders and so on. And you even don't need permanent connection to the repository. For example,you can work on your laptop on a plane. When a logical bundle of modifications is ready, you can uploadit to the repository as a single atomic commit. Subversion automatically prevents occasional overwrite ofmodifications, that are made by another developer. Moreover, in most cases Subversion automatically doesmodification merging.

What is VisualSVN?Subversion is a perfect version control system. VisualSVN makes Subversion easy for Visual Studiodevelopers. Integrating Subversion to Visual Studio, VisualSVN improves yours productivity and reducesthe probability of routine mistakes.

VisualSVN is conceptually based on the principle of “transparent Subversion”. VisualSVN automaticallyreflects to Subversion all actions from Visual Studio that happens in the daily development cycles. Forexample, VisualSVN automatically marks all newly added files and folders as added. This transparentbehaviour allows you to concentrate on development, when VisualSVN cares about versioning.

Page 6: VisualSVN -Subversion for Visual Studio

Intuitive status

6 VisualSVN Team

Moreover, VisualSVN allows you to manage files in the Solution Explorer in a transparent fashion.For example, you can drag-and-drop files between projects in the Solution Explorer and VisualSVNtransparently reflects this operation to Subversion, with full history preservation. VisualSVN supportscomplete list of file management operations including addition, deletion, copying, renaming anddrag-and-drop. Transparent file management allows you to refactor without pain.

Intuitive status

VisualSVN displays traffic lights status for almost all items in the Solution Explorer. There are only threestatuses:

• green - there are no changes,

• yellow - there are some changes,

• red - there are conflicts or errors.

For each compound item such as folder or project VisualSVN displays cumulative status. For example,there are some changes within a project's folder if status of the corresponding item in the Solutions Exploreris yellow. For the topmost solution item in the Solution Explorer VisualSVN displays cumulative status ofthe whole working copy. For convenience, VisualSVN repeats cumulative status of the whole working copyin the right corner of Visual Studio's status bar.

Unlimited Subversion

Naturally, that except for such unique capabilities as transparent file management and intuitive statusdisplay VisualSVN provides convenient access to all Subversion's commands. For Subversion's commandsVisualSVN uses mature and stable graphical user interface of TortoiseSVN that is a de-facto standardSubversion client on the Windows platform. Thanks to this fact, you get unified access to Subversion bothin the Visual Studio, and in the Windows Explorer.

Page 7: VisualSVN -Subversion for Visual Studio

Unlimited Subversion

VisualSVN Team 7

VisualSVN is a professional Subversion integration to the Visual Studio development environment.Functionality of VisualSVN completely covers all needs of software development process such as initialadding of a project under Subversion, refactorings, branching, merging and so on.

Page 8: VisualSVN -Subversion for Visual Studio

8 VisualSVN Team

Page 9: VisualSVN -Subversion for Visual Studio

VisualSVN Team 9

Getting StartedVersion control with VisualSVN is friendly and straightforward. So you don't need to have prior Subversionexperience.

To get started with VisualSVN you need to have following software installed:

• Visual Studio 2003 or Visual Studio 2005 (all editions are supported),

• TortoiseSVN version 1.4.3 or higher,

• VisualSVN version 1.2.x.

Add Solution to SubversionFirst of all you need to place your solution under Subversion control. There are only two main steps to doit: execute “Add Solution to Subversion” command and commit your solution to the repository.

Executing “Add Solution to Subversion” command

Open or create new solution in Visual Studio. Then choose VisualSVN ⇒ Add Solution to Subversion menucommand and the corresponding dialog will be opened.

Here you should choose the place where your code will be stored. VisualSVN can add your code to acompletely new or an already existing repository. When VisualSVN makes new repository it creates thedefault repository structure with branches, tags and trunk folders. Initially all your code will be stored inthe trunk folder.

Please note that when adding your code to an existing repository you can choose any kind of remote ones.For example, you can easily add your solution to a hosted repository provided by services like Google Code[http://code.google.com/]. Just copy a repository URL to the corresponding field in the dialog.

After this operation all appropriate source files and folders in your solution will be marked as added toSubversion. Added files will be indicated by yellow icons in Solution Explorer. But all changes are still local

Page 10: VisualSVN -Subversion for Visual Studio

Commit Solution to Subversion

10 VisualSVN Team

and not sent to the target repository yet. So you can review the results of adding your solution to Subversionbefore the operation will be finished.

Commit Solution to Subversion

Then select VisualSVN ⇒ Commit menu item, enter comment and click OK. First versions of your sourcefiles will be sent to the target Subversion repository.

After commit you should see green icons in Solutions Explorer indicating that your code is controlled bySubversion and you have no local changes. You are ready to work!

Page 11: VisualSVN -Subversion for Visual Studio

Commit Solution to Subversion

VisualSVN Team 11

Page 12: VisualSVN -Subversion for Visual Studio

12 VisualSVN Team

Page 13: VisualSVN -Subversion for Visual Studio

VisualSVN Team 13

Understanding VisualSVNWhy Visual Studio integration?There is a powerful cross-platform command line interface to all Subversion commands. It's very suitable fortasks such as writing build scripts. Moreover, there is a mature and stable graphical user interface for mostof Subversion operations provided by TortoiseSVN. TortoiseSVN provides a very usable context dependentaccess to Subversion directly from the Windows Explorer.

However, almost all software developers spent most of the time in the integrated development environmentssuch as Visual Studio. In that case you're forced to work in two loosely coupled contexts: Visual Studio andWindows Explorer, for example. Except for frequent context switch that causes dispersion of your focus,you can be faced with the following problems:

• Daily-cycles routine errors

For example, it often happens that developer adds a new file into the project but forgets to mark this fileas an “added file” in the working copy. During the commit this new file will not be sent into the repositorythat almost always causes failed builds.

• Complicated file management

With modern software development cycles you're often need to change the files layout. For example,move a file from one project to another. To do it without loss of the history you need to perform severalroutine operations both in the Visual Studio and in the Windows Explorer. Except for significant lossesof time, you also can fail with annoying errors.

• Dirty commits

It's easy to forget to check the status of the working copy before the starting the new task. It often causesdirty commits, when a single physical commit contains changes from several logical tasks.

VisualSVN provides a transparent and comfortable access to Subversion directly from the Visual Studio.So, you'll get all the advantages of Subversion without facing with mentioned problems.

Design principles of the VisualSVNThe main goal of the VisualSVN is to integrate Subversion into the Visual Studio transparently. AllSubversion functionality should be integrated smoothly but without significant limitations.

Main design principles of the VisualSVN are following:

• Transparent source control

VisualSVN automatically and transparently reflects to Subversion all operations from the Visual Studiothat occurs during daily software development cycles.

• Genuine Subversion

VisualSVN doesn't introduce new version control system, but makes the standard Subversion easy andaccessible for Visual Studio developers.

• Intuitive status display

Page 14: VisualSVN -Subversion for Visual Studio

Design principles of the VisualSVN

14 VisualSVN Team

VisualSVN displays status of all versioned items in the way that allows developers to momentarydetermine the necessity of performing Subversion operations.

Page 15: VisualSVN -Subversion for Visual Studio

VisualSVN Team 15

Basic Work CycleVisualSVN has numerous features, but on a day-to-day basis you will use only a few of them. In this sectionwe'll describe the most common things that you might find yourself doing with VisualSVN in the course ofa day's work.

The typical work cycle looks like this:

• Update your working copy

• Make changes

• Examine your changes

• Possibly undo some changes

• Merge others' changes

• Commit your changes

Update your working copyWhen working on a project with a team, you'll want to update your working copy to receive any changes

made since your last update by other developers on the project. Use VisualSVN ⇒ Update menu item tobring your working copy into sync with the latest revision in the repository.

During updating you'll see TortoiseSVN's Update window that will show you what files of your solution areupdated.

Make changesNow you can get to work and make changes in your working copy. It's usually most convenient to decideon a discrete change (or set of changes) to make, such as writing a new feature, fixing a bug, etc.

Page 16: VisualSVN -Subversion for Visual Studio

Examine Your Changes

16 VisualSVN Team

You don't need to tell VisualSVN that you intend to make a change. Just make your changes using texteditor or Solution Explorer and VisualSVN automatically detects which changes have been done.

Please note that all your changes belong only to your own working copy until you commit them to therepository.

Examine Your ChangesOnce you've finished making changes, you need to commit them to the repository, but before you do so,it's usually a good idea to take a look at exactly what you've changed. By examining your changes beforeyou commit, you can make a more accurate log message. You may also discover that you've inadvertentlychanged a file, and this gives you a chance to revert those changes before committing. Additionally, this isa good opportunity to review and scrutinize changes before publishing them.

You can see an overview of the changes you've made by using TortoiseSVN's Show Changes window.

Please choose VisualSVN ⇒ Show Changes command in the main menu.

Please note that you can examine your changes without any network access. This makes it easy to manageyour changes-in-progress when you are somewhere without a network connection, such as traveling onan airplane.

Possibly undo some changesSuppose while examining your changes you determine that all the changes you made to a particular file aremistakes. Maybe you shouldn't have changed the file at all, or perhaps it would be easier to make differentchanges starting from scratch.

This is a perfect opportunity to use VisualSVN ⇒ Revert main menu command. You'll see TortoiseSVN'sRevert window where you can examine and undo some of your changes.

Page 17: VisualSVN -Subversion for Visual Studio

Merge others' changes

VisualSVN Team 17

Subversion reverts the file to its pre-modified state by overwriting it with the cached “pristine” copy fromthe .svn area. But also note that you can undo any file system tree modifications. For example, you mightdecide that you don't want to rename some file.

Merge others' changesIt's often happens that while you've been working on your changes somebody else already finished andcommitted their own changes into the repository. So it's a good idea to merge these changes into your

working copy before commit. Just choose VisualSVN ⇒ Update main menu command and all others'changes will be automatically incorporated into your working copy.

Let's suppose that due to a miscommunication, you and your collaborator both edited the same file at thesame time. Fortunately it's not a problem in most cases and simultaneous changes will be automaticallymerged by Subversion. However, sometimes Subversion can't automatically merge changes within a fileand this file is marked as “conflicted”. You'll get a graceful notification about conflicted files in TortoiseSVN'sUpdate window.

Page 18: VisualSVN -Subversion for Visual Studio

Commit your changes

18 VisualSVN Team

For further details about resolving conflicts please consult Resolve Conflicts (Merging Others'Changes) [http://svnbook.red-bean.com/en/1.2/svn.tour.cycle.html#svn.tour.cycle.resolve] chapter in theVersion Control with Subversion book.

Commit your changesFinally! Your edits are finished, you've merged all changes from the server, and you're ready to commityour changes to the repository.

Please choose VisualSVN ⇒ Commit main menu command to send all of your changes to the repository.When you commit a change, you need to supply a “log message”, describing your change. Your log messagewill be attached to the new revision you create.

Page 19: VisualSVN -Subversion for Visual Studio

Commit your changes

VisualSVN Team 19

The repository doesn't know or care if your changes make any sense as a whole; it only checks to makesure that nobody else has changed any of the same files that you did when you weren't looking. If somebodyhas done that, the entire commit will fail with a message informing you that one or more of your files areout-of-date:

Page 20: VisualSVN -Subversion for Visual Studio

Commit your changes

20 VisualSVN Team

At this point, you need to update your working copy, deal with any merges or conflicts that result, andattempt your commit again.

That covers the basic work cycle for using VisualSVN. There are many other features in VisualSVN thatyou can use to manage your repository and working copy, but most of your day-to-day use of VisualSVNwill involve only the commands that we've discussed so far in this chapter. We will, however, cover a fewmore commands that you'll use just fairly often.

Page 21: VisualSVN -Subversion for Visual Studio

VisualSVN Team 21

Examining HistoryYour Subversion repository is like a time machine. It keeps a record of every change ever committed, andallows you to explore this history by examining previous versions of files and directories as well as themetadata that accompanies them. With VisualSVN, you can check out the repository (or restore an existingworking copy) exactly as it was at any date or revision number in the past.

However, sometimes you just want to peer into the past instead of going into the past. You can choose

VisualSVN ⇒ Show Log main menu command to view the history of all changes ever committed in yourrepository.

Launching Show Log command from the main menu you'll see the whole history of your working copy root.You also can view log for a particular file or folder launching Show Log command from the context popupmenu in Solution Explorer.

Page 22: VisualSVN -Subversion for Visual Studio

22 VisualSVN Team

Page 23: VisualSVN -Subversion for Visual Studio

VisualSVN Team 23

Web Development with VisualSVNWeb development with Visual Studio often requires sophisticated configuration management. However,VisualSVN supports the most of possible configurations and is widely used by web developers.

There are following major options to run web development with Visual Studio:

• using Web Application projects;

• using file system based Web Site projects;

• using local IIS based Web Site projects;

• using remote IIS based Web Site projects;

VisualSVN completely supports web development with Web Application projects and partially supports webdevelopment with Web Site projects. Please read the rest of the chapter carefully if you are using WebSite projects.

You can also consider to migrate your Web Site projects to Web Application projects. For further detailsplease consider following guideline [http://webproject.scottgu.com/CSharp/Migration2/Migration2.aspx].

Web Development with Web Site ProjectsVisualSVN requires all projects to be stored in a single file system subtree. This restriction can make initialconfiguration a little bit difficult if you are using Web Site projects.

File System Based Web Site ProjectsThe content of file system based Web Site projects is simply located on your hard drive. Unfortunately, bydefault Visual Studio arranges Web Site projects separately from other solution items. But you can easilyreconfigure you solution layout to make VisualSVN able to control your Web Site projects.

When you create new Web Site project Visual Studio arranges your solution files as shown on the picturebelow.

Page 24: VisualSVN -Subversion for Visual Studio

File System BasedWeb Site Projects

24 VisualSVN Team

Please note that Web Site project and other solution files are located in separate file system subtrees. Tomake VisualSVN able to control your solution you should create your Web Site project in a different manner.There are following simple steps to do that.

Create Blank Solution project as shown on the picture below.

Then choose File ⇒ Add ⇒ New Web Site main menu command and specify location for it under the sameroot folder with your solution file.

Page 25: VisualSVN -Subversion for Visual Studio

File System BasedWeb Site Projects

VisualSVN Team 25

Now your Web Site project and solution file are located in the same file system subtree as shown on thepicture below.

Now you can choose VisualSVN ⇒ Add Solution to Subversion main menu command to put yoursolution under Subversion control and commit first version of your source files to a repository using

VisualSVN ⇒ Commit main menu command. Then you should see green traffic lights status icons inSolution Explorer as shown on the picture below.

Page 26: VisualSVN -Subversion for Visual Studio

Local IIS Based Web Site Projects

26 VisualSVN Team

You can easily change layout of your pre-existing Web Site project doing following steps:

• remove Web Site project from your solution (it just removes a reference to Web Site project from thesolution file and the content of Web Site project will be preserved on your hard drive);

• move your Web Site project folder to the same file system subtree with your solution file using WindowsExplorer;

• add Web Site project to your solution again from its new location using File ⇒ Add ⇒ Existing Web Sitemain menu command.

Local IIS Based Web Site Projects

The content of local IIS based Web Site projects is located in a virtual directory at your local IIS web server.This virtual directory is configured automatically by Visual Studio when you create new Web Site project.

Despite the fact that your project is stored at your local web server Visual Studio accesses content of theproject using plain UNC path. By default the mentioned virtual directory points to a physical folder locatedwithin C:\Inetpub\wwwroot folder. The default layout of local IIS based Web Site project is shown onthe picture below.

Page 27: VisualSVN -Subversion for Visual Studio

Local IIS Based Web Site Projects

VisualSVN Team 27

In order to allow VisualSVN to control your local IIS based Web Site project you should change the virtualdirectory mapping. There are following steps to do that.

Create Blank Solution project as done in the previous section. Then choose File ⇒ Add ⇒ New Web Sitemain menu command to create new Web Site project and specify location for it at the local IIS web serveras shown on the picture below.

Page 28: VisualSVN -Subversion for Visual Studio

Local IIS Based Web Site Projects

28 VisualSVN Team

Then close solution in Visual Studio and go to Windows Explorer. In order to change mapping of theautomatically created virtual directory you need to copy content of the web site to more appropriate location.But you need to care about NTFS permission settings.

Choose Properties context menu command for the old physical folder within C:\Inetpub\wwwrootfolder.

Open Security tab and press Advanced button. Then uncheck "Inherit from parent..." checkbox and pressCopy button in the appearing dialog to copy the permissions entries that were previously applied from theparent of this folder. Then press OK to apply your changes.

Page 29: VisualSVN -Subversion for Visual Studio

Local IIS Based Web Site Projects

VisualSVN Team 29

To copy the content of the Web Site project to your solution tree please execute the following command(without line breaks):

xcopy C:\Inetpub\wwwroot\MyWebSite "<path-to-your-solution>\MyWebSite\" /E /K /O /X

This command will copy the entire content of your Web Site project with all NTFS permissions preserved.

Then open IIS console and delete old virtual directory.

Page 30: VisualSVN -Subversion for Visual Studio

Local IIS Based Web Site Projects

30 VisualSVN Team

Then create new virtual directory and map it to a new physical location of your Web Site project.

Then choose Properties context menu command in order to make sure that newly created virtual directoryhas appropriate ASP.NET settings.

Page 31: VisualSVN -Subversion for Visual Studio

Local IIS Based Web Site Projects

VisualSVN Team 31

Then choose Directory Security tab and press the topmost Edit button to modify anonymous accessand authentication settings. Please check Integrated Windows authentication checkbox in order to allowdebugging from Visual Studio. Please note that this is an optional action and it can harm production webserver security.

Page 32: VisualSVN -Subversion for Visual Studio

Local IIS Based Web Site Projects

32 VisualSVN Team

Then go back to Visual Studio and open your solution again. Your Web Site project will be automatically

opened from its new location. Now you can choose VisualSVN ⇒ Add Solution to Subversion main menucommand to put your solution under Subversion control and commit first version of your source files to a

repository using VisualSVN ⇒ Commit main menu command. Then you should see green traffic lights lightsstatus icons in Solution Explorer as shown at the picture below.

Page 33: VisualSVN -Subversion for Visual Studio

Remote IIS BasedWeb Site Projects

VisualSVN Team 33

Please note that you can easily change layout of your pre-existing local IIS based Web Site project. Justskip steps related to new solution and Web Site project creation.

Remote IIS Based Web Site ProjectsThe content of remote IIS based Web Site project is located in a virtual directory at a remote IIS web server.Remote IIS based Web Site projects are almost unsupported by VisualSVN.

The only possible way to control remote IIS based Web Site projects with VisualSVN is to map a remotevirtual directory to a physical folder on a local machine. But this solution seems to be ridiculous and requiresmore sophisticated NTFS permissions management.

Page 34: VisualSVN -Subversion for Visual Studio

34 VisualSVN Team

Page 35: VisualSVN -Subversion for Visual Studio

VisualSVN Team 35

Setting up ServerTypical Subversion setup for team work involves a single server machine being accessed from clients oncomputers all over the office or, perhaps, all over the world. There are many ways to configure Subversionserver. This section will consider the easiest but powerful way based on VisualSVN Server. VisualSVNServer is a package that contains everything you need to install, configure and manage Subversion serverfor your team on Windows platform. It includes Subversion, Apache and a management console. You caneasily download VisualSVN Server from its official page [http://www.visualsvn.com/server/].

InstallationVisualSVN Server is distributed as all-in-one standard Windows Installer package. The installation processis quite easy and intuitive. There is only one configuration screen during the setup process (see thescreenshot below).

You will be asked to choose the installation path for VisualSVN Server. It's acceptable to leave the defaultvalue.

Then you should choose the path where all your Subversion repositories will be stored. It's also acceptableto leave the default value. This folder will be created if you install VisualSVN for the first time. If you alreadyhave some repositories inside that folder they will be automatically connected to the VisualSVN Server.VisualSVN can host any number of independent Subversion repositories.

You also should choose server name and server port. In most cases it's also acceptable to leave defaultvalues.

At the end of installation process you will be asked to run VisualSVN Server management console as shownon the screenshot below.

Page 36: VisualSVN -Subversion for Visual Studio

Management console

36 VisualSVN Team

Management consoleVisualSVN Server provides a simple and intuitive management console implemented as standard MMC

snap-in. You can access it through Start ⇒ All Programs menu or through standard Computer Managementconsole.

Page 37: VisualSVN -Subversion for Visual Studio

Repository management

VisualSVN Team 37

With management console you easily create new repositories and browse existing ones. It also allows youto manage access permissions for the repositories.

Repository managementRepository management commands are accessible through context menu for VisualSVNServer/Repositories node (see the picture below).

Page 38: VisualSVN -Subversion for Visual Studio

Access permissions management

38 VisualSVN Team

While creation new repository VisualSVN Server can automatically create default repository structure (i.e.folders trunk, branches and tags).

After creating repository you need to setup permissions for your repository to access it from web-browserand various Subversion clients.

Access permissions managementFirst of all, you need to create users accounts. Please choose Create User context menu command.

Page 39: VisualSVN -Subversion for Visual Studio

Access permissions management

VisualSVN Team 39

You will be asked to enter user name and password for the user that will be created. Please note that username and password are case sensitive.

VisualSVN Server automatically setups read/write access to all repositories for every authenticated user.For example, you will be able to browse your repositories in the standard web browser. Please chooseBrowse context menu command and the standard web browser will be opened at the appropriate URL inyour VisualSVN Server. You should enter user name and password of one of created users to browse thecontent of your repository in the web browser.

There is a simple and intuitive model for user rights management in the VisualSVN Server. Please chooseSecurity context menu command for any path in your repository and the user rights management dialogwill be opened.

Page 40: VisualSVN -Subversion for Visual Studio

Access permissions management

40 VisualSVN Team

In general, user rights management in VisualSVN Server conforms to standard user rights managementmodel on the Windows platform. But there are some differences that will be described below.

There are only three access levels:

• No Access - there is no access at all;

• Read Only - there is a read only access;

• Read / Write - there is a full access.

Access permission is assigned to a user for a path in the repository. That means that the user has thespecified access level to the specified path. Permissions are inherited recursively from parents to childrens.That means that a user will have read access to all children paths of /svn/MyProject/trunk if suchlevel of access is granted for /svn/MyProject/trunk. But it's possible to specify a different access levelfor subpaths. The general rule is that permission for the most specific path always overrides permissionsfor less specific paths. VisualSVN Server marks all paths with specific permissions by red stars. So you caneasily review your permissions settings.

Rights assigned for the topmost Repositories node in the management console are inherited by allrepositories.

There is a special user Everyone that allows you to setup access rigths for all authenticated users(anonymous access isn't supported by VisualSVN Server).

Page 41: VisualSVN -Subversion for Visual Studio

VisualSVN Team 41

FAQThis page covers the most frequently asked questions related to VisualSVN. If you have a question that isnot answered below, please contact us [http://www.visualsvn.com/contacts.html].

1. VisualSVN

Visual Studio 2008 crashes with VisualSVN installed. What's the problem?

Please make sure that you have the latest version of VisualSVN installed. Please don't hesitate tocontact us if Visual Studio crashes with the VisualSVN version 1.3.1 or higher.

Does VisualSVN work with nightly builds of TortoiseSVN 1.5 (i.e. TortoiseSVN 1.4.99)?

Nightly builds of TortoiseSVN 1.5 include Subversion of not-yet-released version 1.5 and are notsupported by VisualSVN. Data formats changes are still possible in the current development branchof Subversion 1.5. So it's rather dangerous to use nightly builds of TortoiseSVN in production.

We are going to provide a beta version of VisualSVN with support for TortoiseSVN 1.5 nightly builds assoon as Subversion 1.5 will become more stable. For now please use stable TortoiseSVN build (1.4.5).

Does VisualSVN work as a generic MSSCCI/SCC provider?

No, it doesn't. It's because of following:

• MSSCCI is dedicated to Visual SourceSafe and not very situated for Subversion;

• MSSCCI is dedicated for Checkout-Edit-Checkin approach, but Subversion is built fromEdit-Merge-Commit;

• MSSCCI doesn't provide atomic transactions;

• MSSCCI provider can't show status for folders;

• only one MSSCCI provider is available at time. There are a lot of use cases, where Subversion andVisual SourceSafe controlled projects are used together in one solution.

What versions of Visual Studio is supported by VisualSVN?

VisualSVN officially supports Visual Studio 2003, Visual Studio 2005 and Visual Studio 2008.

Does VisualSVN work with Visual Studio Express Editions?

No, it doesn't. It's because Express editions of Visual Studio doesn't support plugins. VisualSVN canbe used with any other edition of Visual Studio 2003, 2005 & 2008.

Is it possible to customize VisualSVN's menu items location?

Yes, it's possible in Visual Studio 2005. There is a standard menu customization feature in VisualStudio 2005 and you can easily use it to customize VisualSVN's menu items location.

• Please make sure that you've opened solution that is under Subversion;

• Choose Tools ⇒ Customize main menu command and check Context Menu item on the Toolbarspane. You will notice that several new items with context menu titles are appeared on the maintoolbar.

Page 42: VisualSVN -Subversion for Visual Studio

42 VisualSVN Team

• Then you can choose and customize menu for different contexts. For example, you can choose

Project and Solution Context Menus ⇒ Item toolbar menu command to customize menu for the itemcurrently selected in Solution Explorer.

• Note that you can easily drag and drop commands within context menu. Moreover, you can dragand drop additional menu commands from the Commands pane.

• Note that you can customize menu for items with different traffic lights status. For example, you cancustomize menu for yellow file by selecting yellow file item in Solution Explorer and then choosing

Tools ⇒ Customize main menu command.

Is it possible to temporarily disable VisualSVN?

No, it's not possible in the current version of VisualSVN. However, there is a workaround that allowsyou to temporarily disable/enable VisualSVN. To disable VisualSVN please download and execute thisregistry file [../files/DisableVSVN.reg]. To enable VisualSVN back please execute following commandline: "devenv /ResetSkipPkgs"

Does VisualSVN support SVN+SSH repositories?

Yes, it does. But actually there are some misconfiguration problems between VisualSVN andTortoiseSVN. To fix that problems you can explicitly provide SSH tunnel settings in Subversionconfiguration file. Please add following string to section [tunnels] in Subversion configuration file atC:\Documents and Settings\<user-name>\Application Data\Subversion\ config :

[tunnels] ssh = "C:/Program Files/TortoiseSVN/bin/TortoisePlink.exe"

Visual Studio crashes with VisualSVN installed. What's the problem?

The problem could be caused by incorrectly registered actxprxy.dll. It happens because of theerratic whole system misconfiguration not caused by VisualSVN. In that case the problem could befixed by re-registering actxprxy.dll. Please choose Run command in the Windows Start menu, enter"regsvr32 actxprxy.dll" command line and press Enter. You should be notified that actxprxy.dll wassuccessfully registered. Please don't hesitate to contact us if this will not help.

I have a solution with projects from several working copies. Why VisualSVN shows status foronly a few of my projects?

VisualSVN doesn't support multiple working copies within a single solution by design. Otherwisesome basic concepts of Subversion such as atomic commits will be violated. However, there isa workaround based on the svn:externals property. The svn:externals property is a kind of linkto the another Subversion repository. Using this property you can incorporate code from severalrepositories within single working copy. For further details please consult Subversion documentation[http://svnbook.red-bean.com/en/1.2/svn.advanced.externals.html].

When executing VisualSVN's solution-wide commands, the entire working copy (includingfolders that aren't part of the solution) is processed that is a very slow operation for me. Isthere a way to optimize this behavior?

VisualSVN performs all solution-wide operations from a working copy root. Working copy root isautomatically determined by VisualSVN as the topmost folder in your working copy. You can easily

Page 43: VisualSVN -Subversion for Visual Studio

VisualSVN Team 43

adjust your working copy root settings choosing VisualSVN ⇒ Set Working Copy Root main menucommand.

I do not see traffic lights status icons for my project in Solution Explorer. What should I do?

Please make sure that your project is under Subversion control. You can easily place your project

under Subversion choosing VisualSVN ⇒ Add Solution to Subversion main menu command. In other

cases please check your working copy root settings choosing VisualSVN ⇒ Set Working Copy Rootmain menu command.

VisualSVN automatically adds files that I don't want to be added under Subversion. Is therea way to prevent this?

There are svn:ignore settings for solution, projects and any other folder in working

copy. You can choose VisualSVN ⇒ Properties pop-up menu command for an itemin Solution Explorer and setup what files should be ignored under that item. Filesthat satisfy patterns listed in svn:ignore property will not be automatically added toSubversion. For example, you can enter something like following: svn:ignore = "binobj *.user *.build-res" . For further details please consider Subversion documentation[http://svnbook.red-bean.com/en/1.2/svn.advanced.props.html#svn.advanced.props.special.ignore].

Is it possible to download an older version of VisualSVN?

You can download any ever released version of VisualSVN from our Change Log [../changelog.html]page.

2. VisualSVN Server

Can I use VisualSVN Server management console with an already installed Subversion serverinstance?

Not, you can't. The management console isn't intended to manage pre-existing Subversion servers.But you can copy your pre-existing repositories to a C:\Repositories folder and VisualSVN Serverwill automatically connect to them.

What is the cost of VisualSVN Server?

VisualSVN Server is a freeware and can be used for general commercial purposes without any fees.For further details please consider VisualSVN Server End User License Agreement.

Will VisualSVN Server remain free in the future?

We're going to keep VisualSVN Server free in the current set of functionality at least.

Does VisualSVN Server support Windows Authentication (SSPI, LDAP)?

Windows Authentication will be supported in the future releases of VisualSVN Server.

Is VisualSVN Server compatible with standard Subversion clients?

VisualSVN Server is based on pure Subversion and can be used with any standard Subversion clients.

Why I can't connect to VisualSVN Server using standard clients (command line Subversion,TortoiseSVN etc)?

Page 44: VisualSVN -Subversion for Visual Studio

44 VisualSVN Team

In most cases that problem occurs because of network settings misconfiguration on a client side.Please check the following:

• Is the server is accessible from the client machine using ping command?;

• What are proxy settings in your client? The general problem is that VisualSVN Server can be locatedin your intranet and your proxy server doesn't allow you to access intranet sites.

• What URL do you try to connect? You can use Copy URL context menu command in VisualSVNServer management console to get correct URL of your repositories.

Please don't hesitate to contact us if the above will not help.

Does VisualSVN Server support svn:// protocol?

Not, it doesn't. VisualSVN Server provides Apache based Subversion server and is accessible overhttp:// or https:// protocols only.

Does VisualSVN Server support secure connections?

Yes, it does. VisualSVN Server supports connection over or https:// protocol. You should choosehttps:// protocol support during the installation process of VisualSVN Server.

Is it possible to install VisualSVN Server on Windows 2000 family?

No, it isn't possible. VisualSVN Server is not supported on Windows 2000. Please install it on XP,Windows 2003 or Vista.

Is it possible to integrate VisualSVN Server with an existing Apache instance?

No, it isn't possible. However, you can use Apache Reverse Proxy as a proxy for VisualSVN Server.For further details please consider http://silmor.de/49.

Is it possible to change the repository path after installation?

No, it isn't possible in the current version of VisualSVN Server. Please reinstall VisualSVN Server inorder to change any settings.

What is the recommended way to backup VisualSVN Server?

You can backup your repositories using svnadmin hotcopy Subversioncommand. For further details please consider Subversion documentation[http://svnbook.red-bean.com/nightly/en/svn.reposadmin.maint.html#svn.reposadmin.maint.backup].

Please note that any other VisualSVN Server related data such as user rights settings are stored righthere in your repositories folder (C:\Repositories by default).

Does VisualSVN Server provide standard Subversion binaries such as svnadmin.exe?

Standard command line binaries by default are installed in C:\Program Files\VisualSVNServer\bin folder. But they're not registered as default Subversion binaries from compatibility

reasons. You can access these binaries by choosing All task ⇒ Start command prompt context menucommand in the VisualSVN Server management console.

Is there a 64-bit version of VisualSVN Server?

There is no strong necessity in 64-bit version of VisualSVN Server. 32-bit version should work correctlyon 64-bit platforms without any limitations.

Page 45: VisualSVN -Subversion for Visual Studio

VisualSVN Team 45

I'm trying to connect to a VisualSVN Server instance and get following error message "Error:PROPFIND of '<url>': 405 Method Not Allowed". What's the problem?

Most likely this error message means that you're using incorrect URL. Please use Copy URL toClipboard context menu command in VisualSVN Server management console to get correct URLof your repository path.

Please note that standard Subversion clients don't allow to browse the list of available Subversionrepositories. You can browse repositories content only.

Page 46: VisualSVN -Subversion for Visual Studio

46 VisualSVN Team