switching from vss - use shared repository?

Asked by Ken Halprin

We're currently using vss and are looking for something else. We heavily use the vss feature that allows sharing of files between projects and I'm looking for an equivalent method for sharing repositories. Our vss database contains the source for one product which is made up of multiple components - each component is in a subproject. Many of the components share common code so these component's projects share files with each other, say 'sharedfile1' and 'sharedfile2'. The components also have their own specific files which are not shared, say 'file3' and 'file4'.

So my question is whether this type of structure can be setup in Bazaar with repositories or branches instead of file shares. Can I create a structure that allows components to share a sub-set of their files and also have component specific files? Further, if code in the shared sub-set changes, can that be automatically recognized in the components (or, if this structure can be created, are the components tied to a specific branch of the shared sub-set)?

Of course being new to Bazaar, I'll readily listen to other ideas that can accomplish this using Bazaar features I don't know about or haven't considered.

Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
Ryan Stradling
Solved:
Last query:
Last reply:
Revision history for this message
Ryan Stradling (ryanstradling) said :
#1

I am by no means an expert, but I believe what you want cannot be accomplished. There is the nested tree stuff which to my knowledge is not done. This feature is to work like git submodules.

It has been about 10 years since I last used sourcesafe and converted our repos to perforce so I am sure a lot could have changed with sourcesafe in that timeframe :). However, the way you can share files across worked such that if you modify it in one place it affects every location. The submodules would not exactly work the same way even if it was there. Depending on how bazaar handles file links, maybe they are an option?

With all that said when we converted we thought the shared files were a great idea. Over time (and due to the design of perforce) we rethought the way this worked and created libraries for the shared files. The subprojects would link in the libraries. Of course, this made "modify shared files in place with whatever project you are working in" less convenient but it also fixed the "who checked in "X" that just broke all the projects" (which one could argue would not happen if you had good automated tests on all the projects). Basically, our thoughts changed to common code should have its own release cycle and verification processes. If we want to work against latest libs we can always have a CI machine create latest and check those files into the project.

Hope this is helpful (and correct :))

Revision history for this message
Ken Halprin (khalprin) said :
#2

Thanks for the response Ryan.

My thought process has been moving in the same direction...re-thinking the shared files idea and considering having the components use the latest *tested* version of the shared code...not just the most recently checked in. Given this structure, can you (or anyone) point me in the right direction for setting up repositories or shared repositories to accomplish this? How do you reference a 'library' of code, so it is all pulled when a build is needed?

As for sourcesafe, I'd be willing to to bet that not much at all has changed in the last 10 years :).

Revision history for this message
Ryan Stradling (ryanstradling) said :
#3

I should have asked to begin with. What language is this code base? And what do you use to build it currently?

Revision history for this message
Ken Halprin (khalprin) said :
#4

The vast majority of the code is C++. Some of it is C#. We use Visual Studio as the IDE and build tool.

Revision history for this message
Best Ryan Stradling (ryanstradling) said :
#5

Your best bet would be to find the equivalent of http://book.git-scm.com/5_submodules.html in bazaar. From what I can tell inherent support with bazaar does not exist but I did find an externals plug-in that may be close to what you want.

Or you put it all in one tree. When building sharedlibA, copy this file to a versioned directory. Downstream projects if you want to update change it to reference these files.

Revision history for this message
Ken Halprin (khalprin) said :
#6

Thanks Ryan Stradling, that solved my question.