There are several ways to exchange changesets of mercurial between repositories (branches).
  1. hg bundle/unbundle

  2. Just like an offline hg pull/update, which means you could not apply the changesets from another repository if they do not share the same changesets.

  3. hg export/import

  4. hg export -o changesets/patch%r REV1:REV2. It could work for the repositories that does not share the same changesets (repositories may come from different ancestors), but it does not work so well for merged revisions (the changesets have multiple parents). Even with --switch-parent option, you still need to manually edit the patch to eliminate the additional parent declaration in comments.

  5. hg transplant extension

  6. So far the best solution, though I still met a problem when transplanting a specific merged revision (for other merged revisions, it worked smoothly). So I use hg cat -r REV to output the relevant files, copy them to the new repository and commit. Then skip the specific revision.
评论:

发表一条评论:
该日志评论功能被禁用了。

This blog copyright 2009 by yongsun