Jump to content

Updating a xlink data


cidico

Recommended Posts

Hi Manu,

I was trying some things in xlinks and did this:

Made a change in the Repository that my xlink is linked to;

Made a change in my Repository that has a xlink;

Tried to checkin my Repository that has the xlink and a dialog was shown telling me that a merge needs to be done and asking me if I want to do the merge now or later;

I selected the now option and another window to process the merge was shown;

No merges to be done was shown;

I don't know if I'm doing this right, but if I have an xlink and I ask for an update in a xlink folder, shouldn't plastic update with the content from the parent repository??

Link to comment
Share on other sites

Hi Manu,

Sorry ask you again...

This scenario is not supported yet, so my best change to have an xlink that always has the latest version is removing and re-adding the xlink to the latest changeset?

I mean, if other developer is working on repository and I need his "bleeding-edge" code, is this the only way?

Link to comment
Share on other sites

Hi cidico,

You can avoid this conflicts between developers if you preserve a clean baseline.

If you work with the task-per-branch methodology you will avoid this problem and you will have always the latest stable code.

You are having this scenario due to you and your coworker are working on the same branch, in the 95% of the dev scenarios is better if you use a branch per task for your daily work.

Imagine the following: 3 repositories.

MyProduct, Core and GUI. MyProduct has Xlinks to Core and GUI.

We start from zero, "BL000" in the three repositories (MyProduct has Xlinks to the BL000 labeled changesets in Core and GUI) then the task arrives to us, we create the scm001 branch in "MyProduct" repository from the "BL000" label (normally at main branch), there's no problem if we change something under the Xlinks of Core and GUI repositories, plastic will create the "scm001" branch for us in the Xlinked repositories (Core and GUI) automatically.

When the tasks are done the build master will collect the finished tasks and he/she will proceed to integrate them into the baseline branch (normally /main branch) the Xlinks will be updated automatically to the new target. When all the task are inside the integration branch and all the tests are fine we can label the changeset with the BL001.

You will repeat this process every 15 - 30 days.... In this way you will preserve the baseline clean, the only changes in the baseline will be the ones created while the build master is integrating the finished tasks to build the new release.

I'm not sure what is your working methodology, maybe you can explain better to understand if this approach can help you.

Manu.

Link to comment
Share on other sites

Hi again!

Well, I'm testing the xlinks to implement in my company code, so right now, I'm trying xlinks in my personal project to see how it goes.

In my company, I'm the guy who collects all changes made by everyone and create a build and then deploy the app to test.

I love work using plastic but one thing I don't use yet is label. I never did a real research on it to see how to use. Right now, my "baseline" is the last cset in the /main branch.

...

We start from zero, "BL000" in the three repositories (MyProduct has Xlinks to the BL000 labeled changesets in Core and GUI) then the task arrives to us, we create the scm001 branch in "MyProduct" repository from the "BL000" label (normally at main branch), there's no problem if we change something under the Xlinks of Core and GUI repositories, plastic will create the "scm001" branch for us in the Xlinked repositories (Core and GUI) automatically.

When the tasks are done the build master will collect the finished tasks and he/she will proceed to integrate them into the baseline branch (normally /main branch) the Xlinks will be updated automatically to the new target. When all the task are inside the integration branch and all the tests are fine we can label the changeset with the BL001.

...

So, I think my problem was that I didn't create a branch to perform the change in the repository that my xlinks are linked to.

I'm going to try this later!

I'll be in touch! :)

Link to comment
Share on other sites

In my company, I'm the guy who collects all changes made by everyone and create a build and then deploy the app to test.

I love work using plastic but one thing I don't use yet is label.

You have to read this article, it will take 10 minutes and it will improve your daily work a lot!

Labels are a great weapon for a release builder!

http://www.plasticscm.com/infocenter/technical-articles/kb-branch-per-task-workflow.aspx

Regards,

Manu

Link to comment
Share on other sites

Hi Manu,

I finally figured out how to work with xlink! (ok, I know it seems stupid, but I tried a lot of things yesterday.)

It's awsome! But I still don't get why I cant update my xlink to the latest changeset in my parent repository.

I mean, plastic did everything as promised: merged and created the branch in the parent repository.

So I ask you AGAAAAAAAAAAIN... :mellow:

The parent's repository maintainer approved my changes and decided to merge them in the parent's repository main branch. (A new Baseline to everyone)

How can I point my xlink to this new changeset that merged my changes (and possible others changes)?

If I don't do it, I will have my changes, but not any other changes made by anyone in that project.

Did I understand everything or Am I being stupid??

Link to comment
Share on other sites

One more thing that made me sad about xlink...

Why can't I put the xlink in a subfolder?

Just today I was thinking about a folder structure to link my main project and other satellites projects (like Mail Sender Project, Unit Of Work Pattern, Database Conventions Project and etc) that I reuse a lot in some projects and I dont want to keep them in my main Project's main folder.

Any hint supporting xlink in subfolders?!

Link to comment
Share on other sites

Hi cidico,

about if the subfolders are supported -> Not yet, we will work to support it but now it's not supported.

The parent's repository maintainer approved my changes and decided to merge them in the parent's repository main branch. (A new Baseline to everyone)

How can I point my xlink to this new changeset that merged my changes (and possible others changes)?

If I don't do it, I will have my changes, but not any other changes made by anyone in that project.

I'm not sure about what is the parent repository, can you explain it a little more?

Thanks!

Link to comment
Share on other sites

Imagine you have to repositories: Rep A and Rep B.

Rep A is my main project and Rep B is the repository that I want to link via xlink.

I create the xlink, checkin and update my workspace to get the code from Rep B.

Then I create a branch, switch to it and perform some changes in files from the Rep B.

I do a checkin, plastic creates a new branch in the Rep B to keep my changes.

Then I decided to merge the changes in this new branch in Rep B in the main branch and some more changes made by other developers.

I create a new baseline in the Rep B that is the "new release" of Rep B code.

My Rep A that has an xlink to Rep B has my changes, but not the new changes made in the "new release".

How can I get those new changes?

Link to comment
Share on other sites

Ok, I undertand now, you have one option (Assuming you want to integrate the RepA taskX branch into RepA main branch and also RebB taskX branch into RepB main branch):

* Perform the merge working in the Rep A, merge RepA taskX branch, the merge will be applied also in the Rep B and the base line will keep the Xlink automatically updated. You just need to merge the taskX branch, PlasticSCM will manage the rest.

But if you only want to integrate RepB taskX branch into RepB main branch the taskX in RepA will keep the old Xlink target.... if you want to have the latest changes on your no-integrated RepA taskX branch you have to edit the xlink..... There is a "-e" option in the Xlink command to do it, it allows you to change the target changeset to the latest RepB c

But I really recommend you to work integrating from the main repository (RepA) it's easier and more clear to understand, and also less work for the build master....

Regards,

Manu

P.D: I think my explanation is a complete mess!!!! :S

Link to comment
Share on other sites

When I first read your explanation, I thought it was a mess too.

But reading it listening to this song: http://grooveshark.c...ce/4jXsbA?src=5 I understood your epiphany ! :P :P :P

How is the proper way to use the -e parameter? I tried it the day before yesterday and it did not worked to me. It was saying that I could not change the xlink.

Did you understand my need? If I REALLY wanted to use an "component model design" for satellite libraries, I need to be able to change to make changes in the repository that has my libraries I my many projects and propagate them as BL as if the projects that use them were my clients.

When you say:

But I really recommend you to work integrating from the main repository (RepA) it's easier and more clear to understand, and also less work for the build master....

It's ease to do if you have the power to change libraries but if in every project that uses the libraries could change like this, it would be a mess to maintain a BL to everyone.

Don't you think?

Link to comment
Share on other sites

Hi cidico!

Good song! I'm a little more hardcore http://grooveshark.com/#/s/Wake+The+Dead/hG7V?src=5

In this moment there is no way to notify to the Main repository, the one that is having Xlinks to Libraries, the event "The Xlinked changeset have changed", obviously if you change your Library repository directly, if you do it using the Main repository it's going to work automatically, as I said before.

Just to know if I understood you.

You want for example create a Xlink to the cset "22" of your Library repository from your ProjectX repository, and then you or a co-worker of you create a new cset "23" directly on the Library repository. You want that the Xlink (stored in ProjectX rep pointing to Library rep) updates itself to the new changeset created?

Regards,

Manu.

Link to comment
Share on other sites

Hi! Thanks for taking too much time with me on this, I just want to help you to build a even better xlink! (or maybe just to learn how to use it!!) :)

Just to know if I understood you. You want for example create a xlink to the cset "22" of your Library repository from your ProjectX repository, and then you or a co-worker of you create a new cset "23" directly on the Library repository. You want that the Xlink (stored in ProjectX rep pointing to Library rep) updates itself to the new changeset created?

Well, Not exactly!

I don't want a "automatic update", just being able to update my xlink to a new changeset (or baseline) when I think I need the new update.

Imagine this:

You're working on your branch on Plastic's code and you find out a bug in Pablo's code on merge system.

You already have a xlink to the merge system repository on your branch and you perform the change on merge system. Then you inform to Pablo that you had found a bug in his code and already made the change. Pablo is the maintainer of merge system and take a look in the change made by you and agree with the "patch" you've sent to him. But he can't do the change right now in the main branch (or create a new baseline) right now because he needs to test it with all other subsystems that use it).

Then, another developer also perform some changes in merge system and do the same as you and creates a new branch to save his changes in the merge system repository.

Pablo also accepts his changes.

Pablo also did some modifications making the merge system more fast and reliable and has his own branch with his changes in the merge system repository.

You have your change in your local workplace and repository, but you don't have neither the changes made by the other developer or Pablo's .

Now, Pablo thinks merge system repository needs to have a new changeset (or baseline) to the merge system that will be used in the new release.

Right now, you can't update your xlink to this new changeset (or baseline) made by Plabo, right?

That's what I'm talking about: a way to update your xlink to a new changeset.

If you right click in your xlink folder, in Items view, and perform an update command you wont be able to get the new code because your xlink is pointing to an specific changeset but your changeset is outdated. The only way I can do this right now is removing the xlink and recreating it. Am I right?

I don't think that change the behavior of Update command, maybe you could add a new menu item to the xlink folder like (Rebase xlink) or a CLI command to do this!

As I said before the -e parameter didn't worked when I did.

Hope you understand.

Link to comment
Share on other sites

Manu, I think I may be stupid.

I've tried this:

E:\Perfil\My Documents\Cidico Corporation\Projects\Doxicobol>cm xlink "NHibernate Conventions" / 5@NHibernateConventions@KEPLER:8087 -e

Can't edit the xlink type.

E:\Perfil\My Documents\Cidico Corporation\Projects\Doxicobol>cm xlink "NHibernate Conventions" / cs:5@NHibernateConventions@KEPLER:8087 -e

Can't edit the xlink type.

E:\Perfil\My Documents\Cidico Corporation\Projects\Doxicobol>cm xlink "Doxicobol\NHibernate Conventions" / cs:5@NHibernateConventions@KEPLER:8087 -e

Can't edit the xlink because it does not exist at path: e:\Perfil\My Documents\Cidico Corporation\Projects\Doxicobol\Doxicobol\NHibernate Conventions

E:\Perfil\My Documents\Cidico Corporation\Projects\Doxicobol>cd ..

E:\Perfil\My Documents\Cidico Corporation\Projects>cm xlink "Doxicobol\NHibernate Conventions" / cs:5@NHibernateConventions@KEPLER:8087 -e

Can't edit the xlink type.

What am I doing wrong here? This xlink was created using the -w parameter.

Link to comment
Share on other sites

Hi cidico!!

You are not stupid!!!

E:\Perfil\My Documents\Cidico Corporation\Projects\Doxicobol>cm xlink "NHibernate Conventions" / cs:5@NHibernateConventions@KEPLER:8087 -e

Can't edit the xlink type.

Try adding "-w", I think the command is interpreting that you want to change from an writable Xlink to a read only Xlink, and that is not allowed.

I think this is not a good behavior due to you only want to edit the target and if you can't change the type this argument should not be needed....

Link to comment
Share on other sites

Thanks Manu, now the xlink is almost perfect!! :D

I tried the follow command and it worked perfectly!!

E:\Perfil\My Documents\Cidico Corporation\Projects\Doxicobol>cm xlink -w -e "NHibernate Conventions" / cs:5@NHibernateConventions@KEPLER:8087

OK: e:\Perfil\My Documents\Cidico Corporation\Projects\Doxicobol\NHibernate Conventions --> wxlink:NHibernate Conventions:/@5@NHibernateConventions@KEPLER:8087

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...