Book a Demo

Author Topic: Version Control with SourceSafe  (Read 3449 times)

Cryolitte

  • Guest
Version Control with SourceSafe
« on: April 06, 2005, 03:41:50 pm »
My goal is to setup EA model packages that are:
* linked with VS.Net projects, and
* under source control in Source Safe

The following are procedures I have used to achieve my needs. However, I feel that these procedures are strange and not intuitive. Please advise if they are correct.

_____________________________________________________________

First, on a new project and a new package, I did a reverse engineering of a VS.Net project using:
Add-in --> Connect External Project --> Visual Studio.

Then, I set the package representing the project under source control:
Package Control --> Configure

The project view structure is:
Logical View
|-New Model (namespace root)
  |-FaxLibrary (linked to VS.Net *and* under source control)
    |-BusSysApp (namespace in C#)

Once this package is under source control, my guess is that any user, using any EA file, could retrieve this package from SourceSafe, correct? (Since everyone's Local Project Path in Version Control Configurations would be different *and* Local Project Path is not affected by Configuration --> Local Paths.)
_____________________________________________________________

To test out getting the package, I created a *new* EA file and setup the empty package to link to VS.Net. The structure is now:
Logical View
|-New Model (namespace root)
  |-FaxLibrary (linked to VS.Net project but empty)

I then do:
FaxLibrary --> Package Control --> Get Package --> whatever's available.
And I get: "An unknown error was returned by the source control provider".

_____________________________________________________________

Then, I tried:
FaxLibrary --> Package Control --> Configure
putting in the same details as when I setup source control. Followed by:
FaxLibrary --> Package Control --> Get Latest

The Project View refreshes, and I now have the source-controlled package, *but* with an extra package:
The project view structure is now:
Logical View
|-New Model (namespace root)
  |-FaxLibrary (linked to VS.Net)
    |-FaxLibrary (package controlled)
          |-BusSysApp (namespace in C#)

_____________________________________________________________

The only way I could get the structure I started with is:
New Model --> Package Control --> Configure
Fill in the details for package FaxLibrary. Then:
New Model--> Package Control --> Get Latest

The project view refreshes and becomes:
Logical View
|-New Model (namespace root and under source control)
  |-FaxLibrary (under source control)
    |-BusSysApp (namespace in C#)

Then, I FaxLibrary to VS.Net:
FaxLibrary --> Add-in --> Connect External Project --> Visual Studio.

To tidy up, I then need to do:
New Model --> Package Control --> Configure --> Untick the checkbox.


Since I need an empty package and place source control upon it before I can retrieve an existing source controlled package:
* Why is the retrieved source controlled package placed as a child package of the empty package?
* What is the procedure for retrieving a source-controlled package from SourceSafe in a team environment, where everyone's local project path is different? Configuration --> Local Paths do not apply to the local project paths.
* How is Package Control --> Get Package designed to work? Do I execute this on an empty parent package, or on an empty package representing where the class entities should sit?

digwizf18

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
  • Windows programming.... errrrr aaaaahhhhhhhhh! &$@*
    • View Profile
Re: Version Control with SourceSafe
« Reply #1 on: April 26, 2005, 11:13:39 am »
Did you ever figure this out on your own?  I'm having the same problem.  I think that setting up package control in Visual Source Safe was extremely unintuitive.  Now I am working on reverse engineering and forward engineering.  
I want to maintain synchronization between my C++ classes and model files where my C++ files are used within Visual Studio Projects.  The source code is maintained in separate directory structures from the model diagrams in VSS.  Also, users can create whatever local directory they wish.  So different users may have different places on their harddrive where the download files and projects fromsource safe.  

I am not finding the help feature within EA to be very useful for setting this up.  If anyone has gone through this before, please post some examples.

Regards,
Shawn

TrtnJohn

  • EA User
  • **
  • Posts: 176
  • Karma: +0/-0
    • View Profile
Re: Version Control with SourceSafe
« Reply #2 on: April 26, 2005, 11:45:09 am »
Here's my one paragraph users guide:

The actual model is not stored in source safe.  Instead XML extracts of each packages are saved.  The model itself is still always saved in the EAP file or database repository.  So, you don't need to get the packages as the model is always up to date.  The only reason to get a package would be to go back to a previous version.  The source control is just a mechanism to provide change control of an individual package.  The EAP model itself is mutli-user so you don't need a source control facility to manage who accesses the file.  Just put the file on a shared drive, add the packages you want to control to source safe.  Then you just open the EAP file, select a package you want and check it out, edit the package details, and check in the package when done.  SourceSafe will save all previous versions of the package as XML extracts in case you ever need to fallback.  Checking out the package will lock it so other users can't change it.  

Cryolitte

  • Guest
Re: Version Control with SourceSafe
« Reply #3 on: April 26, 2005, 02:06:59 pm »
Okay. So an EAP file is multi-user? But this still doesn't appear to help me much. If I put it on a shared drive somewhere, we all open it up and see the same model. Great. But if we want to make modifications and then put the changes into source control, each of us would require different settings to access SourceSafe (username for example). In fact this is exactly what happened. I shared the EAP file, and when opened by other people, the source control configs were broken.

So it seems that the "true" multi-user way of doing it is by setting up a database, have users with their local EAP files connect to the database, and if there are changes they wish to log into source control, their own source control connection configs.

digwizf18

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
  • Windows programming.... errrrr aaaaahhhhhhhhh! &$@*
    • View Profile
Re: Version Control with SourceSafe
« Reply #4 on: April 26, 2005, 02:23:40 pm »
As far as the basic source control goes, it seems to work fine for me.  The way TrtnJohn did it is how I did it.  I put the .eap file on a shared network drive.  The process for configuring source control for each package is horrendously unintuitive.  But once you struggle through it is does work.  You have to select project -> version control -> set version control options to choose the tool you are using and point EA to your directory.  I use MS Visual Source Safe.  So you have to check the SCC option for this.  I wish I could attach a word document to this because I wrote a word document with some pictures on how to do this.

Well you have to struggle through that dialogue and choose the application name, an ID (whatever text you want) and the local project path where you choose to down load files from source safe (C:\MyView\SourceCode...).  You have to press the save button and ONLY then will EA actually open up your Source Control application and ask you to point it to the project directory within the source control tool.  

Now once you set this up, you have to right click on a package in the project view of EA.  You have to select Package control -> configure for each and every package.  Then you have to figure out what to call you .xml files and name the xml file, link the package to the source safe database you just setup, and unless you want every xml file in the same directory in source safe, you'll also have to play some games with your directories and type the full path of the xml file as it should be added to source safe in the config dialogue.  This is also really strange and unintuitive and I had to play around for 2 days trying to figure out how to do what I wanted.

Meanwhile, it all seems to work out.  If more than one person open the model file, somehow the application manages this just fine.  It is able to lock the data within the model from edit unless you check out a package.  The packages are not in source control are editable.  Somehow it seems to manage this okay when we've had more than one person working on the same editable package.  I don't see how it can prevent major problems here for packages that are not source control but I have not seen any problems yet.

I'm afraid that my confusing writeup is the best I can do here.  It's very confusing to figure out and way more confusing to explain with a writeup.  But hopefully that gives you some ideas to go play around with.

Shawn

Cryolitte

  • Guest
Re: Version Control with SourceSafe
« Reply #5 on: April 26, 2005, 04:21:06 pm »
Hi Shawn,

I know those steps to go through. We've shared an EAP file in which some packages are under source control, setup in the same way you described. I set it up, then passed the EAP file to my colleague. When he opened it up from his machine, the source control configs broke. (i.e. red blob instead of an 8 ). My guess is that the local project path (to download the XML files) existed on my machine but not his machine.

So, questions: do all your users *use* the same local project path, and do all your users *have* the same local project path?

AFAIK, Configuration -> Local Paths cannot be used for the "local project path" in source control configs. Please correct me if I'm wrong.

TrtnJohn

  • EA User
  • **
  • Posts: 176
  • Karma: +0/-0
    • View Profile
Re: Version Control with SourceSafe
« Reply #6 on: April 29, 2005, 02:00:42 pm »
Make sure your SourceSafe library is also on a shared drive.  Make sure everyone maps the SourceSafe library shared drive to the same drive designator.  (For example:  Y:\.