Request to make hg pull -u --rebase more friendly

Jonathan Watt jwatt at jwatt.org
Sun Sep 6 08:26:22 CDT 2009


On 2009-09-06 6:22 AM, Patrick Mézard wrote:
> Jonathan Watt a écrit :
>> Hi list,
>>
>> I've been trying to teach some Mercurial newbies enough about hg to quickly get
>> them off the ground and be productive. One of the first significant hurdles
>> turns out to be pulling to keep up to date with the "central" repository when
>> they have local uncommitted changes in their working tree (groking mq appears to
>> be /way/ beyond them at this stage).
> 
> Or you can do it the normal way: let them finish their local work, commit and merge.

We found that when actively collaborating on a piece of work it was common for
people to want/need to get the changes someone else had pushed while working on
an unfinished patch that is not yet ready to commit. That's a problem
unfortunately, but something we have to deal with. Also, trying to teach merging
turned out to be a bridge too far at this point, just resulting in more
mistakes, confusion and frustration.

> And if you really insist on having a linear history, replace the merge step with a rebase call.

It turns out to be better to teach rebasing than merging, but much more because
everyone seemed to instinctively expect a merge to result in a changeset than
because of any desire to maintain linear history (I'd prefer merging actually).
The fact that merging does not create a changeset repeatedly tripped people up
and got them tied in knots as they went on to make further changes to their
working copy.

Honestly, from my experience the last week I'm convinced that making 'hg pull -u
--rebase' work with changes in the working copy would go a long way to avoiding
a lot of up front frustration for new users. By allowing them to behave in a way
that feels a much more familiar to the cvs/svn way of working that some of them
are used to, it would be a great help in getting them started while the mental
model of how things work in a DVCS takes shape and starts to stick in their
minds. :-) As things stand I'm now a lot more worried than I was a week ago that
DVCS frustration is going to loose us significant numbers of the people that
would otherwise be interested in contributing (and cost us significant time in
helping the others out of the holes they get themselves into), so I'd be very
happy to see this change.

In about five hours time I leave on vacation and I'll have very limited Internet
access, so apologies in advance for any break in my participation on this thread.

Best regards,
Jonathan


More information about the Mercurial-devel mailing list