Jump to content

Delete branch after merge


antoine.agthe

Recommended Posts

Hello,

 

I just started using Plastic SCM a couple of days ago, and I try to figure out the philosophy.

I'm OK with the branch-per-task approach, but as I'm from GIT, I was used to delete my branches after merging them.

 

The repository I'm working on is holding every single project we have.

So branching each task, for each project, will create hundreds of branches (thousands a year, probably).

 

I know I can filter branches in the Plastic SCM client, but then, is it a good approach to keep these branches indefinitely ? Does it come with a performance cost ?

 

Thanks

Link to comment
Share on other sites

Hi Antoine,

 

removing branches in Plastic is not possible and it's not needed at all. Performance won't be affected.

 

I'm not sure why user with a Git background want to remove old branches. I can only see disadvantages of doing that.

 

1) You loose tracking information, it's harder to review where a change is coming from.

2) You somehow loose history, it's not the same a branch with 10 changesets, each of them explaining what has been done than a single changesets result of a merge operation from the 10-cset-branch.

3) It's harder later if you want to cherry pick or substract changes.

 

Well, I can see some advantages, for example the repository will be simpler and somehow smaller.

Link to comment
Share on other sites

I see one advantage.

In out company every developer has local server which is sync with global server.

All local task branches and main brain are always sent to global server.

After some time local task branches are not needed anymore to be present in local server - you can always re-sync from central repo if needed in future.

They occupy disk space on dev machine and make "Branch Explorer" view less clear.

Link to comment
Share on other sites

Oh yes but even counting with that if the child branches are merged into main (master) you are not saving anything but the child branch metadata, a few KB.

 

Notice that the file/dir revisions crated on child branches are copied and propagated to /main using the merge operation.

 

You'll only be saving disk space with local branches that are not merged into main.

Link to comment
Share on other sites

Right...

But at least "Branch Explorer" will be more clean for dev repo.

PS. It would be great also if there is possibility to not store/delete old changesets from main branch :)

Even with contraint that such "limited" branch must start from changeset which in central repo is labelled/tagged specially.

Link to comment
Share on other sites

Yep.

 

You can also use the branch explorer filter to create an smaller diagram. Or the inclusion / exclusion rules.

Just for you to know you have multiple choices :P

 

I'm afraid your request is not going to be possible in a short term, newer changesets depend on older so I think the change will require a lot work to make sure relevant revisions are not lost, leaving the head tree inconsistent.

Link to comment
Share on other sites

  • 4 months later...

I was actually wondering about the exact same thing.

Being the only programmer on our small team, I got the responsibility of taking care of version control. This means I'm doing all the merging, and even though we haven't been using plastic for that long, the amount of branches are quickly stacking up. right now I don't really see any other way of keeping track of what branches to pull and merge than manually numbering them.

Question:

Is there a way to filter the branches in the branch view of the GUI so that I don't see branches that have been merged back into the development branch and are not used any more?

Link to comment
Share on other sites

Hi!

 

Yes, using attributes can be a solution, we actually use them to easily query those branches that are having all the test suite OK and they are ready to be merged back to main.

 

Notice you can also enable a format rule inside the branch explorer in order to display with a different color those branches not integrated yet. (In both Windows and Linux GUIs)

 

And of course, you can use an Issue tracking system, like Jira, to manage all that information.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...