Are squashed commits and discarded branches possible in bzr?
Eric Siegerman
lists08-bzr at davor.org
Wed May 12 17:12:24 BST 2010
[Editing out the git bits, as I've never used git, and so can
speak only to the bzr side]
On Tue, 2010-05-11 at 16:33 -0700, Todd A. Jacobs wrote:
> If I have a file "foo," and make incremental changes, do a squash
> commit [...]
> bzr thinks:
>
> 3: Todd A. Jacobs 2010-05-10 [merge] Merges.
> 1.1.2: Todd A. Jacobs 2010-05-10 Added baz.
> 1.1.1: Todd A. Jacobs 2010-05-10 Added bar.
> 2: Todd A. Jacobs 2010-05-10 Added bar and baz.
> 1: Todd A. Jacobs 2010-05-10 Foo.
>
> Neither DVCS gave me any drama about
> re-merging
That's only because there were no conflicting changes. Where you
*will* run into trouble with bzr (don't know about git) is if,
between the two merges, you change bar or baz in the feature
branch. In that case, the second merge will produce a conflict.
But if the first merge had not been squashed (i.e. if you had
omitted the "bzr revert --forget-merges" step), the second merge
would be clean.
- Eric
More information about the bazaar
mailing list