pull and merge use case
Martin Pool
mbp at sourcefrog.net
Wed Nov 23 02:39:41 GMT 2005
On 21 Nov 2005, James Blackwell <jblack at merconline.com> wrote:
> > Is there a use case where if the branches have diverged, you would
> > rather not merge.
That is, when or how would it be harmful to have pull automatically
merge?
A few cases
- You have uncommitted changes which (as you say) will now be mixed in
with the merge results. I suppose we could special case this by
having it refuse to merge if there are uncommitted changes (as it
currently does in merge).
- Sometimes pull must be followed by a commit; sometimes it shouldn't
be. This seems badly inconsistent to me. But perhaps it's the
lesser evil.
I can definitely see the attraction of having just one command; but also
the downside of one command with two very different behaviours.
> > I suppose User A's 'pull to update to latest' should switch the local
> > branch, and allow them to commit normally. I was just concerned that
> > when they go to commit, they would actually get DivergedBranches, rather
> > than OutOfDate. Because the revision-history has changed because of the
> > switch.
>
> This whole thing seems to strike me as inventory reordering. Its the same
> stuff, just recorded in a different order in the inventory. Though I can
> imagine log output changing and unusual merges (for non-head revisions)
> potentially failing, why would a user otherwise care?
I think you mean revision-history reordering, not inventory reordering.
The inventory is the 'space' dimension, a list of what files and other
objects are present in any given revision.
The ordering of revisions on a straight line will never change: if A is
a parent of B it will always be so. However the graph may pivot so that
revisions which were previously on the mainline are now off to the side.
I think we've all agreed that that pivoting is worthwhile.
> * Puts local commits at the end of the invenotry.
Our model of commits doesn't let you reparent them; that should be done
in a higher-level quilt-like tool.
--
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051123/d258a3bd/attachment.pgp
More information about the bazaar
mailing list