0

we use Kiln with mercurial.

Simplified description we have 2 kind of Repositories.

Some Kind of

"CurrentDevelopment" and repositories for each released version for example 13.1 for the released version 13.1. (There are also user repos and more, like descriped in hginit.com but this can be ignored for the moment)

Now sometimes we need to make a fix to a released version. So we fix it in the Repository for the released version. For 13.1.

Then we cann pull from 13.1 to the currentDevelopment repository

This seems to work fine.

But now we could make something in "CurrentDevelopment" and a month later we recognize that this change will also be needed in 13.1 But I can't pull from CurrentDevelopment to 13.1 because there are a lot of other changes i don't want to have in 13.1

I know this is some kind of "cherry picking" which i isn'T easy realized. But if it wouldn't be many source code i code recode them in 13.1.

But after that when i make changes to 13.1 which i pull to current development i would also pull the changes that are already included in CurrentDevelopment :-/ so in worst case i may get merge failures and duplicate code? I'm not sure if mercurial will safely recognize that this code is also contained.

What is the recommended approach to realise these version specific repositories and handle changes between them ? In especial if a change of the current development repository is afterwards needed in a child verison branch?

Boas Enkler
  • 12,264
  • 16
  • 69
  • 143

1 Answers1

0

The graft mercurial command is your friend here. It allows you to back-port a change to an old branch.

If your Kiln version is older & doesn't have a version of Mercurial that includes the graft command, you could use the (similar but less reliable) transplant extension. (graft uses Mercurial's merge logic, transplant just uses the patch logic)

edit... I don't think that graft command is exposed in the UI of the version of TortoiseHg that is currently bundled with Kiln. See how to use graft in TortoiseHg The command line should still work though.

Community
  • 1
  • 1
Andy May
  • 139
  • 1
  • 6