Jump to content

Creation of top-level branch starting at non-last changeset


Misieq

Recommended Posts

Hello

Could you please tell me how to create in GUI top-level branch which will not start from last changeset of /main (or any other) branch?

I tried to add new top-level branch to my repo but it looks that this option is available only in menu which shows after righ-clicking at any branch.

And in such case new branch is alwayes starting from the last changeset of clicked branch.

Thus creation of complately new top-level branch from middle of /main or even from beginning of /main looks to be not possible (at least from GUI - I did not investigate if it is possible from CLI).

Could you please add support for such case?

Link to comment
Share on other sites

Hi Misieq,

you are right, the top level branch creation using the GUI is restricted to the latest changeset of the base branch.

You should use the CLI for this, the "mkbranch" command is able to select the parent changeset:

cm mkbr br:/Production --changeset=27

 

Link to comment
Share on other sites

  • 1 year later...

Hi @Knapsu,

I'm afraid it's still not supported, you can easily add the idea to our user voice site: https://plasticscm.uservoice.com/forums/15467-general, if it gets enough traction we will implement it.

Right now you might be interested in extending the Plastic SCM GUI by using the custom actions for the Plastic SCM branch object: http://blog.plasticscm.com/2017/12/introducing-plastic-scm-external-tools-actions.html, it would be something like "Create top level branch from..." for a branch or a changeset object, you can retrieve the list of changesets (using the "cm find" tool) if a branch is selected and display them to the user, once a changeset is selected you can use use the "cm" mkbr command in order to create the top level branch. If a changeset is selected you can directly create the top level branch from it.

I know it's not a "native" feature and I guess you would rather prefer to have it developed by us but we are 100% focused on the 2018 roadmap: http://blog.plasticscm.com/2018/04/2018-backlog.html, and this is a fast way for you to have it working, makes sense?

Link to comment
Share on other sites

  • 8 months later...

Hi Plastic team

I found this thread because I was having issues creating top-level branches - if I try to create one from br:/main in the GUI, it creates it from changeset 0. Judging by this thread, this is not the expected behaviour as it sounds like it should be creating it from the latest changeset.

Not urgent as I can use the console command given by Manu above as a workaround, but the console command seems to introduce another complication:

cm mkbr br:/test --changeset=1

The above works, but if I later create a changeset 2 on /main and then try to create another top-level branch in the GUI, it seems to remember my earlier console command and this time creates a new top level branch from changeset 1 rather than changeset 0.

(It sounds like the GUI command might be picking the changeset that was last-used to create a top-level branch, rather than the latest changeset? This could explain why it was picking changeset 0 as the base previously, since changeset 0 was used to create /main...)

David

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...