Difference between revisions of "Managing Local Changes with Mercurial Queues"
From gem5
(→Example Mercurial Queue Use) |
(→Enable The MQ Exention) |
||
Line 23: | Line 23: | ||
== Example Mercurial Queue Use == | == Example Mercurial Queue Use == | ||
− | === Enable | + | === Enable the MQ extension === |
To enable the mercurial queue extension, simply add the following to your '''.hgrc''' file: | To enable the mercurial queue extension, simply add the following to your '''.hgrc''' file: | ||
<code> | <code> | ||
[extensions] <br /> | [extensions] <br /> | ||
− | mq = | + | hgext.mq = |
+ | </code> | ||
+ | |||
+ | === Simple workflow with MQs === | ||
+ | Here is a simple example outlining basic MQ usage: | ||
+ | |||
+ | <code> | ||
+ | # clone a clean copy of gem5 | ||
+ | hg clone http://repo.gem5.org/gem5 | ||
</code> | </code> |
Revision as of 13:09, 16 February 2013
Contents
Repository Management Problem
gem5 users typically opt to freeze their repository at a particular changeset when starting a new research project. This approach has several downsides:
- It discourages users from contributing back any useful changes they may develop.
- If a useful change is added upstream, it's a long, tedious process to update.
If a user chooses to keep their local repository up-to-date with the source tree they typically use named branches and merge any upstream changes into their branches. This approach also has its downsides:
- If any local change needs to be updated, it requires a separate commit.
- If you have several small, unrelated changes separate branches must be maintained.
- Upstream changes must be merged into the local branches.
A powerful tool that overcomes these problems is the mercurial queue extension.
Mercurial Queues
The mercurial queue extension is a powerful tool that allows you to:
- Manage small changes easily as a set of well-defined patches.
- Edit previous patches without having a new commit.
- Keep your local changes cleanly separated from upstream changes.
Example Mercurial Queue Use
Enable the MQ extension
To enable the mercurial queue extension, simply add the following to your .hgrc file:
[extensions]
hgext.mq =
Simple workflow with MQs
Here is a simple example outlining basic MQ usage:
- clone a clean copy of gem5
hg clone http://repo.gem5.org/gem5