Pushing after merge considered harmful

Matthew D. Fuller fullermd at over-yonder.net
Tue Jan 26 12:43:45 GMT 2010


On Tue, Jan 26, 2010 at 07:22:33AM -0500 I heard the voice of
Eli Zaretskii, and lo! it spake thus:
> 
> That part is understood, thanks to all the responses here, but what
> remains to be understood is the effect on other commands.  Only two
> were mentioned to this moment: `uncommit' and `push'.  Are there
> others?

Well, the option restricts the sort of changes that can be made to the
branch [head] pointer.  So anything that moves that is potentially
affected.

- Converters from $OTHER_VCS can be involved.  I won't even try to
  quantify what all can happen there.

- Uncommit moves the branch pointer, and by its nature will always[0]
  be prevented by a_r_o.

- Commit moves the branch pointer, but by its nature will never be
  prevented by a_r_o[1], except in certain cases involving bound
  branches, those circumstances basically acting like push.

- Push/pull move the branch pointer, and it will depend on how they
  move it (ref explanations of exactly what a_r_o prevents) whether
  it's allowed or not.

- Update on a bound branch[2] moves the branch pointer much like pull
  and so could fail in any of the cases pull can (most obvious two
  cases: when upstream branch has changed mainline, or when you have
  local commits).

- Due to the conflation of bound branches and [heavy] checkouts[2],
  one can imagine 'switch' running into the situation.

- Plugins or manual bzrlib manipulation are out of scope, but could of
  course be doing just about anything.


That's all the commands that come to mind that manipulate the branch
pointer.



[0] Well, aside from really weird pathological cases maybe, where
    'uncommit' is the wrong command to be using anyway probably.

[1] I don't think; I haven't proven to myself that it can't.  It can
    fail for other reasons of course, but that's independent.

[2] Ignoring here all the discussion about what should be; just
    documenting what happens now.


-- 
Matthew Fuller     (MF4839)   |  fullermd at over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
           On the Internet, nobody can hear you scream.



More information about the bazaar mailing list