2014-12-09 2 views
1

나는 작은 프로젝트를 시작한 후 얼마 안되어 RCS로 수은을 사용했다. 모든 커밋은 default 브랜치에서 수행되었습니다. 단, 현재 개발중인 하나의 지사는 프로젝트의 별도 복제에서 제외됩니다. 프로젝트가 매우 중요하게되었고 Driessen's model으로 전환하고 싶습니다.hg-flow 모델로 전환 : 커밋 및 분기를 리베이스하는 방법

나는

$ # Starting in the default branch 
$ hg up -r 0 
$ hg branch develop 
$ hg ci -m 'created the develop branch' 
$ hg rebase --source 1 

내 문제는 내가 가지 정보를 잃지 않고 develop 지점에 내 feature/new-feature 분기를 가져올 수 있다는 것입니다 사용 developdefault:rev1의 모든 커밋을 리베이스 할 수있었습니다. 나는 그것을 할 수있는 적절한 방법이 있다고 확신하지만 그것을 찾을 수는 없다.

어떤 조언이 필요합니까?

미리 감사드립니다.

답변

0

좋습니다. 이렇게하면 해결 방법입니다. 아마도 적절한 해결책이있을 것입니다. 어쨌든,이 작동합니다.

$ # Create branch develop at rev 0. 
$ hg up -r 0 
$ hg branch develop 
$ hg ci -m 'creating branch develop' 
$ 
$ # Rebase all commits into the develop branch. 
$ # This will merge the feature/new-feature branch into develop. 
$ hg rebase -s 1 
$ 
$ # Re-create the feature/new-feature branch from its original parent. 
$ hg up -r 357 
$ hg branch feature/new-feature 
$ hg ci -m 'created branch feature/new-feature' 
$ 
$ # Move commits that belong to this branch from develop from newly re-created 
$ # branch. 
$ hg rebase --base 358 --dest tip