1 / 31

Visual SourceSafe

Visual SourceSafe. For more information, see: http://www.microsoft.com/ssafe. Agenda. Introductions Visual SourceSafe Basics Advanced Visual SourceSafe Questions. Agenda. Introductions Visual SourceSafe Basics Advanced Visual SourceSafe Questions. Basic Purposes of Visual SourceSafe.

deva
Download Presentation

Visual SourceSafe

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Visual SourceSafe For more information, see: http://www.microsoft.com/ssafe

  2. Agenda • Introductions • Visual SourceSafe Basics • Advanced Visual SourceSafe • Questions

  3. Agenda • Introductions • Visual SourceSafe Basics • Advanced Visual SourceSafe • Questions

  4. Basic Purposes of Visual SourceSafe • Version control systems in general... • Support team development, by coordinating multiple users through a checkout/checkin protocol • Track versions of files • SourceSafe’s competitive advantage... • Track versions of entire projects • Track modular code: one file that is reused, or shared, by multiple projects

  5. Visual SourceSafe Basics • Key SourceSafe Concepts • Setup: A Two-Step Process • Visual SourceSafe, Editing Tools, and the Working Folder • SourceSafe Commands • Organizing Your Files • The SourceSafe Explorer, Integration into Editing Environment • Version Numbers and Labels

  6. Key SourceSafe Concepts • All your files are stored in a centralized database on the server • Any kind of files can be stored in SourceSafe: code, DLLs, graphics, documents, help files, icons, … • A project is a collection of files in the SourceSafe database, analogous to a folder in Windows

  7. Setup: A Two-Step Process • The SourceSafe Administrator runs SETUP.EXE from the CD and chooses “Server Setup” to create the SourceSafe database. • Each user then goes to the server where the SourceSafe database was installed (not from the CD), and runs NETSETUP.EXE to copy the executables to his local hard drive.

  8. Visual SourceSafe, Editing Tools, and the Working Folder • You store and track your files in SourceSafe projects • You edit and compile your files in the “working folder” which your editing tools see • Your tool does not have to know about SourceSafe, and vice-versa! SourceSafe projects (eg $/A/B) Working Folder (eg C:\WORKING)

  9. The Four Key Commands • Get: Give me a local copy of a file or project in my working folder, read-only, to view or compile • Check Out: Give me a local copy of a file or project, writable, to edit. (*May or may not be exclusive!) • Check In: Copy my edited file back into SourceSafe, available to other users. (Stores old versions with reverse deltas.) • Undo Check Out: Cancel my check out, voiding all the changes I made

  10. Other Important Commands • Create Project: Create a new project • Add Files: Add files to a project • Delete: Delete a file or project • Difference: Show me what changed in this file or project • Share: Copy files from other projects into the current project • History: Show me all the versions of this file or project

  11. Organizing Your Files • Your SourceSafe project structure should mirror your local folder structure (or directory tree) • For instance, if your files are organized into one folder with three subfolders, create one SourceSafe project with three subprojects • Later, you may modify this a bit due to Sharing

  12. The Working Folder • Your working folder is where you keep files locally. Get, Checkout, Check In, Difference, and other commands rely on it. • You set it through the “Set Working Folder” dialog. • The working folder is stored per user, per project, and per machine. • Settings automatically propagate down the project tree

  13. The SourceSafe Explorer

  14. Tips for Using the SourceSafe Explorer • Hold the “Shift” key down while selecting any command, and you will get a “pre-dialog” before the command executes (allowing you to select a date range for History, a format for Diff, etc) • Click on a project and choose a command, and the command will act on the whole project (eg Get a project, view project History, view project Difference)

  15. SourceSafe Integration into Editing Environments • “Integration” means you can execute SourceSafe commands directly inside your editing environment. • Some less commonly used commands still require the SourceSafe Explorer. • This kind of integration is available through Visual C++, Visual Basic, Access, FrontPage, Visual J++, Visual FoxPro, and others. • Macros are available for free on our Web page to integrate with Office 97 and Word/Excel 95.

  16. Example: Visual SourceSafe Integration into Visual C++ This picture shows a cool SourceSafe dialog coming up in the middle of Visual C++.

  17. Version Numbers and Labels • Version numbers count up automatically: 1, 2, 3, etc. • User-defined version numbers are in the form of labels such as “2.00b” or “Beta 2” on a file or a project • When you reach a project milestone or release, don’t create a new project, and don’t label the files. Label the project. • Retrieving an old version of a project recovers the files that were in the project at that time

  18. Agenda • Introductions • Visual SourceSafe Basics • Advanced Visual SourceSafe • Questions

  19. Advanced Visual SourceSafe • Web Features • Sharing • Pinning • Branching/Merging • Customization • The SourceSafe Command Line • Other Advanced Features

  20. SourceSafe Web Features If you are using SourceSafe to manage your Web site… • “Deploy” copies your files to the live Web server (via folder path or FTP) • “Check Hyperlinks” checks the validity of internal links (to your own files) • “Create Site Map” creates an HTML site map you can post on your page

  21. Sharing • Sharing is how you track reusable files • Technically, sharing means that one file is in multiple projects at the same time • All updates are automatically propagated, since there is only one file • There is no “master project”: all sharing projects are peers • Use the “Links” tab (Options dialog) to track Shared files

  22. “$/A and $/B share Fu.cpp” … or… “Fu.cpp is in $/A and $/B” In this picture, the file has 5 versions. If either project checks in the file, both projects will be on version 6 5 4 3 2 1 Sharing $/A $/B Fu.cpp

  23. Pinning • A pin says “Whatever other projects do, I am frozen at version x” • Pinning controls the pace at which updates are received • Pinning is controlled through the History dialog • When a file is pinned, you cannot check a file out: it is frozen

  24. $/A shares the most recent version of Fu.cpp $/B is pinned to version 4 of Fu.cpp 5 4 3 2 1 Pinning $/A $/B Fu.cpp

  25. Branching/Merging • Branching a shared file creates a new file in the SourceSafe database • Updates do not propagate now, and both files can be modified separately • Don’t branch when you just need a pin! • You can see the branch history of the file by using the “Paths” tab in Properties • Branching a project branches all the files • Later, you can merge the changes back

  26. After the file branches, there are two independent FU.C files, one in each project Versions 1-3 are the same: Versions 4-5 are different Branching $/A $/B Fu.cpp Fu.cpp 5 5 4 4 3 3 2 2 1 1

  27. Share/Pin/Branch Scenario • While working on version 4.0 of your project, you need to patch of version 3.0. • So you share version 3.0 of the project. This creates a “patch” project where all files are shared with the main line, but pinned to their versions from 3.0. • You can’t check out these pinned files. So to modify a file on the patch, branch it. • Later, you may merge these bug fixes back into the main line

  28. Customization This picture shows the first tab in the SourceSafe Options dialog. Play with the dialog to see the many ways you can customize SourceSafe!

  29. The Visual SourceSafe Command Line • All SourceSafe functionality fully available from the command line (except some of the Web-specific features) • Great for macros, batch files, and integration: also sometimes faster to use than the GUI • Commands look like “SS Get FU.CPP” (means, “Get this file from the current project into my current folder”)

  30. Other advanced features • “Keyword expansion” puts version control information directly into your source file • “Shadow folders” create a public share that echoes a SourceSafe project • “Project security” sets user rights on a project-by-project basis • “OLE Automation” lets you drive SourceSafe from VC++ or VB

  31. Questions? For more information, see: http://www.microsoft.com/ssafe

More Related