Code review comment for lp:~craighewetson-deactivatedaccount/bzr/update_with_local_commit

Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
> I think that conflict is spurious - we shouldn't be creating it in the
> first place.
>
> *if* the update after the commit works, then the update before the
> commit should work identically.
>
> -Rob
>

So the problem as I understand it is that if you have:

1) Local commits
2) remote commits
3) Local uncommitted changes

things can easily conflict, and then conflict with the conflicts.

We've discussed a few ways around it. The one proposed here, I believe,
is to refuse if you have 1 and 3. Another possibility is to just stop in
the case that you get a conflict while doing one of the updates.

However, because update does the pivot, I think there is a good chance
we don't have an obviously sane state to stop at. At the end of the
first update, I *think* we are supposed to be in a branch with no
'local' commits applied, and remote changes present, and presumably you
have to have the uncommitted changes.

If we stopped at that point, then the next step is actually to merge the
local committed changes, but since those aren't on the master branch, it
isn't trivial to tell 'update' to do that. (So doing 'bzr update', got
some conflicts, fix them, 'bzr update-continue' ?)

However, uncommitted changes are *more* likely to be dependent on local
commits, so they are extra likely to be problematic at that point. Which
is why, IMO, this patch is reasonable. Get them put somewhere that is
easy to recover from, bring in upstream, pivot, and merge them in.
Better than shooting your foot off. (Though personally I also think
"local" commits are a misfeature, versus a clear separation when working
in bound mode versus non-bound.)

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqSq8cACgkQJdeBCYSNAAOQRwCfaoQim3jbS/CTvS+Vx7SizY+y
kAMAoLQMjN4DpHX0+ShoT9wd8yF8snmw
=sf/j
-----END PGP SIGNATURE-----

« Back to merge proposal