Check-in thro VS2003 with multiple projects & Dragnet?

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Locked
AGBrown
Posts: 34
Joined: Wed Aug 10, 2005 1:42 pm
Contact:

Check-in thro VS2003 with multiple projects & Dragnet?

Post by AGBrown » Fri Sep 16, 2005 10:06 am

Not really sure if this should go in this forum or the dragnet forum (or the Visual Studio forum!!).

Using:
Visual Studio 2003 .NET on Win XP.
Vault 3.1.0 (3494) on Win Server 2003 and SQL server 2000 sp4
Dragnet 1.0.4.1242 on Win Server 2003 and SQL Server 2000 sp4

I have a VS solution (not source-controlled) with three source controlled projects underneath it, all in the same repository. If I make changes to all 3 of these projects and then check them in at the same time, referencing a Dragnet item under the Advanced menu, then only the files in the first of the projects gets logged under the dragnet item.

The obvious way around this is to check the VS projects in one at a time, but it would be nice to keep all the check-ins under the same check-in transaction if possible - is there a workaround for this? I haven't yet checked to see if the same behaviour occurs by checking them in through the sourcegear client instead.

Regards,

Andy

mskrobul
Posts: 490
Joined: Wed Jan 14, 2004 10:22 am
Location: SourceGear
Contact:

Post by mskrobul » Fri Sep 16, 2005 12:05 pm

If the solution that the projects are in is also source code control Dragnet gets updated correctly with all the files checked in.

If the solution isn't in source control it seems that only the files in the first project get updated in Dragnet.

So, for now, the work around would be to add the solution to source code control. Then when you do a check in, Dragnet *should* get updated properly with all the files that were checked in.

I have logged a bug to investigate this issue.
Mary Jo Skrobul
SourceGear

AGBrown
Posts: 34
Joined: Wed Aug 10, 2005 1:42 pm
Contact:

Post by AGBrown » Fri Sep 16, 2005 1:24 pm

Thanks Mary, I would be keen to see a "fix" for this; adding solution files to Vault causes us all sorts of problems as local machines are configured differently.

Once way round this that we thought of was to try setting up a repository for each user to keep their solutions in - yes we would end up with lots of repositories but at least everyone could keep their own solution files. Bizarrely, adding a solution file to a different repository causes VS all sorts of problems - as quickly as you set it up in a different repository it gets checked back in to the repository where the other projects are kept. Now we are experimenting with having a folder for each users solution in the main repository: I'm not sure how well we'll cope with this though, that's going to end up being a lot of folders, and it messes up our email notifications, labels and diffs on the root of the repository.

All in all, if we could keep our solutions out of source control, I think it would help a lot.

Thanks,

Andy

AGBrown
Posts: 34
Joined: Wed Aug 10, 2005 1:42 pm
Contact:

Post by AGBrown » Fri Sep 16, 2005 1:34 pm

Mary,

As a follow up - storing the solution doesn't seem to have fixed our problem. I'm guessing it may be as the projects are not stored "below" the solution in the Vault folder structure, but as seperate folders on the same level under the root of the repository.

Given that we can't all use the same solution, it looks like we may have to put up with checking in each project individually for the moment, unless I'm getting something wrong with the VS solution configuration in vault?

Andy

mskrobul
Posts: 490
Joined: Wed Jan 14, 2004 10:22 am
Location: SourceGear
Contact:

Post by mskrobul » Fri Sep 16, 2005 3:26 pm

Visual studio tends to be very particular about where files are located in SCC. It wants solutions and project files and files in a certain place and if you deviate from that wierd things can happen if you are working through visual studio. Storing the solution files in a seperate folders from the rest of the files may not work and a different repository will definetly not work.

Please see the following IDE guidelines for more information:

http://support.sourcegear.com/viewtopic.php?t=790

This is what worked for me:

I created a new solution and added 3 projects. Then I added the entire solution to source code control from within visual studio. Then I edited and checked files in multiple projects and Dragnet was updated with all the checkin information for all projects.

As far as I can tell, when the solution is in SCC as stated in the above example, visual studio calls checkin from SCC once for the entire set of changes in all projects so all of the bug information is available for all files in all projects at the time of checkin.

When the solution wasn't added to SCC as described above, visual studio calls checkin from SCC once for EACH project and the visual studio options (which include the bug IDs) aren't available for the additional checkin calls. That is why files in the first project are updated, but files in the other projects are not.

I am not the IDE expert (he at PDC :) ), but I would guess this behavoir is probably related to folder structure. When you add the solution and all the projects to SCC at one time Visual Studio takes care of the placement of folders and files and all the projects folders and the solution folder are under a common "parent" solution folder in SCC. Since your projects are already in SCC, in order to get the correct folder structure you will probably need to unbind the projects (file -> Change SCC -> choose all the projects then unbind), create a solution with all the projects (or use the one you already have with the projects in it) then re-add the entire solution (which will include all the projects) to SCC. This will create the correct folder structure in SCC so the checkins from the solution level *should* to include files in all projects.

You can always use the GUI client instead of the VS to do checkins and all the checkin information will be updated in Dragnet.

-or-

Does everyone always enter a Bug ID for a checkins? If so, another (albeit very annoying) workaround would be to upgrade your clients to 3.1.2, then turn on "require bug ID for checkins" in the Admin tool (the require bug ID during checkins from the IDE was busted in versions prior to 3.1.2).

When you do this you will be prompted for a bug ID once for each project that has modified files so all files will be updated in Dragnet. Of course since each project is a seperate checkin the vault checkins will be listed as seperate comments in Dragnet. Note that this option is universal to the repository and everyone would need to enter a valid bug ID for all checkins of modified files if you have this option turned on.

-or-

You can just checkin each project seperately and provide a bug ID each time :)
Mary Jo Skrobul
SourceGear

AGBrown
Posts: 34
Joined: Wed Aug 10, 2005 1:42 pm
Contact:

Post by AGBrown » Sat Sep 17, 2005 10:33 am

Dear Mary,

Thanks for the detailed reply. We'll try out the various solutions and let you know how we get on. We could well enforce bug-ids for check-ins, that may be a feasible workaround.

Regards,

Andy

Locked