Por exemplo, tenho o seguinte histórico no meu repositório HG (ou seja, criei uma ramificação na rev. 80), chamada "Projeto X":
Project X Workbench:
-------------------------------------------------------------
· 85: Project X: version Z stable
· 84: Project X: improvements based on Project Model #3
| · 83: Project Model: improvements #3
| · 82: Project Model: improvements #2
| · 81: Project Model: improvements #1
|_· 80: Project Model: created
· 79: Project X: code improvements
· 78: Project X: version Y stable
|
[...]
Agora eu quero ter dois repositórios, "Projeto" e "Modelo". O repositório "Project" deve ter o ramo principal do "Project X" e o repositório "Model" deve ter o branch criado no rev. 80 (i.e., de rev. 80 a rev. 83):
Project Workbench:
-------------------------------------------------------------
· 81: Project X: version Z stable
· 80: Project X: improvements based on Project Model #3
· 79: Project X: code improvements
· 78: Project X: version Y stable
|
[...]
Model Workbench:
-------------------------------------------------------------
· 3: Project Model: improvements #3
· 2: Project Model: improvements #2
· 1: Project Model: improvements #1
· 0: Project Model: created
Como posso fazer isso usando comandos HG? Ou eu posso fazer isso apenas "da maneira mais difícil"?
Hard way:
---------
1. create another repository named "Model"
2. rev1 = 80, rev2 = 0
3. update "Project X" to (rev1 + rev2)
4. copy "Project X" code to "Model" folder
5. commit "Model" as rev2 using the same comments of "Project X" on (rev1 + rev2)
6. rev2++
7. go back to step 3 while rev2 < 4
8. on "Project X" strip rev1 and all its descendants