Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The piece of advice I wish I'd heard earlier on is to "fix the bug as early as possible", and I don't mean right after you code it. I mean that if you're fixing a bug that introduced in changeset number 400, two years ago, you should do:</p> <pre><code>hg update 400 vi .... # fix bug hg commit </code></pre> <p>Mercurial will say "new head created", which seems alarming at first, but what you've done is create a changeset (an anonymous branch actually) that can be <code>hg pull</code>ed into any branch that has the bug.</p> <p>Before I figured that out, we'd fix the bug in the release branch, or in a development branch, or on some other active line of development, and then we'd want to move that fix to other branches, and couldn't do it well. The reason being when you pull (branches as clones) or merge (named or anonymous branches) there's the firm requirement that if you're pulling/merging changeset X then you're pulling/merging all the ancestors of changeset X -- but you don't necessarily want all of those ancestors (which might be new, experimental features) you just want the bug fix.</p> <p>Moving a change without its ancestors requires "cherry picking" of one form of another, either via import/export or transplant or some other out-of-band mechanism.</p> <p>If, however, you make your bugfix changesets such that their only ancestor is the changeset in which the bug was first created then you can always 'hg pull' that fix into any branch that has the bug without bringing anything else with you.</p> <p>Just to bring it back to your original query a little more, what I'm suggesting above is equally applicable if you're using clones as branches (my preference) or named branches.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload