Jump to content
marioo

Unable to edit xlink without knowing its properties

Recommended Posts

Hello,

 

In a recent release of PlasticSCM client you changed the default setting of the 'relative server' flag when creating a new xlink. We currently use only one central server and if I understand the meaning of the flag correctly, its value does not matter in our case. So far, however, we kept the former default setting, and in all xlinks we created in our repos until recently the flag was set to false. When the new version was released with the flag set to true by default, all xlinks we created since then have the flag set to true. We just didn't care about this setting.

 

And what's the problem? We use certain jobs on Jenkins that automatically update xlinks in a selected repository to the latest changeset on /main of the xlinked repos. To do that, we use the cm command like this:

cm xlink -e -w MyXlink / changeset_number@MyXlinkedRepo@Server:Port

It turns out that this command can't update xlinks whose relative server flag is set to true unless you add the -rs parameter to the command (which we don't do). This causes our Jenkins jobs not to work on such xlinks.

 

Because I can't find a command to check the relative server flag of an xlink, I can't create a script that will edit only changeset number without modifying other properties of an xlink. So the simplest workaround I can think of now is redefine all xlinks in all repositories to set the flag to false, which should make our Jenkins jobs to start working properly again.

 

However, don't you think there is something wrong with the edit (-e) command? Why does it attempt to modify the -w or -rs flag even when you don't mention them in the command? In my opinion, if server name, xlink name, relative server and writability can't be modified in an existing xlink, the edit command shouldn't have any influence on them, don't you think? So I think specifying the -rs or -w parameter together with -e should be treated as an error.

 

What is your opinion?

 

Thank you.

Share this post


Link to post
Share on other sites

Long story short. When you create a new xlink, it is obvious that you have to specify all its parameters. But when you edit it later on, and the only parameters that can be edited are target changeset and branch expansion rules, why is it still necessary to know and specify all other parameters as well?

Share this post


Link to post
Share on other sites

Hi marioo,

 

you are not forced to specify all the data, for example, specifying only the new target cset will result in the same config + the new target cset + the new expansion rule.

cm xlink CoreCommon -e 25270@CoreCommon@tardis:8087

Share this post


Link to post
Share on other sites

Hi manu,

 

Thank you for your support. The only difference between our commands is that I used a slash, and it made a difference... I've just looked closer at the cm xlink help, and actually the slash is not used together with the -e param. I didn't notice that detail before.

 

Sorry, that's my mistake!

 

Thanks for your help!

Share this post


Link to post
Share on other sites

You are very welcome Marioo, here to help :)

 

Yes, the slash is another parameter that is not needed for editing the xlink. We improved the edit xlink command because there were a few thing that didn't make sense at all.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...