Jump to content

Selector Question


tom.peters

Recommended Posts

Howdy!

I have my application source split across repositories so multiple products can share the foundation classes. In one of my product workspaces, I have the following selector defined:

repository "ProductA"

path "/"

br "/main"

co "/main"

repository "Foundation"

path "/"

br "/main"

co "/main"

Now, my development IDE (PowerBuilder 12) checks in and our of Foundation and ProductA as expected, but when I am in the Plastic client working on this workspace I do not see any of the Foundation items.

Is that normal?

Thanks,

Tom

Link to comment
Share on other sites

Hey Pablo -

That article confused me even more. It seems that in order to have my Foundation shared into my ProductA, Foundation has to be a sub-folder in ProductA. If I do that, I cannot create a workspace for Foundation because it yells at me saying ProductA is already workspace.

I need my Foundation classes available to all of my products. According to that article, Foundation must be a sub-project of my main products, yes? So I have to have this?

C:\ProductA

C:\ProductA\Foundation

C:\ProductB

C:\ProductB\Foundation -- a second copy of Foundation?

I am really sorry about this, but when I follow the article (at least I think I am following it) I get errors from Plastic. I want to do the following:

ProductA in it's own repository

ProductB in it's own repository

Foundation in it's own repository

ProductA workspace also uses Foundation

ProductB workspace also uses Foundation

Foundation workspace

I know I am missing something obvious. Thanks for your time.

Tom

Link to comment
Share on other sites

OK, Pablo, here's where I am.

I created the following folder structure:

C:\ProductLines

C:\ProductLines\Foundation

C:\ProductLines\Foundation\ProductA

I create a workspace named Foundation which is rooted at \Foundation

I create a workspace named ProductA which is rooted at \Foundation\ProductA

In my ProductA workspace, my selector is:

repository "ProCede" mount "/ProCede"

path "/"

br "/main"

co "/main"

repository "Foundation"

path "/"

br "/main"

co "/main"

When I updated the selector it copied my Foundation source into the ProductA folder. Is that expected or did I do something wrong?

Thanks,

Tom

Link to comment
Share on other sites

Hi, Tom --

I'm John Posner, the (relatively) new tech writer at Codice. I'll be happy to help you with this. Please keep in mind that Plastic SCM has two similar concepts in the area of workspace configuration:

* MOUNTING -- using the keyword "mount": Making the contents of a repository appear to be embedded within another repository. (This embedding takes place only in the context of the workspace -- the two repositories are not really joined.)

* ROOTING -- using the keyword "root": Loading just a subtree of a repository into a workspace, instead of loading the entire repository.

Happily, these two facilities can be combined. Now, let's get to your situation ...

OK' date=' Pablo, here's where I am.

I created the following folder structure:

C:\ProductLines

C:\ProductLines\Foundation

C:\ProductLines\Foundation\ProductA

[/quote']

In what repository does this folder structure live?

I create a workspace named Foundation which is rooted at \Foundation

I create a workspace named ProductA which is rooted at \Foundation\ProductA

This might be the area of confusion. What did you do to cause the "rooting" of the workspace? Did you change the selector of the "Foundation" workspace? If so' date=' please show me exactly what the selector was. And ditto for the ProductA workspace.

That's all for now. I'm confident that we can get to the bottom of your problem when you answer the questions above.

Thanks,

John

In my ProductA workspace, my selector is:

repository "ProCede" mount "/ProCede"

path "/"

br "/main"

co "/main"

repository "Foundation"

path "/"

br "/main"

co "/main"

When I updated the selector it copied my Foundation source into the ProductA folder. Is that expected or did I do something wrong?

Thanks,

Tom

Link to comment
Share on other sites

Hi John -

Thanks for your time in this. I have scrapped everything and created new repositories and workspaces structured the way I'd like them. If I cannot do it this way, I will modify the folder structure accordingly.

I have loaded my Foundation source into a repository named Foundation and I have a workspace named Foundation which is using C:\Insurance\Foundation. Here is the Foundation workspace selector:

repository "Foundation"

path "/"

br "/main"

co "/main"

I have loaded my ProductA source into a repository named ProductA and I have a workspace named ProductA which is using C:\Insurance\ProductA. Here is the ProductA workspace selector:

repository "ProductA"

path "/"

br "/main"

co "/main"

OK, all I want to do is have my ProductA workspace also use the Foundation repository. Then I expect to have a C:\Insurance\ProductB repository and workspace that also uses Foundation.

So, seen as how am I totally not getting this (but I am sure it will click soon), I'd appreciate being shown how to do this.

Thanks,

Tom

Link to comment
Share on other sites

Hi Tom,

So if I understand you correctly is that you have some components that you want to share with ProductA and ProductB, these "common" components are in the repository "Foundation". right?

If the above is assumed, then you would mount Foundation into your workspace for ProductA , ProductB, ProductC etc.

The way to do that:

Go to your ProductA workspace.

Under the root, create a directory to mount your Foundation repository, call that directory "Foundation".

The directory "Foundation" within ProductA workspace should be Added and checked-in ProductA repository.

now edit your selector in ProductA workspace to look like this:

repository "Foundation" mount "/Foundation"

path "/"

br "/main"

co "/main"

repository "ProductA"

path "/"

br "/main"

co "/main"

I hope that helps,

Miller

Link to comment
Share on other sites

Hi Tom,

Putting in my two cents ... Miller is totally on-target (as always). And to reemphasize the point that trips up some people:

Under the root' date=' create a directory to mount your Foundation repository, call that directory "Foundation".

The directory "Foundation" within ProductA workspace should be Added and checked-in ProductA repository.

[/quote']

Just to reiterate:

1. In your ProductA workspace, create folder C:\Insurance\ProductA\Foundation

2. Run the "Add to source control" command on the new folder

3. Run the "Set selector" command on the workspace, changing the selector's contents as Miller indicated. And note that the "Foundation" repository spec must come BEFORE the ProductA repository spec.

-John

Link to comment
Share on other sites

Hi Miller -

This did help. Now I think I am at my last few questions for this situation.

I followed your steps and now my ProductA workspace does shows the Foundation source. On my local drive, the Foundation source was copied into my ProductA folder structure by Plastic.

Therefore, my questions:

1. Should my PowerBuilder target use the Foundation source under my ProductA root or under the Foundation root?

2. Will both folders on my drive be updated in sync? I ask because now I have Foundation course in C:\Insurance\Foundation (Foundation repository) as well as in C:\Insurance\ProductA\Foundation

Thanks! This has all helped a lot.

Tom

Link to comment
Share on other sites

Hi Tom,

I followed your steps and now my ProductA workspace does shows the Foundation source. On my local drive' date=' the Foundation source was copied into my ProductA folder structure by Plastic.

Therefore, my questions:

1. Should my PowerBuilder target use the Foundation source under my ProductA root or under the Foundation root?

[/quote']

I think you're using "root" above to mean the different workspaces. Here's the way to think about it: there's just one REPOSITORY called "Foundation". You can use any number of workspaces to access the repository; but whatever workspace you use, if you Checkin a new revision of a file, it goes into the central repository, where it becomes available to all workspaces through the "Update" command.

I think the following suggestion is appropriate for your situation:

* Forget about the workspace named "Foundation". (BTW, I personally think it's confusing to have a workspace with exactly the same name as a repository. Plastic SCM won't get confused, but mere humans might!)

* Use the workspace named "ProductA" (or "ProductB", etc.), configured as Miller advised, to work on all the files -- both the ones that are unique to a particular product (stored in the "ProductA" repository) and the ones that are shared among several products (stored in the "Foundation" repository).

2. Will both folders on my drive be updated in sync? I ask because now I have Foundation course in C:\Insurance\Foundation (Foundation repository) as well as in C:\Insurance\ProductA\Foundation

No. Plastic SCM does not have commands to keep different *workspaces* synchronized with each other. It only has the "Update" command, which syncs one workspace with the one or more repositories that are configured in that workspace's selector.

-John

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...