Assuming you are working from Dev Studio with Source Safe properly installed (for Dev
Studio 5.0 and earlier, this means you have to have installed Source Safe after
installing Dev Studio), you will be able to use all the functionality of Source Safe that
you need from with Dev Studio (or in our case, from with Visual C++). Just follow
these steps to set up the Source Controlled Project Crawl on your machine:
- Make sure that the Source Control toolbar is showing (for convenience) by right-clicking
on an empty space on your toolbar and check-marking "Source Control".
- Choose File->Open Workspace, then click the Source Control button in the Open
Workspace dialog box.
- You will be presented with a Visual SourceSafe Login dialog. Enter your username
(your CSEPCLAB login id), a blank password (you'll change this later), and then click the
Browse button.
- I think you get taken to another dialog... click Browse again.
- Now you're in the Find Database dialog. Browse over to
//ifilesrv2/projects/cse490csw/vss Spring99, and select the srcsafe.ini in that folder.
- Choose a name for this database (I named it vss Spring99, which I think is the default)
and then Open this database.
- You'll see the four groups listed; expand Group4, choose CrawlClient (or later, when we
add it, CrawlServer), and then choose a local folder for the copy of the project files
that will be kept on your machine. I suggest putting this "working
directory" on a local drive to speed up compiles. Just make sure that if you do
this, you check in all your work you want to save before you leave the computer you are
working on, or someone could easily erase the working folder (which is where all the
changes you make are made) before you check it in (which just copies your working folder
files up over the VSS files).
- You should then be able to choose the crawl.dsw from the Open Workspace dialog, and open
the project!
From now on, whenever you try to modify ANY file in the project, it should prompt you
to check the file out. If it doesn't, it means that the files weren't initially
marked Read Only correctly. To test, try to type a comment line on one of the
files... if it lets you type away without prompting you, then you need to go to your local
project folder and mark all the files Read Only manually. Then, when you try to type
in a file, it will notice that it is read-only and prompt you to check the file out.
So now you have the project set up correctly!
Before you do anything else, change your SourceSafe password!
Open Visual SourceSafe and choose Tools->Change Password.
Some SourceSafe basics:
- A file is read only unless you "check it out". This records in the
source safe database that you have the file "checked out", and will notify
anyone who tries to check it out that the file is already in use. NEVER check out a
file that is already check out unless you are SURE you know what you are doing.
Otherwise, you might check your file back in and overwrite someone else's hard work.
- Once you've checked out a file, you need to either "check it in", which just
uploads your local file over the SourceSafe copy, or "undo checkout" which
re-downloads the SourceSafe copy over your local copy. This is a good way to revert
to an older version that you know works if you get lost and can't figure out why your
local copy won't work
- Always open a SourceSafe project for the first time using the Source Control button on
the Open Workspace dialog. Otherwise, Dev Studio won't know that you mean for the
project to be under source control, and will let you modify it freely and generally
misbehave :)
- After the first time, use the Recent Workspaces option to open the project, or if it
isn't there, use the Source Control button again... if you just go to the local folder and
open it, Dev Studio may not recognize that the project is supposed to be under Source Safe
control, and will act accordingly.
- ALWAYS write a brief comment with each checkin describing what you did to the file, even
if it's just "checked out and in for practice".
- Finally, I'm writing up a proposal for some coding guidelines. Once these are
finished, please read them and let me know whether you will follow them or whether you'd
like to change them, which is also fine of course!