Reputation: 103
We have recently moved from Perforce to Mercurial, and we are struggeling a bit to find out how to merge only certain changes to our stable releases. We have a central repository that all developers clone from. In Perforce, we have been using branches to maintain releases, and then merging only bug fixes per change lists from branches into trunk, or the other way around into branches that needed that fix.
In Mercurial, we have implemented this by cloning, where each stable release is a cloned repository of trunk.
Our structure looks a bit like this:
Trunk
|- Release 1
|- Release 2
|- Release 3
My question is, how can we merge only specific change sets from trunk into a branch? I hope there is an easy way to do it, preferably using TortoiseHg, since we have a lot of developers with different experience level that will be doing this.
Upvotes: 0
Views: 54
Reputation: 5090
I might not understand fully what you want to do.. but yes you can take changes from one branch into another branch (e.g., from the trunk, called default
in Mercurial, to a release branch). In modern Mercurials, this can be done using the graft
command (or before the transplant
extension). To use it on a branch type: hg graft REVISION
(see hg help graft
for more details).
Now what I don't understand is that it seems that you do not have several branches but only one (default
) and several clones (?), in which case everything becomes a bit more complicated.. You could pull only one changeset but then you need to pull also its ancestors and it is difficult to know what you actually get into your clones working directories! So I would really advice to create the release branches!
Hope it'll help.
Upvotes: 1