1

So, we have a staging branch that seems to have had one-too-many bad merges. We'd like to create a fresh new staging branch, but would also like to keep the same branch name, for consistency, and because it's part of our CI/CD process.

Is there a way to do this in mercurial?

I was thinking that the entire team could "prune" the branch, and then we remake it(branching it off another branch), but I'm not sure if this will work or will just cause a different headache.

I also want to avoid just starting a new branch called staging2 as I feel that that is just putting off the problem for later.

Nick Zinger
  • 1,174
  • 1
  • 12
  • 28
  • 1
    To the question https://stackoverflow.com/questions/4378684/mercurial-can-i-rename-a-branch there are multiple answers with different approaches. In this case I Think the "hg convert" option is possibly the best one (https://stackoverflow.com/a/4379161/3195477). – StayOnTarget Nov 27 '19 at 14:03

1 Answers1

1

Rename old staging into something else and create new staging again?

Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
  • I've looked around, renaming might be an option. The extension I've seen, called "evolve", seems to not be ready for production judging by the notes. Other options include using "convert". All of these options are pretty involved, and seem like more time consuming and more risky then doing a new "staging2" branch. But maybe those are the only options. I'll consider them. – Nick Zinger Nov 27 '19 at 09:41
  • @NickZinger convert isn't as bad as it sounds. The main thing is that you can safely practice any changes on a clone of the repo so there is no initial risk at all. You only propagate your changes to the team when you're 100% confident of it. – StayOnTarget Nov 27 '19 at 14:05
  • @DaveInCaz fair point on the repo clone. I'll have to give that a shot once I have some downtime. – Nick Zinger Nov 27 '19 at 14:33