<div class="gmail_quote">On Sun, Mar 20, 2011 at 9:39 AM, Georg Brandl <span dir="ltr">&lt;<a href="mailto:g.brandl@gmx.net">g.brandl@gmx.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">Now, &quot;hg pull --rebase&quot; prevents that by &quot;re-basing&quot; the A-B history</div>
line onto the latest remote head.  After rebasing, the history looks<br>
like this:<br>
<br>
... --- X --- C --- D --- E --- A&#39; --- B&#39;<br></blockquote><div><br></div><div>Rebasing also allows you to collapse the commits, so you can make the tree look like this:</div><div> </div><div>... --- X --- C --- D --- E --- AB&#39;</div>
<div><br></div><div>Collapsing commits is useful for keeping the repository clean.  For example, I make commit A and send it for review.  Someone points out some flaws and I make commit B.  I don&#39;t want the flawed version checked in to the main repository, so I collapse the commits into one commit AB&#39;.</div>
<div><br></div><div>Keeping the repository clean makes it easier to use a bisection search to hunt down the introduction of a bug.  If  every developer&#39;s intermediate commits make it into the main repository, it&#39;s hard to go back to an older revision to test something, because many of the older revisions will be broken in some way.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">In reality<br>
it works fine if you know the limits: rebasing really only should be<br>
applied if the changesets are not already known somewhere else,<br>
only in the local repo you&#39;re working with.</blockquote><div><br></div><div>The changesets must only be in the local repo *and* they must not have been merged into another branch yet.</div><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8">On Sun, Mar 20, 2011 at 9:21 AM, Guido van Rossum <span dir="ltr">&lt;<a href="mailto:guido@python.org">guido@python.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
Why does everyone want it and hate it at the same time?<br></blockquote></div></div><div><br></div><div>People love it because it&#39;s a very powerful tool.  People hate it because it allows you to shoot yourself in the foot.</div>
<br>-- <br>Daniel Stutzbach<br>