• No results found

VSS_HowTo

N/A
N/A
Protected

Academic year: 2021

Share "VSS_HowTo"

Copied!
16
0
0

Loading.... (view fulltext now)

Full text

(1)

ABOUTTHE AUTHOR ... 2

INTRODUCTION ... 3

WHATIS VISUAL SOURCE SAFE? ... 3

DEVELOPER’S GUIDE ... 3

Check if VSS working fine for a project ... 3

Get Latest Code ... 3

Check-Out a file for Editing ... 4

Check-In an edited file ... 4

Cancel a Check-Out ... 5

View Pending check-ins ... 6

View History/Check the revision details ... 6

TOSETUPANEXISTINGPROJECTIN DEVELOPERMACHINE ... 7

Check Out/Check In Policy ... 10

ADMINISTRATOR’S GUIDE ... 10

INSTALLING VISUAL SOURCE SAFE ... 10

Visual Source Safe Administration ... 12

Connect to an Existing Database ... 13

User Management ... 13

Archive/Restore Projects ... 13

User Access Rights ... 13

TOADDANEWPROJECTTO VSS ... 14

(2)

About this Document

This document explains how to install and how to work with the Visual Source Safe, which is the most used Source Control.

About the Author

Praveen.V.Nair, a Microsoft MVP Blog: http://blog.ninethsense.com/ Email: [email protected]

(3)

If you make use of VSS with your Visual Studio, the chapter Developer’s Guide may be the only one you may need to use. If you feel yourself advanced, then go for Administrator’s Guide also.

What is Visual Source Safe?

Microsoft Visual SourceSafe is the easiest source code management and version control system for development teams using Microsoft Visual Studio.NET. Developers can safely and easily manage source code, Web content, and any other type of file—all from the comfort and convenience of Visual Studio .NET.

Developer’s Guide

Check if VSS working fine for a project

Once you open the solution check the Solution Explorer whether you see (lock) icons with the items. If so, you can make sure VSS is working fine.

Get Latest Code

As you know we use VSS for collaborative editing of same source code between different developers. So it is very important to take latest code before you start development.

(4)

Check-Out a file for Editing

If you want to edit a file, there are two ways you can checkout a file:

1. Right-Click on the file (or project/solution) and click Check Out for Edit…

2. Or, just start editing the file and Visual Studio will automatically check-out for you.

Once you checked-out a file, you can see a (tick) mark instead of lock in the Solution Explorer for that file.

Check-In an edited file

After you finished editing, you can check-in the file back to VSS by right clicking the file (or project/solution) and click on Check In…

(5)

Once you clicked in Check In…, you will see a dialog asking you for confirmation.

IMPORTANT: Here, as a policy, you must type a small description about the change you did. For example, if you were fixing a bug then type the reference number of that bug along with a comment stating what change you did.

Cancel a Check-Out

You can always undo the changes by choosing Undo Checkout… from the Solution Explorer item menu.

(6)

View Pending check-ins

There may be situations you might check out many files in a big project and wanted to know which all files awaiting check-ins. You can use the View Pending checkins option. Once you select this, you can see a docked window with a list of objects which has not checked-in.

View History/Check the revision details

If you wanted to know who edited a file (or project/solution) in past, just select the option View History.

First you will be prompted a dialog like this, but you can simply click Ok if you do not want to filter the results.

(7)

This is the view of the history.

Some useful features in this dialog window are:

• View – The selected version will be opened in a Notepad for reading

• Details – This will show you general details including comments you provided while you checked-in the file

• Diff – You can compare the selected file version with an existing file

To set up an existing project in Developer machine

1. Take Visual SourceSafe Explorer from: Start → Programs → Microsoft Visual SourceSafe → Microsoft Visual SourceSafe

(8)

2. Right click on the project you want to work on and click on ‘Set working folder’. (I used a sample – WindowsApplication1 as example)

Point your working folder to a path on your hard drive/disk.

3. Once you set the working folder, you need to get the latest version. This you can achieve from the right-click same menu -> Get Latest Version

(9)

4. Click the ‘Recursive’ and ‘Build Tree’ checkboxes and click ok.

5. Now you can go directly to your working folder and open the solution (.sln) file

(10)

Check Out/Check In Policy

As per our existing VSS setup, it is not possible for a developer to check-out a file or project which is already checked-out by another developer.

File Restrictions

Executable files (.exe) and configuration files (eg. Web.config) should not be checked in.

Administrator’s Guide

Installing Visual Source Safe

The steps involved in setting up the Visual Source Safe source control are explained below:

Step 1: Install VSS from the setup CD.

Step 2: Create a VSS Database for your project

Every team (or product) will need a separate VSS database. This step is done using the VSS Admin software. When you install VSS software, it will install the Admin software as well as client software on your computer. Choose 'Visual SourceSafe Admin' from the start menu.

(11)

When you launch the admin software, it will automatically connect to a default database called 'Microsoft Visual Studio'. After connecting to this default database using the VSS Admin tool, you will create a new database.

To create a new database, go to the 'Tools' menu and select 'Create Database'. You will be prompted to browse to a folder to create the new database. All you have to do is, select a folder and press 'OK'. This will create a new database.

Even though this process created a new database for you, your VSS Admin tool is still connected to your default database called 'Microsoft Visual Studio'. To connect to your new VSS database, select the 'Users' menu and select 'Open SourceSafe Database'. This will show you a small dialog box with the list of previously

connected databases. Since you have not yet connected to your new database, it will not be listed. So, press the 'Browse' button to search for the new database.

(12)

Step 3: Create users

After you connect to the new database, you will see the list of available users. There are 2 users created by default:

1. Admin 2. Guest

Delete the Guest user. You do not want other people to connect to your secure VSS database.

Also, change the password for admin user. By default, there is no password for this account. To change password, select 'Admin' user in the list and select 'Change Password' option from 'Users' menu.

Now, select 'Add User' from 'Users' menu. This will show a dialog box where you can specify the user name and password.

Visual Source Safe Administration

Click Start → Programs → Microsoft Visual Source Safe → Microsoft Visual Source Safe Administration

(13)

Connect to an Existing Database

You can connect to an existing VSS database using menu File → Open Source Safe Database…

User Management

You can Add, Edit or Delete a user from Users menu. Also you can change the password of an existing user also from this menu.

Archive/Restore Projects

You can archive or restore projects using the menu File → Archive

User Access Rights

Rights in VSS specify which VSS users have access to a specific VSS project. There are four levels of user access rights in VSS: read, check out/check in, add/rename/delete, and destroy. The default level for new users of the database can be specified.

• Read

o General rights, allows you to access (Read) the file.

• Check out/Check In

o To make a writable copy of the file, to be modified (Checkout). o To save the changes into the repository (Checkin)

• Add/Remove/Delete

o To Add /Delete the files of folders in VSS database.

• Destroy

(14)

Source Control’.

• Login to the VSS

(15)

Microsoft Visual Source Safe Explorer

VSS Explorer is a useful tool for exploring the projects outside Visual Studio. You can consider this as an advanced administration tool. You can do almost every features available in Visual Studio as well as few additional also.

Some of the features are:

• Check In/Check Out

• View/Edit

• Get Latest

• Set Working Directory

• Show History

• Show Difference

• Delete/Rename

(16)

References

Related documents

TekSIP Route Server uses built-in Microsoft Access database by default.. If you plan to use a Microsoft SQL Server database, create database and “Routes” table

The Nimble array integrates with Microsoft VSS using Nimble Protection Manager (NPM) to periodically request the database to flush pending database writes to disk.. Then the

After you install the application, you'll finish installation (or upgrade) by using the application's admin tools to connect to the target database.. The tool will create or upgrade

The parameters in the table below are the default settings for the database cleanup jobs, which are automatically enabled when ZENworks Mobile Management is initially installed..

Gói lệnh được thiết kế các kí hiệu toán học đẹp hơn.. Gói lệnh này có thể chạy cùng với gói

The default installation for Database Server will install static client software, pdf995 driver, PigCHAMP Backup and Restore utility, PCLMS, and the database.. If you change any

After WhatsUp Gold is installed using the default database, you can restore your existing database. Note: It is recommended that you only restore the database from a local

If you have changed the default autogrow setting in the model database and used the SQL Server Management Studio gui to create a new database, then it honors those new grow