When I work in a Mercurial local workspace, to fix one bug or add a new feature, I'd like to track my modifications in versioning way, so I did local check-ins on every milestone. While when I push the changes to parent workspace, all the changesets (even some trivial changes, e.g., fixing typo:$) will be saved to parent workspace.

I once used the most stupid way, having two local copies, one is for development, another one is for pushing to parent. Then I found one tip to concatenate multiple changesets into one changeset, but it still needs an extra clone. Finally, I met the MQ extension.

Refer to the tutorial, you would find it's really close to what you want.

Here I list the most important tips:

  • To initialize the patch versioned repository:
  • hg qinit -c
  • To convert all applied MQ patches into permanent changesets: (Note, after the conversion, you may not rollback the last changeset)
  • hg qdelete -r qbase:qtip
  • Synchronizing with upstream (which is much simpler than the steps in MqMerge, and does not introduce extra "merge marker" changeset)
  • hg qpop -a
    hg pull -u
    hg qpush -a
    评论:

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

    This blog copyright 2009 by yongsun