[Python-Dev] Hg: inter-branch workflow

Barry Warsaw barry at python.org
Mon Mar 28 19:56:17 CEST 2011


On Mar 27, 2011, at 01:39 PM, Neil Schemenauer wrote:

>Barry Warsaw <barry at python.org> wrote:
>> I'm asking because I don't know hg and git well enough to answer the
>> question.  In my own use of Bazaar over the last 4+ years, I've almost never
>> rebased or even been asked to.
>
>Maybe it depends on what kind of changes you commit.  I consider
>future maintainers the most important "customer" of the repository
>history.  As such, I try to make each commit a logical change that
>takes a working system and produces another working system.  In that
>way, each change to be potentially reversed if later on if it found
>to cause problems.  Also, ideally, each revision can be tested to
>narrow down the version where a bug was introduced.

I always try to follow TDD, so good commit points for local development
branches are places where you've fixed a broken test and done your refactoring
step.  This means that even for local lines of development, revisions should
produce workable code, although perhaps only localized to the tests being
modified.

>If you are able to directly commit A' and B' and your tool does a
>good job of hiding the logically unimportant merge then I guess you
>wouldn't miss the ability to modify history.

Right.  As Ben Finney has pointed out, Bazaar does a very good job of this, so
it's just not something a typical Bazaar user worries much about.  It's there
if you want it of course, and some projects do, but most don't bother.

-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-dev/attachments/20110328/82bbc45d/attachment.pgp>


More information about the Python-Dev mailing list