hg share and merge and conflict

rcd work start at rev15, commit rev16 and rev 17
yzh work start at same rev and commit 16,17,too.
but rcd's 16 and 17 will be conflict with the yzh's.


rcd should commit all his modification, before merge

solution 1. export and import
yzh:
hg export -o 16_17.patch 16 17

rcd:
hg update -r 15 -C
hg branch formerge
hg import 16_17.patch
hg merge default
[conflict will happen, try to resolve it by anyway, to assume /XXX/XXX/demo.cpp conflicted]

hg resolve -m -I "**demo.cpp"

hg resolve -l
[to confim the all merged file's conflicts has been resolve, with 'R' as prefix]

solution 2. bundle
yzh:
hg bundle --base 15 16_17.bundle

rcd:
hg pull 16_17.bundle
[now the changes auto set into a branch]
hg heads -a
hg tip
[to find which branch you are on]

hg merge

ps: solution 2 's behavior is going on like pull form ssh or http server.

[the following things happen as the same as solution 1]

The solution 2 is recommended if you are not convenient to use the ssh and http share.

thats all

posted on 2010-05-24 14:09  不是程序  阅读(310)  评论(0)    收藏  举报

导航